Home
last modified time | relevance | path

Searched refs:font (Results 1 – 25 of 77) sorted by relevance

1234

/frameworks/base/tools/layoutlib/rename_font/
Dbuild_font_single.py122 font = None
130 if name_id <= last_name_id and font is not None:
131 fonts.append(font)
132 font = None
134 if font is None:
135 font = FontInfo()
137 font.family = namerecord.text.strip()
139 font.style = namerecord.text.strip()
141 font.ends_in_regular = ends_in_regular(namerecord.text)
142 font.fullname = namerecord.text.strip()
[all …]
Dbuild_font.py138 font = None
146 if name_id <= last_name_id and font is not None:
147 fonts.append(font)
148 font = None
150 if font is None:
151 font = FontInfo()
153 font.family = namerecord.text.strip()
155 font.style = namerecord.text.strip()
157 font.ends_in_regular = ends_in_regular(namerecord.text)
158 font.fullname = namerecord.text.strip()
[all …]
DREADME1 This tool is used to rename the PS name encoded inside the ttf font that we ship
5 the SDK by appending the font version to its name.
9 the font files (*.ttf) in the process.
/frameworks/base/core/tests/coretests/src/android/provider/
DFontsContractTest.java80 FontInfo font = fonts[0]; in testGetFontFromProvider_resultOK() local
81 assertEquals(TestFontsProvider.TTC_INDEX, font.getTtcIndex()); in testGetFontFromProvider_resultOK()
82 FontVariationAxis[] actual = font.getAxes(); in testGetFontFromProvider_resultOK()
86 assertEquals(TestFontsProvider.NORMAL_WEIGHT, font.getWeight()); in testGetFontFromProvider_resultOK()
87 assertEquals(TestFontsProvider.ITALIC, font.isItalic()); in testGetFontFromProvider_resultOK()
88 assertNotNull(font.getUri()); in testGetFontFromProvider_resultOK()
89 assertEquals(RESULT_CODE_OK, font.getResultCode()); in testGetFontFromProvider_resultOK()
99 FontInfo font = fonts[0]; in testGetFontFromProvider_providerDoesntReturnAllFields() local
100 assertEquals(0, font.getTtcIndex()); in testGetFontFromProvider_providerDoesntReturnAllFields()
101 assertNull(font.getAxes()); in testGetFontFromProvider_providerDoesntReturnAllFields()
[all …]
DMockFontProvider.java180 for (Font font : in) { in buildCursor()
182 builder.add(Columns._ID, font.getId()); in buildCursor()
183 builder.add(Columns.FILE_ID, font.getFileId()); in buildCursor()
184 builder.add(Columns.TTC_INDEX, font.getTtcIndex()); in buildCursor()
185 builder.add(Columns.VARIATION_SETTINGS, font.getVarSettings()); in buildCursor()
186 builder.add(Columns.WEIGHT, font.getWeight()); in buildCursor()
187 builder.add(Columns.ITALIC, font.getItalic()); in buildCursor()
188 builder.add(Columns.RESULT_CODE, font.getResultCode()); in buildCursor()
/frameworks/base/docs/html/sdk/support_api_diff/25.0.0/
Dstylesheet-jdiff.css8 .diffspectable td {background-color:eee;border:0px;font-size:90%;font-weight:normal;padding:0px;pa…
9 td.diffvalueold {color:orange;background-color:white;border:0px;font-size:80%;font-style:normal;tex…
10 td.diffvaluenew {color:green;background-color:white;border:0px;font-size:80%;font-weight:normal;tex…
11 td.diffvalue {color:444;background-color:white;border:0px;font-size:80%;font-weight:normal;text-ali…
12 td.diffspec {background-color:white;border:0px;font-size:80%;font-weight:normal;padding:1px;color:4…
13 tt {font-size:11pt;font-family:monospace;}
15 font-size:96%;
18 font-size:96%;
23 font-size:100%;
26 font-size:96%;
[all …]
/frameworks/base/docs/html/sdk/support_api_diff/25.1.0/
Dstylesheet-jdiff.css8 .diffspectable td {background-color:eee;border:0px;font-size:90%;font-weight:normal;padding:0px;pa…
9 td.diffvalueold {color:orange;background-color:white;border:0px;font-size:80%;font-style:normal;tex…
10 td.diffvaluenew {color:green;background-color:white;border:0px;font-size:80%;font-weight:normal;tex…
11 td.diffvalue {color:444;background-color:white;border:0px;font-size:80%;font-weight:normal;text-ali…
12 td.diffspec {background-color:white;border:0px;font-size:80%;font-weight:normal;padding:1px;color:4…
13 tt {font-size:11pt;font-family:monospace;}
15 font-size:96%;
18 font-size:96%;
23 font-size:100%;
26 font-size:96%;
[all …]
/frameworks/support/compat/tests/java/android/support/v4/graphics/
DTypefaceCompatTest.java107 final int[] ids = { R.font.large_a, R.font.large_b, R.font.large_c, R.font.large_d }; in getSelectedFontResourceId()
143 getProviderResourceEntry(R.font.styletest_sync_providerfont), mResources, in testCreateFromResourcesFamilyXml_resourceFont_syncloading()
144 R.font.styletest_sync_providerfont, Typeface.NORMAL, null /* TextView */); in testCreateFromResourcesFamilyXml_resourceFont_syncloading()
157 getProviderResourceEntry(R.font.styletest_async_providerfont), mResources, in testCreateFromResourcesFamilyXml_resourceFont_asyncloading()
158 R.font.styletest_sync_providerfont, Typeface.NORMAL, textView); in testCreateFromResourcesFamilyXml_resourceFont_asyncloading()
174 mResources.getXml(R.font.styletestfont), mResources); in testCreateFromResourcesFamilyXml_resourceFont()
176 R.font.styletestfont, Typeface.NORMAL, null /* text view */); in testCreateFromResourcesFamilyXml_resourceFont()
178 mResources, R.font.styletestfont, Typeface.NORMAL)); in testCreateFromResourcesFamilyXml_resourceFont()
181 assertEquals(R.font.large_a, getSelectedFontResourceId(typeface)); in testCreateFromResourcesFamilyXml_resourceFont()
184 R.font.styletestfont, Typeface.ITALIC, null); in testCreateFromResourcesFamilyXml_resourceFont()
[all …]
/frameworks/base/tools/fonts/
Dfontchain_lint.py75 def open_font(font): argument
76 font_file, index = font
84 def get_best_cmap(font): argument
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): argument
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): argument
[all …]
/frameworks/base/data/fonts/
DAndroid.mk24 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))
66 define build-one-font-module
79 $(foreach f, $(font_src_files), $(call build-one-font-module, $(f)))
81 build-one-font-module :=
/frameworks/minikin/libs/minikin/
DHbFontCache.cpp47 void put(int32_t fontId, hb_font_t* font) { in put() argument
48 mCache.put(fontId, font); in put()
100 hb_font_t* font = fontCache->get(fontId); in getHbFontLocked() local
101 if (font != nullptr) { in getHbFontLocked()
102 return hb_font_reference(font); in getHbFontLocked()
119 font = hb_font_create_sub_font(parent_font); in getHbFontLocked()
124 hb_font_set_variations(font, variations.data(), variations.size()); in getHbFontLocked()
127 fontCache->put(fontId, font); in getHbFontLocked()
128 return hb_font_reference(font); in getHbFontLocked()
DFontFamily.cpp145 const Font& font = mFonts[i]; in getClosestMatch() local
146 int match = computeMatch(font.style, style); in getClosestMatch()
148 bestFont = &font; in getClosestMatch()
171 const MinikinFont* typeface = getClosestMatch(defaultStyle).font; in computeCoverage()
230 for (const Font& font : mFonts) { in createFamilyWithVariation() local
233 std::unordered_set<AxisTag> supportedAxes = font.getSupportedAxesLocked(); in createFamilyWithVariation()
244 minikinFont = font.typeface->createFontWithVariation(variations); in createFamilyWithVariation()
247 minikinFont = font.typeface; in createFamilyWithVariation()
249 fonts.push_back(Font(std::move(minikinFont), font.style)); in createFamilyWithVariation()
DMinikinInternal.cpp37 hb_font_t* font = getHbFontLocked(minikinFont); in getFontTable() local
38 hb_face_t* face = hb_font_get_face(font); in getFontTable()
40 hb_font_destroy(font); in getFontTable()
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/
DBidiRenderer.java31 import java.awt.font.FontRenderContext;
32 import java.awt.font.GlyphVector;
52 Font font; field in BidiRenderer.ScriptRun
146 renderScript(run.start, run.limit, run.font, flag, advances, advancesIndex, draw); in renderText()
181 for (Font font : mFonts) { in renderScript()
182 if (font == null) { in renderScript()
186 canDisplayUpTo = font.canDisplayUpTo(mText, start, start + charCount); in renderScript()
188 render(start, start+charCount, font, flag, advances, advancesIndex, draw); in renderScript()
218 private void render(int start, int limit, Font font, int flag, float[] advances, in render() argument
225 frc = Toolkit.getDefaultToolkit().getFontMetrics(font).getFontRenderContext(); in render()
[all …]
DFontFamily_Delegate.java186 FontInfo font = mFonts.get(i); in getFont() local
187 int match = computeMatch(font, desiredStyle); in getFont()
190 bestFont = font; in getFont()
293 /*package*/ static boolean nAddFont(long builderPtr, ByteBuffer font, int ttcIndex,
300 /*package*/ static boolean nAddFontWeightStyle(long builderPtr, ByteBuffer font,
365 Font font = Font.createFont(Font.TRUETYPE_FONT, fontStream);
367 fontInfo.mFont = font;
369 fontInfo.mWeight = font.isBold() ? BOLD_FONT_WEIGHT : DEFAULT_FONT_WEIGHT;
373 fontInfo.mIsItalic = isItalic == RESOLVE_BY_FONT_TABLE ? font.isItalic() :
443 Font font = loadFont(path);
[all …]
DTypeface_Delegate.java102 Font font = ffd.getFont(weight, isItalic); in getFonts() local
103 if (font != null) { in getFonts()
106 fonts.add(font); in getFonts()
121 fonts.add(font); in getFonts()
236 for (FontConfig.Font font : family.getFonts()) {
237 String fullPathName = "/system/fonts/" + font.getFontName();
239 font.getWeight(), font.isItalic());
/frameworks/support/compat/tests/java/android/support/v4/provider/
DFontsContractCompatTest.java170 FontInfo font = fonts[0]; in testGetFontFromProvider_resultOK() local
171 assertEquals(0, font.getTtcIndex()); in testGetFontFromProvider_resultOK()
172 assertEquals(700, font.getWeight()); in testGetFontFromProvider_resultOK()
173 assertTrue(font.isItalic()); in testGetFontFromProvider_resultOK()
174 assertNotNull(font.getUri()); in testGetFontFromProvider_resultOK()
175 assertEquals(RESULT_CODE_OK, font.getResultCode()); in testGetFontFromProvider_resultOK()
186 FontInfo font = fonts[0]; in testGetFontFromProvider_providerDoesntReturnAllFields() local
187 assertEquals(0, font.getTtcIndex()); in testGetFontFromProvider_providerDoesntReturnAllFields()
188 assertEquals(RESULT_CODE_OK, font.getResultCode()); in testGetFontFromProvider_providerDoesntReturnAllFields()
199 FontInfo font = fonts[0]; in testGetFontFromProvider_resultFontNotFound() local
[all …]
DMockFontProvider.java185 for (Font font : in) { in buildCursor()
186 cursor.addRow(new Object[] { font.getId(), font.getFileId() }); in buildCursor()
193 for (Font font : in) { in buildCursor()
195 new Object[] { font.getId(), font.getTtcIndex(), font.getVarSettings(), in buildCursor()
196 font.getWeight(), font.getItalic(), font.getResultCode(), font.getFileId() }); in buildCursor()
/frameworks/support/compat/tests/java/android/support/v4/content/res/
DResourcesCompatTest.java297 Typeface font = ResourcesCompat.getFont(mContext, R.font.samplefont); in testGetFont_fontFile() local
299 assertNotNull(font); in testGetFont_fontFile()
300 assertNotSame(Typeface.DEFAULT, font); in testGetFont_fontFile()
305 Typeface font = ResourcesCompat.getFont(mContext, R.font.samplexmlfont); in testGetFont_xmlFile() local
307 assertNotNull(font); in testGetFont_xmlFile()
308 assertNotSame(Typeface.DEFAULT, font); in testGetFont_xmlFile()
315 ResourcesCompat.getFont(mContext, R.font.invalid_xmlfamily)); in testGetFont_invalidXmlFile()
321 assertNull(ResourcesCompat.getFont(mContext, R.font.invalid_xmlempty)); in testGetFont_invalidXmlFile()
329 Typeface font = ResourcesCompat.getFont(mContext, R.font.samplefont); in testGetFont_fontFileIsCached() local
330 Typeface font2 = ResourcesCompat.getFont(mContext, R.font.samplefont); in testGetFont_fontFileIsCached()
[all …]
DFontResourcesParserCompatTest.java65 XmlResourceParser parser = mResources.getXml(R.font.samplexmlfont); in testParse()
76 assertEquals(R.font.samplefont, font1.getResourceId()); in testParse()
80 assertEquals(R.font.samplefont2, font2.getResourceId()); in testParse()
84 assertEquals(R.font.samplefont3, font3.getResourceId()); in testParse()
88 assertEquals(R.font.samplefont4, font4.getResourceId()); in testParse()
94 XmlResourceParser parser = mResources.getXml(R.font.samplexmldownloadedfont); in testParseDownloadableFont()
/frameworks/minikin/tests/unittest/
DHbFontCacheTest.cpp74 hb_font_t* font = getHbFontLocked(minikinFont.get()); in TEST_F() local
75 ASSERT_NE(nullptr, font); in TEST_F()
80 hb_font_set_user_data(font, &key, data, NULL, false); in TEST_F()
81 ASSERT_EQ(data, hb_font_get_user_data(font, &key)); in TEST_F()
88 font = getHbFontLocked(minikinFont.get()); in TEST_F()
89 EXPECT_EQ(nullptr, hb_font_get_user_data(font, &key)); in TEST_F()
/frameworks/base/graphics/java/android/graphics/
DFontFamily.java113 public boolean addFontFromBuffer(ByteBuffer font, int ttcIndex, FontVariationAxis[] axes, in addFontFromBuffer() argument
123 return nAddFontWeightStyle(mBuilderPtr, font, ttcIndex, weight, italic); in addFontFromBuffer()
173 private static boolean nAddFont(long builderPtr, ByteBuffer font, int ttcIndex) { in nAddFont() argument
174 return nAddFont(builderPtr, font, ttcIndex, -1, -1); in nAddFont()
192 private static native boolean nAddFont(long builderPtr, ByteBuffer font, int ttcIndex, in nAddFont() argument
194 private static native boolean nAddFontWeightStyle(long builderPtr, ByteBuffer font, in nAddFontWeightStyle() argument
/frameworks/base/cmds/bootanimation/
DBootAnimation.cpp538 status_t BootAnimation::initFont(Font* font, const char* fallback) { in initFont() argument
541 if (font->map != nullptr) { in initFont()
542 glGenTextures(1, &font->texture.name); in initFont()
543 glBindTexture(GL_TEXTURE_2D, font->texture.name); in initFont()
545 status = initTexture(font->map, &font->texture.w, &font->texture.h); in initFont()
552 status = initTexture(&font->texture, mAssets, fallback); in initFont()
558 font->char_width = font->texture.w / FONT_NUM_COLS; in initFont()
559 font->char_height = font->texture.h / FONT_NUM_ROWS / 2; // There are bold and regular rows in initFont()
565 void BootAnimation::drawText(const char* str, const Font& font, bool bold, int* x, int* y) { in drawText() argument
567 glBindTexture(GL_TEXTURE_2D, font.texture.name); in drawText()
[all …]
/frameworks/support/emoji/core/src/android/support/text/emoji/
DFontRequestEmojiCompatConfig.java133 final FontInfo font = fonts[0]; in run() local
134 if (font.getResultCode() != FontsContractCompat.Columns.RESULT_CODE_OK) { in run()
135 throwException("fetchFonts result is not OK. (" + font.getResultCode() + ")"); in run()
140 try (ParcelFileDescriptor fd = resolver.openFileDescriptor(font.getUri(), "r"); in run()
151 bufferMap.put(font.getUri(), buffer.duplicate()); in run()
153 new FontInfo[] { font }, bufferMap); in run()
/frameworks/base/core/jni/android/graphics/
DHarfBuzzNGFaceSkia.cpp167 hb_font_t* font = hb_font_create(face); in createFont() local
172 hb_font_set_ppem(font, x_ppem, y_ppem); in createFont()
173 hb_font_set_scale(font, HBFloatToFixed(sizeX), HBFloatToFixed(sizeY)); in createFont()
176 hb_font_set_funcs(font, harfbuzzSkiaGetFontFuncs(), data, destroyHarfBuzzFontData); in createFont()
178 return font; in createFont()

1234