Searched refs:font (Results 1 - 25 of 61) sorted by relevance

123

/frameworks/base/tools/layoutlib/rename_font/
H A Dbuild_font_single.py18 Rename the PS name of the input font.
53 # A constant to copy the font without modifying. This is useful when running
71 sys.exit('Usage: build_font_single.py /path/to/input/font.ttf /path/to/out/font.ttf')
84 print 'Converting font: ' + filename
98 # generate the udpated font now.
103 print filename + ' is not a valid font'
106 print 'Error converting font: ' + filename
120 found in the name table of the font. """
122 font
[all...]
H A Dbuild_font.py99 print 'Converting font: ' + filename
114 # generate the udpated font now.
119 print filename + ' is not a valid font'
122 print 'Error converting font: ' + filename
136 found in the name table of the font. """
138 font = None
143 # A new font should be created for each platform, encoding and language
146 if name_id <= last_name_id and font is not None:
147 fonts.append(font)
148 font
[all...]
/frameworks/base/core/tests/coretests/src/android/provider/
H A DFontsContractTest.java57 private static final String PACKAGE_NAME = "com.my.font.provider.package";
80 FontInfo font = fonts[0];
81 assertEquals(TestFontsProvider.TTC_INDEX, font.getTtcIndex());
82 FontVariationAxis[] actual = font.getAxes();
86 assertEquals(TestFontsProvider.NORMAL_WEIGHT, font.getWeight());
87 assertEquals(TestFontsProvider.ITALIC, font.isItalic());
88 assertNotNull(font.getUri());
89 assertEquals(RESULT_CODE_OK, font.getResultCode());
99 FontInfo font = fonts[0];
100 assertEquals(0, font
[all...]
H A DMockFontProvider.java52 final static String AUTHORITY = "android.provider.fonts.font";
180 for (Font font : in) {
182 builder.add(Columns._ID, font.getId());
183 builder.add(Columns.FILE_ID, font.getFileId());
184 builder.add(Columns.TTC_INDEX, font.getTtcIndex());
185 builder.add(Columns.VARIATION_SETTINGS, font.getVarSettings());
186 builder.add(Columns.WEIGHT, font.getWeight());
187 builder.add(Columns.ITALIC, font.getItalic());
188 builder.add(Columns.RESULT_CODE, font.getResultCode());
239 return "vnd.android.cursor.dir/vnd.android.provider.font";
[all...]
/frameworks/support/compat/tests/java/android/support/v4/graphics/
H A DTypefaceCompatTest.java54 private static final String AUTHORITY = "android.provider.fonts.font";
94 * Helper method to get the used font resource id by typeface.
96 * If the typeface is created from one of the R.font.large_a, R.font.large_b, R.font.large_c or
97 * R.font.large_d resource, this method returns the resource id used by the typeface.
100 // The glyph for "a" in R.font.large_a font has a 3em width and glyph for "b", "c" and "d"
101 // have 1em width. Similarly, The glyph for "b" in R.font.large_b font, th
[all...]
/frameworks/minikin/libs/minikin/
H A DHbFontCache.cpp47 void put(int32_t fontId, hb_font_t* font) { argument
48 mCache.put(fontId, font);
100 hb_font_t* font = fontCache->get(fontId); local
101 if (font != nullptr) {
102 return hb_font_reference(font);
119 font = hb_font_create_sub_font(parent_font);
124 hb_font_set_variations(font, variations.data(), variations.size());
127 fontCache->put(fontId, font);
128 return hb_font_reference(font);
H A DMinikinInternal.cpp37 hb_font_t* font = getHbFontLocked(minikinFont); local
38 hb_face_t* face = hb_font_get_face(font);
40 hb_font_destroy(font);
H A DFontFamily.cpp145 const Font& font = mFonts[i]; local
146 int match = computeMatch(font.style, style);
148 bestFont = &font;
171 const MinikinFont* typeface = getClosestMatch(defaultStyle).font;
230 for (const Font& font : mFonts) {
233 std::unordered_set<AxisTag> supportedAxes = font.getSupportedAxesLocked();
244 minikinFont = font.typeface->createFontWithVariation(variations);
247 minikinFont = font.typeface;
249 fonts.push_back(Font(std::move(minikinFont), font.style));
/frameworks/minikin/tests/unittest/
H A DHbFontCacheTest.cpp59 // Must return same object if same font object is passed.
74 hb_font_t* font = getHbFontLocked(minikinFont.get()); local
75 ASSERT_NE(nullptr, font);
77 // Set user data to identify the font object.
80 hb_font_set_user_data(font, &key, data, NULL, false);
81 ASSERT_EQ(data, hb_font_get_user_data(font, &key));
88 font = getHbFontLocked(minikinFont.get());
89 EXPECT_EQ(nullptr, hb_font_get_user_data(font, &key));
/frameworks/base/tools/fonts/
H A Dfontchain_lint.py75 def open_font(font):
76 font_file, index = font
84 def get_best_cmap(font):
85 ttfont = open_font(font)
91 assert bmp_cmap is None, 'More than one BMP cmap in %s' % (font, )
95 'More than one UCS-4 cmap in %s' % (font, ))
101 def get_variation_sequences_cmap(font):
102 ttfont = open_font(font)
107 assert vs_cmap is None, 'More than one VS cmap in %s' % (font, )
112 def get_emoji_map(font)
[all...]
/frameworks/base/data/fonts/
H A DAndroid.mk21 # create symlink for given font
22 # $(1): new font $(2): link target
24 define create-font-symlink
38 $(eval $(call create-font-symlink,DroidSans.ttf,Roboto-Regular.ttf))
39 $(eval $(call create-font-symlink,DroidSans-Bold.ttf,Roboto-Bold.ttf))
40 $(eval $(call create-font-symlink,DroidSerif-Regular.ttf,NotoSerif-Regular.ttf))
41 $(eval $(call create-font-symlink,DroidSerif-Bold.ttf,NotoSerif-Bold.ttf))
42 $(eval $(call create-font-symlink,DroidSerif-Italic.ttf,NotoSerif-Italic.ttf))
43 $(eval $(call create-font-symlink,DroidSerif-BoldItalic.ttf,NotoSerif-BoldItalic.ttf))
62 # Build the rest of font file
[all...]
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/
H A DBidiRenderer.java31 import java.awt.font.FontRenderContext;
32 import java.awt.font.GlyphVector;
40 * Render the text by breaking it into various scripts and using the right font for each script.
52 Font font; field in class:BidiRenderer.ScriptRun
65 // This List can contain nulls. A null font implies that the we weren't able to load the font
66 // properly. So, if we encounter a situation where we try to use that font, log a warning.
141 // We break the text into scripts and then select font based on it and then render each of
146 renderScript(run.start, run.limit, run.font, flag, advances, advancesIndex, draw);
153 * Render a script run to the right of the bounds passed. Use the preferred font t
218 render(int start, int limit, Font font, int flag, float[] advances, int advancesIndex, boolean draw) argument
[all...]
H A DFontFamily_Delegate.java74 // The cache has a drawback that if the font file changed after the font object was created,
156 // Skip font configuration files.
186 FontInfo font = mFonts.get(i);
187 int match = computeMatch(font, desiredStyle);
190 bestFont = font;
199 // Derive the font as required and add it to the list of Fonts.
228 // If we aren't able to load an Open Type font, don't log a warning just yet.
229 // We wait for a case where font is being used. Only then we try to log the
234 String.format("Unable to load font
293 nAddFont(long builderPtr, ByteBuffer font, int ttcIndex, int weight, int isItalic) argument
300 nAddFontWeightStyle(long builderPtr, ByteBuffer font, int ttcIndex, int weight, int isItalic) argument
[all...]
H A DTypeface_Delegate.java81 * The list may contain null when the font failed to load. If null is reached when trying to
83 * some font failed to load.
102 Font font = ffd.getFont(weight, isItalic);
103 if (font != null) {
106 fonts.add(font);
109 // We cannot open each font and get locales supported, etc to match the fonts.
119 // Add the font with the matching variant to the list.
121 fonts.add(font);
126 // The FontFamily is valid but doesn't contain any matching font. This means
127 // that the font faile
[all...]
/frameworks/minikin/tests/stresstest/
H A DFontFamilyTest.cpp36 std::shared_ptr<MinikinFont> font(new MinikinFontForTest(fontPath, ttcIndex));
38 std::make_shared<FontFamily>(std::vector<Font>({Font(font, FontStyle())}));
41 hb_font_t* hbFont = getHbFontLocked(font.get());
/frameworks/support/compat/tests/java/android/support/v4/provider/
H A DMockFontProvider.java185 for (Font font : in) {
186 cursor.addRow(new Object[] { font.getId(), font.getFileId() });
193 for (Font font : in) {
195 new Object[] { font.getId(), font.getTtcIndex(), font.getVarSettings(),
196 font.getWeight(), font.getItalic(), font
[all...]
H A DFontsContractCompatTest.java66 private static final String AUTHORITY = "android.support.provider.fonts.font";
170 FontInfo font = fonts[0];
171 assertEquals(0, font.getTtcIndex());
172 assertEquals(700, font.getWeight());
173 assertTrue(font.isItalic());
174 assertNotNull(font.getUri());
175 assertEquals(RESULT_CODE_OK, font.getResultCode());
186 FontInfo font = fonts[0];
187 assertEquals(0, font.getTtcIndex());
188 assertEquals(RESULT_CODE_OK, font
[all...]
/frameworks/support/compat/tests/java/android/support/v4/content/res/
H A DResourcesCompatTest.java297 Typeface font = ResourcesCompat.getFont(mContext, R.font.samplefont);
299 assertNotNull(font);
300 assertNotSame(Typeface.DEFAULT, font);
305 Typeface font = ResourcesCompat.getFont(mContext, R.font.samplexmlfont);
307 assertNotNull(font);
308 assertNotSame(Typeface.DEFAULT, font);
315 ResourcesCompat.getFont(mContext, R.font.invalid_xmlfamily));
321 assertNull(ResourcesCompat.getFont(mContext, R.font
[all...]
H A DFontResourcesParserCompatTest.java65 XmlResourceParser parser = mResources.getXml(R.font.samplexmlfont);
76 assertEquals(R.font.samplefont, font1.getResourceId());
80 assertEquals(R.font.samplefont2, font2.getResourceId());
84 assertEquals(R.font.samplefont3, font3.getResourceId());
88 assertEquals(R.font.samplefont4, font4.getResourceId());
94 XmlResourceParser parser = mResources.getXml(R.font.samplexmldownloadedfont);
/frameworks/base/graphics/java/android/graphics/
H A DFontFamily.java44 // Points native font family builder. Must be zero after freezing this family.
58 * @return boolean returns false if some error happens in native code, e.g. broken font file is
108 Log.e(TAG, "Error mapping font file " + path);
113 public boolean addFontFromBuffer(ByteBuffer font, int ttcIndex, FontVariationAxis[] axes, argument
123 return nAddFontWeightStyle(mBuilderPtr, font, ttcIndex, weight, italic);
128 * @param path The path to the font file to load.
132 * @param weight The weight of the font. If 0 is given, the weight and italic will be resolved
133 * using the OS/2 table in the font.
134 * @param isItalic Whether this font is italic. If the weight is set to 0, this will be resolved
135 * using the OS/2 table in the font
173 nAddFont(long builderPtr, ByteBuffer font, int ttcIndex) argument
192 nAddFont(long builderPtr, ByteBuffer font, int ttcIndex, int weight, int isItalic) argument
194 nAddFontWeightStyle(long builderPtr, ByteBuffer font, int ttcIndex, int weight, int isItalic) argument
[all...]
/frameworks/base/core/jni/android/graphics/
H A DHarfBuzzNGFaceSkia.cpp167 hb_font_t* font = hb_font_create(face); local
172 hb_font_set_ppem(font, x_ppem, y_ppem);
173 hb_font_set_scale(font, HBFloatToFixed(sizeX), HBFloatToFixed(sizeY));
176 hb_font_set_funcs(font, harfbuzzSkiaGetFontFuncs(), data, destroyHarfBuzzFontData);
178 return font;
/frameworks/support/compat/java/android/support/v4/graphics/
H A DTypefaceCompatApi24Impl.java128 for (final FontInfo font : fonts) {
129 if (!addFontWeightStyle(family, uriBuffer.get(font.getUri()), font.getTtcIndex(),
130 font.getWeight(), font.isItalic())) {
/frameworks/minikin/include/minikin/
H A DMinikinFont.h36 MinikinPaint() : font(nullptr), size(0), scaleX(0), skewX(0), letterSpacing(0), wordSpacing(0),
43 MinikinFont *font; member in struct:minikin::MinikinPaint
99 // Override if font can provide access to raw data
104 // Override if font can provide access to raw data
109 // Override if font can provide access to raw data.
/frameworks/base/core/java/android/webkit/
H A DWebSettings.java49 * <li>TEXT_AUTOSIZING boosts font size of paragraphs based on heuristics to make
683 * Sets the standard font family name. The default is "sans-serif".
685 * @param font a font family name
687 public abstract void setStandardFontFamily(String font); argument
690 * Gets the standard font family name.
692 * @return the standard font family name as a string
698 * Sets the fixed font family name. The default is "monospace".
700 * @param font a font famil
702 setFixedFontFamily(String font) argument
717 setSansSerifFontFamily(String font) argument
732 setSerifFontFamily(String font) argument
747 setCursiveFontFamily(String font) argument
762 setFantasyFontFamily(String font) argument
[all...]
/frameworks/support/emoji/core/src/android/support/text/emoji/
H A DFontRequestEmojiCompatConfig.java42 * {@link EmojiCompat.Config} implementation that asynchronously fetches the required font and the
44 * compatible emoji font.
50 * @param request {@link FontRequest} to fetch the font asynchronously, cannot be {@code null}
132 // Assuming the GMS Core provides only one font file.
133 final FontInfo font = fonts[0];
134 if (font.getResultCode() != FontsContractCompat.Columns.RESULT_CODE_OK) {
135 throwException("fetchFonts result is not OK. (" + font.getResultCode() + ")");
140 try (ParcelFileDescriptor fd = resolver.openFileDescriptor(font.getUri(), "r");
151 bufferMap.put(font.getUri(), buffer.duplicate());
153 new FontInfo[] { font }, bufferMa
[all...]

Completed in 2111 milliseconds

123