Home
last modified time | relevance | path

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

12345

/frameworks/layoutlib/rename_font/
Dbuild_font_single.py126 font = None
137 if name_id <= last_name_id and font is not None:
138 fonts.append(font)
139 font = None
141 if font is None:
142 font = FontInfo()
144 font.family = namerecord.text.strip()
146 font.style = namerecord.text.strip()
148 font.ends_in_regular = ends_in_regular(namerecord.text)
149 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 …]
/frameworks/base/core/tests/coretests/src/android/provider/
DFontsContractTest.java82 FontInfo font = fonts[0]; in testGetFontFromProvider_resultOK() local
83 assertEquals(TestFontsProvider.TTC_INDEX, font.getTtcIndex()); in testGetFontFromProvider_resultOK()
84 FontVariationAxis[] actual = font.getAxes(); in testGetFontFromProvider_resultOK()
88 assertEquals(TestFontsProvider.NORMAL_WEIGHT, font.getWeight()); in testGetFontFromProvider_resultOK()
89 assertEquals(TestFontsProvider.ITALIC, font.isItalic()); in testGetFontFromProvider_resultOK()
90 assertNotNull(font.getUri()); in testGetFontFromProvider_resultOK()
91 assertEquals(RESULT_CODE_OK, font.getResultCode()); in testGetFontFromProvider_resultOK()
101 FontInfo font = fonts[0]; in testGetFontFromProvider_providerDoesntReturnAllFields() local
102 assertEquals(0, font.getTtcIndex()); in testGetFontFromProvider_providerDoesntReturnAllFields()
103 assertNull(font.getAxes()); in testGetFontFromProvider_providerDoesntReturnAllFields()
[all …]
/frameworks/base/native/android/
Dsystem_fonts.cpp75 std::size_t operator()(const AFont& font) const { in operator ()()
76 std::size_t r = std::hash<std::string>{}(font.mFilePath); in operator ()()
77 if (font.mLocale) { in operator ()()
78 r = combine(r, std::hash<std::string>{}(*font.mLocale)); in operator ()()
80 r = combine(r, std::hash<uint16_t>{}(font.mWeight)); in operator ()()
81 r = combine(r, std::hash<uint32_t>{}(font.mCollectionIndex)); in operator ()()
82 for (const auto& [tag, value] : font.mAxes) { in operator ()()
230 xmlNode* font = firstElement(family, FONT_TAG); in findFirstFontNode() local
231 while (font == nullptr) { in findFirstFontNode()
236 font = firstElement(family, FONT_TAG); in findFirstFontNode()
[all …]
/frameworks/base/libs/hwui/jni/fonts/
DFont.cpp53 static void releaseFont(jlong font) { in releaseFont() argument
54 delete reinterpret_cast<FontWrapper*>(font); in releaseFont()
113 std::shared_ptr<minikin::Font> font = in Font_Builder_build() local
119 return reinterpret_cast<jlong>(new FontWrapper(std::move(font))); in Font_Builder_build()
125 FontWrapper* font = reinterpret_cast<FontWrapper*>(fontPtr); in Font_Builder_clone() local
126 MinikinFontSkia* minikinSkia = static_cast<MinikinFontSkia*>(font->font->typeface().get()); in Font_Builder_clone()
157 FontWrapper* font = reinterpret_cast<FontWrapper*>(fontHandle); in Font_getGlyphBounds() local
158 MinikinFontSkia* minikinSkia = static_cast<MinikinFontSkia*>(font->font->typeface().get()); in Font_getGlyphBounds()
177 FontWrapper* font = reinterpret_cast<FontWrapper*>(fontHandle); in Font_getFontMetrics() local
178 MinikinFontSkia* minikinSkia = static_cast<MinikinFontSkia*>(font->font->typeface().get()); in Font_getFontMetrics()
[all …]
/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/native/include/android/
Dfont.h102 void AFont_close(AFont* _Nullable font) __INTRODUCED_IN(29);
124 const char* _Nonnull AFont_getFontFilePath(const AFont* _Nonnull font) __INTRODUCED_IN(29);
194 uint16_t AFont_getWeight(const AFont* _Nonnull font) __INTRODUCED_IN(29);
204 bool AFont_isItalic(const AFont* _Nonnull font) __INTRODUCED_IN(29);
218 const char* _Nullable AFont_getLocale(const AFont* _Nonnull font) __INTRODUCED_IN(29);
232 size_t AFont_getCollectionIndex(const AFont* _Nonnull font) __INTRODUCED_IN(29);
265 size_t AFont_getAxisCount(const AFont* _Nonnull font) __INTRODUCED_IN(29);
280 uint32_t AFont_getAxisTag(const AFont* _Nonnull font, uint32_t axisIndex)
295 float AFont_getAxisValue(const AFont* _Nonnull font, uint32_t axisIndex)
/frameworks/base/libs/hwui/hwui/
DMinikinSkia.cpp44 static void MinikinFontSkia_SetSkiaFont(const minikin::MinikinFont* font, SkFont* skFont, in MinikinFontSkia_SetSkiaFont() argument
52 MinikinFontSkia::populateSkFont(skFont, font, fakery); in MinikinFontSkia_SetSkiaFont()
150 uint32_t MinikinFontSkia::packFontFlags(const SkFont& font) { in packFontFlags() argument
151 uint32_t flags = (unsigned)font.getHinting() << 16; in packFontFlags()
152 flags |= (unsigned)font.getEdging() << 8; in packFontFlags()
153 flags |= font.isEmbolden() << minikin::Embolden_Shift; in packFontFlags()
154 flags |= font.isLinearMetrics() << minikin::LinearMetrics_Shift; in packFontFlags()
155 flags |= font.isSubpixel() << minikin::Subpixel_Shift; in packFontFlags()
156 flags |= font.isEmbeddedBitmaps() << minikin::EmbeddedBitmaps_Shift; in packFontFlags()
157 flags |= font.isForceAutoHinting() << minikin::ForceAutoHinting_Shift; in packFontFlags()
[all …]
DPaintImpl.cpp140 static uint32_t fontToLegacyFlags(const SkFont& font) { in fontToLegacyFlags() argument
142 flags |= -(int)font.isEmbolden() & sFakeBoldFlag; in fontToLegacyFlags()
143 flags |= -(int)font.isLinearMetrics() & sLinearMetrics; in fontToLegacyFlags()
144 flags |= -(int)font.isSubpixel() & sSubpixelMetrics; in fontToLegacyFlags()
145 flags |= -(int)font.isEmbeddedBitmaps() & sEmbeddedBitmaps; in fontToLegacyFlags()
146 flags |= -(int)font.isForceAutoHinting() & sForceAutoHinting; in fontToLegacyFlags()
161 static void applyLegacyFlagsToFont(uint32_t flags, SkFont* font) { in applyLegacyFlagsToFont() argument
162 font->setEmbolden ((flags & sFakeBoldFlag) != 0); in applyLegacyFlagsToFont()
163 font->setLinearMetrics ((flags & sLinearMetrics) != 0); in applyLegacyFlagsToFont()
164 font->setSubpixel ((flags & sSubpixelMetrics) != 0); in applyLegacyFlagsToFont()
[all …]
/frameworks/base/tools/fonts/
Dfontchain_linter.py77 def open_font(font): argument
78 font_file, index = font
86 def get_best_cmap(font): argument
87 ttfont = open_font(font)
93 assert bmp_cmap is None, 'More than one BMP cmap in %s' % (font, )
97 'More than one UCS-4 cmap in %s' % (font, ))
103 def get_variation_sequences_cmap(font): argument
104 ttfont = open_font(font)
109 assert vs_cmap is None, 'More than one VS cmap in %s' % (font, )
114 def get_emoji_map(font): argument
[all …]
Dupdate_font_metadata.py8 def update_font_revision(font, revisionSpec): argument
10 font['head'].fontRevision += float(revisionSpec[1:])
12 font['head'].fontRevision = float(revisionSpec)
22 font = ttLib.TTFont(args.input)
23 update_font_revision(font, args.revision)
24 font.save(args.output)
/frameworks/base/graphics/java/android/graphics/fonts/
DFontFamily.java81 public Builder(@NonNull Font font) { in Builder() argument
82 Preconditions.checkNotNull(font, "font can not be null"); in Builder()
83 mStyles.append(makeStyleIdentifier(font), 0); in Builder()
84 mFonts.add(font); in Builder()
101 public @NonNull Builder addFont(@NonNull Font font) { in addFont() argument
102 Preconditions.checkNotNull(font, "font can not be null"); in addFont()
103 int key = makeStyleIdentifier(font); in addFont()
105 throw new IllegalArgumentException(font + " has already been added"); in addFont()
108 mFonts.add(font); in addFont()
133 private static int makeStyleIdentifier(@NonNull Font font) { in makeStyleIdentifier() argument
[all …]
DFont.java239 public Builder(@NonNull Font font) { in Builder() argument
240 mFont = font; in Builder()
242 mBuffer = font.getBuffer(); in Builder()
243 mWeight = font.getStyle().getWeight(); in Builder()
244 mItalic = font.getStyle().getSlant(); in Builder()
245 mAxes = font.getAxes(); in Builder()
246 mFile = font.getFile(); in Builder()
247 mTtcIndex = font.getTtcIndex(); in Builder()
479 final Font font; in build() local
483 font = new Font(ptr); in build()
[all …]
/frameworks/base/tests/UpdatableSystemFontTest/EmojiRenderingTestApp/src/com/android/emojirenderingtestapp/
DGetAvailableFontsTestActivity.java35 for (Font font : SystemFonts.getAvailableFonts()) { in onCreate()
37 font.getAxes(); in onCreate()
38 font.getFile(); in onCreate()
39 font.getLocaleList(); in onCreate()
40 font.getStyle(); in onCreate()
41 font.getTtcIndex(); in onCreate()
42 if ("NotoColorEmoji.ttf".equals(font.getFile().getName())) { in onCreate()
43 emojiFontPath = font.getFile().getAbsolutePath(); in onCreate()
/frameworks/layoutlib/bridge/src/android/graphics/
DBidiRenderer.java32 import java.awt.font.FontRenderContext;
33 import java.awt.font.GlyphVector;
54 private final Font font; field in BidiRenderer.ScriptRun
56 private ScriptRun(int start, int limit, @NonNull Font font) { in ScriptRun() argument
59 this.font = font; in ScriptRun()
139 renderScript(run.start, run.limit, run.font, flag, advances, advancesIndex, draw); in renderText()
176 Font font = fontInfos.get(i).mFont; in renderScript() local
178 if (preferredFont == font) { in renderScript()
184 if (font == null) { in renderScript()
189 canDisplayUpTo = font.canDisplayUpTo(mText, start, limit); in renderScript()
[all …]
/frameworks/minikin/tests/unittest/
DLayoutCoreTest.cpp79 EXPECT_TRUE(layout.fontAt(0).font); in TEST()
91 EXPECT_TRUE(layout.fontAt(0).font); in TEST()
92 EXPECT_TRUE(layout.fontAt(1).font); in TEST()
106 EXPECT_TRUE(layout.fontAt(0).font); in TEST()
107 EXPECT_TRUE(layout.fontAt(1).font); in TEST()
132 EXPECT_TRUE(layout.fontAt(0).font); in TEST()
133 EXPECT_TRUE(layout.fontAt(1).font); in TEST()
147 EXPECT_TRUE(layout.fontAt(0).font); in TEST()
148 EXPECT_TRUE(layout.fontAt(1).font); in TEST()
168 EXPECT_TRUE(layout.fontAt(0).font); in TEST()
[all …]
DFontTest.cpp33 std::shared_ptr<Font> font = in TEST() local
35 EXPECT_EQ(minikinFont->GetFontPath(), font->typeface()->GetFontPath()); in TEST()
36 EXPECT_EQ(original->style(), font->style()); in TEST()
37 EXPECT_NE(nullptr, font->baseFont()); in TEST()
38 std::vector<uint8_t> newBuffer = writeToBuffer<Font, writeFreeTypeMinikinFontForTest>(*font); in TEST()
/frameworks/minikin/include/minikin/
DMinikinPaint.h50 MinikinPaint(const std::shared_ptr<FontCollection>& font) in MinikinPaint()
60 font(font) {} in MinikinPaint()
74 std::shared_ptr<FontCollection> font; member
89 fontFeatureSettings == paint.fontFeatureSettings && font.get() == paint.font.get();
104 .update(font->getId()) in hash()
DLayout.h37 LayoutGlyph(FakedFont font, uint32_t glyph_id, float x, float y) in LayoutGlyph()
38 : font(font), glyph_id(glyph_id), x(x), y(y) {} in LayoutGlyph()
39 FakedFont font; member
87 const Font* getFont(int i) const { return mGlyphs[i].font.font.get(); } in getFont()
88 const std::shared_ptr<Font>& getFontRef(int i) const { return mGlyphs[i].font.font; } in getFontRef()
89 FontFakery getFakery(int i) const { return mGlyphs[i].font.fakery; } in getFakery()
/frameworks/base/core/java/android/graphics/fonts/
DFontUpdateRequest.java130 public static void writeToXml(TypedXmlSerializer out, Font font) throws IOException { in writeToXml() argument
131 out.attribute(null, ATTR_POSTSCRIPT_NAME, font.getPostScriptName()); in writeToXml()
132 out.attributeInt(null, ATTR_INDEX, font.getIndex()); in writeToXml()
133 out.attributeInt(null, ATTR_WEIGHT, font.getFontStyle().getWeight()); in writeToXml()
134 out.attributeInt(null, ATTR_SLANT, font.getFontStyle().getSlant()); in writeToXml()
135 out.attribute(null, ATTR_AXIS, font.getFontVariationSettings()); in writeToXml()
182 Font font = (Font) o; in equals()
183 return mIndex == font.mIndex in equals()
184 && mPostScriptName.equals(font.mPostScriptName) in equals()
185 && mFontStyle.equals(font.mFontStyle) in equals()
[all …]
/frameworks/layoutlib/bridge/src/android/graphics/fonts/
DFontFamily_Builder_Delegate.java86 Font font; in nAddFont() local
88 font = loadFontBuffer(fontBuilder.mBuffer); in nAddFont()
91 font = loadFontPath(fontBuilder.filePath); in nAddFont()
93 if (font != null) { in nAddFont()
94 familyBuilder.addFont(font, fontBuilder.mWeight, fontBuilder.mItalic); in nAddFont()
144 for (FontInfo font : mFonts.keySet()) {
145 int match = computeMatch(font, desiredStyle);
148 bestFont = font;
173 private void addFont(@NonNull Font font, int weight, boolean italic) {
175 fontInfo.mFont = font;
DFont_Builder_Delegate.java93 Font_Builder_Delegate font = sBuilderManager.getDelegate(builderPtr); in nBuild() local
94 if (font != null) { in nBuild()
95 font.mBuffer = buffer; in nBuild()
96 font.mWeight = weight; in nBuild()
97 font.mItalic = italic; in nBuild()
98 font.mTtcIndex = ttcIndex; in nBuild()
99 font.filePath = filePath; in nBuild()
/frameworks/minikin/libs/minikin/
DFont.cpp42 HbFontUniquePtr font = prepareFont(mTypeface); in build() local
43 FontStyle styleFromFont = analyzeStyle(font); in build()
51 std::move(font), mLocaleListId)); in build()
89 HbFontUniquePtr font(hb_font_create_sub_font(parent.get())); in prepareFont() local
95 hb_font_set_variations(font.get(), variations.data(), variations.size()); in prepareFont()
96 return font; in prepareFont()
100 FontStyle Font::analyzeStyle(const HbFontUniquePtr& font) { in analyzeStyle() argument
101 HbBlob os2Table(font, MinikinFont::MakeTag('O', 'S', '/', '2')); in analyzeStyle()
DLayoutCore.cpp50 const MinikinFont* font; member
63 float advance = args->font->GetHorizontalAdvance(glyph, *args->paint, args->fakery); in harfbuzzGetGlyphHorizontalAdvance()
83 args->font->GetHorizontalAdvances(glyphVec.data(), count, *args->paint, args->fakery, in harfbuzzGetGlyphHorizontalAdvances()
134 static bool isColorBitmapFont(const HbFontUniquePtr& font) { in isColorBitmapFont() argument
135 HbBlob cbdt(font, HB_TAG('C', 'B', 'D', 'T')); in isColorBitmapFont()
206 static inline hb_codepoint_t determineHyphenChar(hb_codepoint_t preferredHyphen, hb_font_t* font) { in determineHyphenChar() argument
211 if (hb_font_get_nominal_glyph(font, preferredHyphen, &glyph)) { in determineHyphenChar()
223 if (!hb_font_get_nominal_glyph(font, preferredHyphen, &glyph)) { in determineHyphenChar()
231 static inline void addHyphenToHbBuffer(const HbBufferUniquePtr& buffer, const HbFontUniquePtr& font, in addHyphenToHbBuffer() argument
237 hb_buffer_add(buffer.get(), determineHyphenChar(chars[i], font.get()), cluster); in addHyphenToHbBuffer()
[all …]

12345