Searched refs:font (Results 1 - 25 of 66) 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/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/src/androidTest/java/androidx/core/graphics/
H A DTypefaceCompatTest.java99 * Helper method to get the used font resource id by typeface.
101 * If the typeface is created from one of the R.font.large_a, R.font.large_b, R.font.large_c or
102 * R.font.large_d resource, this method returns the resource id used by the typeface.
105 // The glyph for "a" in R.font.large_a font has a 3em width and glyph for "b", "c" and "d"
106 // have 1em width. Similarly, The glyph for "b" in R.font.large_b font, the glyph for "c"
107 // in R.font
[all...]
/frameworks/minikin/libs/minikin/
H A DFontFamily.cpp42 // No need to read OS/2 header of the font file.
46 HbFontUniquePtr font = prepareFont(mTypeface); local
47 FontStyle styleFromFont = analyzeStyle(font);
54 return Font(std::move(mTypeface), FontStyle(mWeight, mSlant), std::move(font));
71 HbFontUniquePtr font(hb_font_create_sub_font(parent.get()));
77 hb_font_set_variations(font.get(), variations.data(), variations.size());
78 return font;
82 FontStyle Font::analyzeStyle(const HbFontUniquePtr& font) { argument
83 HbBlob os2Table(font, MinikinFont::MakeTag('O', 'S', '/', '2'));
119 MINIKIN_ASSERT(!mFonts.empty(), "FontFamily must contain at least one font
147 const Font& font = mFonts[i]; local
158 const Font* font = getClosestMatch(FontStyle()).font; local
[all...]
H A DMinikinInternal.h63 HbBlob(const HbFontUniquePtr& font, uint32_t tag) argument
64 : mBlob(hb_face_reference_table(hb_font_get_face(font.get()), tag)) {}
/frameworks/minikin/tests/unittest/
H A DMeasuredTextTest.cpp33 auto font = buildFontCollection("Ascii.ttf"); local
37 MinikinPaint paint1(font);
41 MinikinPaint paint2(font);
/frameworks/layoutlib/bridge/tests/res/testApp/MyApplication/build/intermediates/classes/debug/com/android/layoutlib/test/myapplication/
H A DR$font.class ... android.layoutlib.test.myapplication.R$font extends java.lang.Object { public static final int ...
/frameworks/layoutlib/bridge/src/android/graphics/
H A DBidiRenderer.java32 import java.awt.font.FontRenderContext;
33 import java.awt.font.GlyphVector;
41 * Render the text by breaking it into various scripts and using the right font for each script.
54 private final Font font; field in class:BidiRenderer.ScriptRun
56 private ScriptRun(int start, int limit, @NonNull Font font) { argument
59 this.font = font;
134 // We break the text into scripts and then select font based on it and then render each of
139 renderScript(run.start, run.limit, run.font, flag, advances, advancesIndex, draw);
146 * Render a script run to the right of the bounds passed. Use the preferred font t
213 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,
181 // Skip font configuration files.
222 for (FontInfo font : mFonts.keySet()) {
223 int match = computeMatch(font, desiredStyle);
226 bestFont = font;
230 // This would mean that we already had the font so it should be in the set
239 // Derive the font as required and add it to the list of Fonts.
268 // If we aren't able to load an Open Type font, don't log a warning just yet.
269 // We wait for a case where font i
333 nAddFont(long builderPtr, ByteBuffer font, int ttcIndex, int weight, int isItalic) argument
340 nAddFontWeightStyle(long builderPtr, ByteBuffer font, int ttcIndex, int weight, int isItalic) argument
[all...]
H A DTypeface_Delegate.java238 for (FontConfig.Font font : fonts) {
239 String fullPathName = fontDir + font.getFontName();
240 FontFamily_Delegate.addFont(fontFamily.mBuilderPtr, fullPathName, font.getWeight(),
241 font.isItalic());
248 * Loads a single font or font family from disk
344 Font font = ffd.getFont(weight, isItalic);
345 if (font != null) {
348 fonts.add(font);
351 // We cannot open each font an
[all...]
/frameworks/support/compat/src/androidTest/java/androidx/core/content/res/
H A DResourcesCompatTest.java306 Typeface font = ResourcesCompat.getFont(mContext, R.font.samplefont);
308 assertNotNull(font);
309 assertNotSame(Typeface.DEFAULT, font);
338 ResourcesCompat.getFont(mContext, R.font.samplefont, callback, null);
348 Typeface font = ResourcesCompat.getFont(mContext, R.font.samplexmlfont);
350 assertNotNull(font);
351 assertNotSame(Typeface.DEFAULT, font);
359 ResourcesCompat.getFont(mContext, R.font
[all...]
H A DFontResourcesParserCompatTest.java67 XmlResourceParser parser = mResources.getXml(R.font.samplexmlfontforparsing);
80 assertEquals(R.font.samplefont, font1.getResourceId());
86 assertEquals(R.font.samplefont2, font2.getResourceId());
92 assertEquals(R.font.samplefont3, font3.getResourceId());
98 assertEquals(R.font.samplefont4, font4.getResourceId());
110 XmlResourceParser parser = mResources.getXml(R.font.samplexmlfontforparsing2);
123 assertEquals(R.font.samplefont, font1.getResourceId());
129 assertEquals(R.font.samplefont2, font2.getResourceId());
135 assertEquals(R.font.samplefont3, font3.getResourceId());
141 assertEquals(R.font
[all...]
/frameworks/base/tools/fonts/
H A Dfontchain_linter.py76 def open_font(font):
77 font_file, index = font
85 def get_best_cmap(font):
86 ttfont = open_font(font)
92 assert bmp_cmap is None, 'More than one BMP cmap in %s' % (font, )
96 'More than one UCS-4 cmap in %s' % (font, ))
102 def get_variation_sequences_cmap(font):
103 ttfont = open_font(font)
108 assert vs_cmap is None, 'More than one VS cmap in %s' % (font, )
113 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/support/compat/src/androidTest/java/androidx/core/provider/
H A DFontsContractCompatTest.java71 private static final String AUTHORITY = "androidx.core.provider.fonts.font";
147 FontInfo font = fonts[0];
148 assertEquals(0, font.getTtcIndex());
149 assertEquals(700, font.getWeight());
150 assertTrue(font.isItalic());
151 assertNotNull(font.getUri());
152 assertEquals(RESULT_CODE_OK, font.getResultCode());
163 FontInfo font = fonts[0];
164 assertEquals(0, font.getTtcIndex());
165 assertEquals(RESULT_CODE_OK, font
[all...]
H A DMockFontProvider.java44 public static final String AUTHORITY = "androidx.core.provider.fonts.font";
195 for (Font font : in) {
196 cursor.addRow(new Object[] { font.getId(), font.getFileId() });
203 for (Font font : in) {
205 new Object[] { font.getId(), font.getTtcIndex(), font.getVarSettings(),
206 font.getWeight(), font
[all...]
/frameworks/base/graphics/java/android/graphics/
H A DFontFamily.java56 // Points native font family builder. Must be zero after freezing this family.
80 * @return boolean returns false if some error happens in native code, e.g. broken font file is
120 Log.e(TAG, "Error mapping font file " + path);
125 public boolean addFontFromBuffer(ByteBuffer font, int ttcIndex, FontVariationAxis[] axes, argument
135 return nAddFontWeightStyle(mBuilderPtr, font, ttcIndex, weight, italic);
140 * @param path The path to the font file to load.
144 * @param weight The weight of the font. If 0 is given, the weight and italic will be resolved
145 * using the OS/2 table in the font.
146 * @param isItalic Whether this font is italic. If the weight is set to 0, this will be resolved
147 * using the OS/2 table in the font
166 nAddFont(long builderPtr, ByteBuffer font, int ttcIndex) argument
182 nAddFont(long builderPtr, ByteBuffer font, int ttcIndex, int weight, int isItalic) argument
184 nAddFontWeightStyle(long builderPtr, ByteBuffer font, int ttcIndex, int weight, int isItalic) argument
[all...]
/frameworks/minikin/include/minikin/
H A DMinikinFont.h36 MinikinPaint(const std::shared_ptr<FontCollection>& font) argument
46 font(font) {}
60 std::shared_ptr<FontCollection> font; member in struct:minikin::MinikinPaint
72 fontFeatureSettings == paint.fontFeatureSettings && font.get() == paint.font.get();
139 // Override if font can provide access to raw data
142 // Override if font can provide access to raw data
145 // Override if font can provide access to raw data.
/frameworks/support/compat/src/main/java/androidx/core/graphics/
H A DTypefaceCompatBaseImpl.java58 for (final T font : fonts) {
59 final int score = (Math.abs(extractor.getWeight(font) - targetWeight) * 2)
60 + (extractor.isItalic(font) == isTargetItalic ? 0 : 1);
63 best = font;
107 // When we load from file, we can only load one font so just take the first one.
111 FontInfo font = findBestInfo(fonts, style);
114 is = context.getContentResolver().openInputStream(font.getUri());
149 * Used by Resources to load a font resource of type font file.
/frameworks/minikin/tests/stresstest/
H A DFontFamilyTest.cpp38 auto font = std::make_shared<FreeTypeMinikinFontForTest>(fontPath); local
40 fonts.push_back(Font::Builder(font).build());
/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/main/java/androidx/emoji/text/
H A DFontRequestEmojiCompatConfig.java43 * {@link EmojiCompat.Config} implementation that asynchronously fetches the required font and the
45 * compatible emoji font.
51 * Retry policy used when the font provider is not ready to give the font file.
60 * This is primarily due to a pending download of the font.
69 * Note that the retry may happen earlier than you specified if the font provider notifies
102 // Retry periodically since we can't trust notify change event. Some font provider
117 * @param request {@link FontRequest} to fetch the font asynchronously, cannot be {@code null}
135 * Since font fetch take longer time, the metadata loader will fetch the fonts on the background
152 * @param policy The policy to be used when the font provide
339 buildTypeface(@onNull Context context, @NonNull FontsContractCompat.FontInfo font) argument
[all...]
/frameworks/base/core/java/android/webkit/
H A DWebSettings.java50 * <li>{@code TEXT_AUTOSIZING} boosts font size of paragraphs based on heuristics to make
690 * Sets the standard font family name. The default is "sans-serif".
692 * @param font a font family name
694 public abstract void setStandardFontFamily(String font); argument
697 * Gets the standard font family name.
699 * @return the standard font family name as a string
705 * Sets the fixed font family name. The default is "monospace".
707 * @param font a font famil
709 setFixedFontFamily(String font) argument
724 setSansSerifFontFamily(String font) argument
739 setSerifFontFamily(String font) argument
754 setCursiveFontFamily(String font) argument
769 setFantasyFontFamily(String font) argument
[all...]

Completed in 574 milliseconds

123