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

123

/frameworks/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/support/compat/tests/java/android/support/v4/graphics/
H A DTypefaceCompatTest.java91 * Helper method to get the used font resource id by typeface.
93 * If the typeface is created from one of the R.font.large_a, R.font.large_b, R.font.large_c or
94 * R.font.large_d resource, this method returns the resource id used by the typeface.
97 // The glyph for "a" in R.font.large_a font has a 3em width and glyph for "b", "c" and "d"
98 // have 1em width. Similarly, The glyph for "b" in R.font.large_b font, the glyph for "c"
99 // in R.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/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.py74 def open_font(font):
75 font_file, index = font
83 def get_best_cmap(font):
84 ttfont = open_font(font)
90 assert bmp_cmap is None, 'More than one BMP cmap in %s' % (font, )
94 'More than one UCS-4 cmap in %s' % (font, ))
100 def get_variation_sequences_cmap(font):
101 ttfont = open_font(font)
106 assert vs_cmap is None, 'More than one VS cmap in %s' % (font, )
111 def get_emoji_map(font)
[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/layoutlib/bridge/src/android/graphics/
H A DBidiRenderer.java32 import java.awt.font.FontRenderContext;
33 import java.awt.font.GlyphVector;
40 * Render the text by breaking it into various scripts and using the right font for each script.
50 private final Font font; field in class:BidiRenderer.ScriptRun
52 private ScriptRun(int start, int limit, @NonNull Font font) { argument
55 this.font = font;
128 // We break the text into scripts and then select font based on it and then render each of
133 renderScript(run.start, run.limit, run.font, flag, advances, advancesIndex, draw);
140 * Render a script run to the right of the bounds passed. Use the preferred font t
208 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.
105 Font font = ffd.getFont(weight, isItalic);
106 if (font != null) {
109 fonts.add(font);
112 // We cannot open each font and get locales supported, etc to match the fonts.
122 // Add the font with the matching variant to the list.
124 fonts.add(font);
129 // The FontFamily is valid but doesn't contain any matching font. This means
130 // that the font faile
[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/support/compat/tests/java/android/support/v4/provider/
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...]
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...]
/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/support/compat/java/android/support/v4/graphics/
H A DTypefaceCompatBaseImpl.java59 for (final T font : fonts) {
60 final int score = (Math.abs(extractor.getWeight(font) - targetWeight) * 2)
61 + (extractor.isItalic(font) == isTargetItalic ? 0 : 1);
64 best = font;
109 // When we load from file, we can only load one font so just take the first one.
113 FontInfo font = findBestInfo(fonts, style);
116 is = context.getContentResolver().openInputStream(font.getUri());
152 * Used by Resources to load a font resource of type font file.
/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/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 * Retry policy used when the font provider is not ready to give the font file.
59 * This is primarily due to a pending download of the font.
68 * Note that the retry may happen earlier than you specified if the font provider notifies
101 // Retry periodically since we can't trust notify change event. Some font provider
116 * @param request {@link FontRequest} to fetch the font asynchronously, cannot be {@code null}
134 * Since font fetch take longer time, the metadata loader will fetch the fonts on the background
151 * @param policy The policy to be used when the font provide
338 buildTypeface(@onNull Context context, @NonNull FontsContractCompat.FontInfo font) argument
[all...]
/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...]

Completed in 6864 milliseconds

123