Home
last modified time | relevance | path

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

123456

/frameworks/base/core/tests/coretests/src/android/provider/
DFontsContractTest.java83 FontInfo font = fonts[0]; in testGetFontFromProvider_resultOK() local
84 assertEquals(TestFontsProvider.TTC_INDEX, font.getTtcIndex()); in testGetFontFromProvider_resultOK()
85 FontVariationAxis[] actual = font.getAxes(); in testGetFontFromProvider_resultOK()
89 assertEquals(TestFontsProvider.NORMAL_WEIGHT, font.getWeight()); in testGetFontFromProvider_resultOK()
90 assertEquals(TestFontsProvider.ITALIC, font.isItalic()); in testGetFontFromProvider_resultOK()
91 assertNotNull(font.getUri()); in testGetFontFromProvider_resultOK()
92 assertEquals(RESULT_CODE_OK, font.getResultCode()); in testGetFontFromProvider_resultOK()
102 FontInfo font = fonts[0]; in testGetFontFromProvider_providerDoesntReturnAllFields() local
103 assertEquals(0, font.getTtcIndex()); in testGetFontFromProvider_providerDoesntReturnAllFields()
104 assertNull(font.getAxes()); in testGetFontFromProvider_providerDoesntReturnAllFields()
[all …]
/frameworks/base/native/android/
Dsystem_fonts.cpp70 std::size_t operator()(const AFont& font) const { in operator ()()
71 std::size_t r = std::hash<std::string>{}(font.mFilePath); in operator ()()
72 if (font.mLocale) { in operator ()()
73 r = combine(r, std::hash<std::string>{}(*font.mLocale)); in operator ()()
75 r = combine(r, std::hash<uint16_t>{}(font.mWeight)); in operator ()()
76 r = combine(r, std::hash<uint32_t>{}(font.mCollectionIndex)); in operator ()()
77 for (const auto& [tag, value] : font.mAxes) { in operator ()()
225 xmlNode* font = firstElement(family, FONT_TAG); in findFirstFontNode() local
226 while (font == nullptr) { in findFirstFontNode()
231 font = firstElement(family, FONT_TAG); in findFirstFontNode()
[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/base/libs/hwui/jni/fonts/
DFont.cpp54 static void releaseFont(jlong font) { in releaseFont() argument
55 delete reinterpret_cast<FontWrapper*>(font); in releaseFont()
115 std::shared_ptr<minikin::Font> font = in Font_Builder_build() local
121 return reinterpret_cast<jlong>(new FontWrapper(std::move(font))); in Font_Builder_build()
127 FontWrapper* font = reinterpret_cast<FontWrapper*>(fontPtr); in Font_Builder_clone() local
128 MinikinFontSkia* minikinSkia = static_cast<MinikinFontSkia*>(font->font->baseTypeface().get()); in Font_Builder_clone()
159 FontWrapper* font = reinterpret_cast<FontWrapper*>(fontHandle); in Font_getGlyphBounds() local
160 MinikinFontSkia* minikinSkia = static_cast<MinikinFontSkia*>(font->font->baseTypeface().get()); in Font_getGlyphBounds()
179 FontWrapper* font = reinterpret_cast<FontWrapper*>(fontHandle); in Font_getFontMetrics() local
180 MinikinFontSkia* minikinSkia = static_cast<MinikinFontSkia*>(font->font->baseTypeface().get()); in Font_getFontMetrics()
[all …]
/frameworks/minikin/tests/unittest/
DFontTest.cpp43 Font font(&reader); in TEST() local
44 EXPECT_EQ(minikinFont->GetFontPath(), font.baseTypeface()->GetFontPath()); in TEST()
45 EXPECT_EQ(original->style(), font.style()); in TEST()
46 EXPECT_EQ(original->getLocaleListId(), font.getLocaleListId()); in TEST()
48 const auto& baseFont = font.baseFont(); in TEST()
50 EXPECT_EQ(baseFont, font.baseFont()); in TEST()
52 const auto& typeface = font.baseTypeface(); in TEST()
54 EXPECT_EQ(typeface, font.baseTypeface()); in TEST()
55 std::vector<uint8_t> newBuffer = writeToBuffer<Font>(font); in TEST()
148 std::shared_ptr<Font> font = Font::Builder(minikinFont).build(); in TEST() local
[all …]
DFontFeatureTest.cpp44 std::shared_ptr<FontCollection> font; member in minikin::DefaultFontFeatureTest
46 virtual void SetUp() override { font = buildFontCollection("Ascii.ttf"); } in SetUp()
50 auto f = cleanAndAddDefaultFontFeatures(MinikinPaint(font)); in TEST_F()
57 auto paint = MinikinPaint(font); in TEST_F()
69 auto paint = MinikinPaint(font); in TEST_F()
83 auto paint = MinikinPaint(font); in TEST_F()
99 auto paint = MinikinPaint(font); in TEST_F()
109 auto paint = MinikinPaint(font); in TEST_F()
119 auto paint = MinikinPaint(font); in TEST_F()
136 auto paint = MinikinPaint(font); in TEST_F()
[all …]
DLayoutCoreTest.cpp98 EXPECT_TRUE(layout.fontAt(0).font); in TEST()
112 EXPECT_TRUE(layout.fontAt(0).font); in TEST()
113 EXPECT_TRUE(layout.fontAt(1).font); in TEST()
129 EXPECT_TRUE(layout.fontAt(0).font); in TEST()
130 EXPECT_TRUE(layout.fontAt(1).font); in TEST()
157 EXPECT_TRUE(layout.fontAt(0).font); in TEST()
158 EXPECT_TRUE(layout.fontAt(1).font); in TEST()
174 EXPECT_TRUE(layout.fontAt(0).font); in TEST()
175 EXPECT_TRUE(layout.fontAt(1).font); in TEST()
197 EXPECT_TRUE(layout.fontAt(0).font); in TEST()
[all …]
DMeasuredTextTest.cpp34 auto font = buildFontCollection("Ascii.ttf"); in TEST() local
40 MinikinPaint paint1(font); in TEST()
45 MinikinPaint paint2(font); in TEST()
67 auto font = buildFontCollection("Ascii.ttf"); in TEST() local
72 MinikinPaint paint(font); in TEST()
89 auto font = buildFontCollection("Bbox.ttf"); in TEST() local
94 MinikinPaint paint(font); in TEST()
107 auto font = buildFontCollection("Bbox.ttf"); in TEST() local
112 MinikinPaint paint(font); in TEST()
125 auto font = buildFontCollection("Ascii.ttf"); in TEST() local
[all …]
/frameworks/native/include/android/
Dfont.h104 void AFont_close(AFont* _Nullable font) __INTRODUCED_IN(29);
126 const char* _Nonnull AFont_getFontFilePath(const AFont* _Nonnull font) __INTRODUCED_IN(29);
196 uint16_t AFont_getWeight(const AFont* _Nonnull font) __INTRODUCED_IN(29);
206 bool AFont_isItalic(const AFont* _Nonnull font) __INTRODUCED_IN(29);
220 const char* _Nullable AFont_getLocale(const AFont* _Nonnull font) __INTRODUCED_IN(29);
234 size_t AFont_getCollectionIndex(const AFont* _Nonnull font) __INTRODUCED_IN(29);
267 size_t AFont_getAxisCount(const AFont* _Nonnull font) __INTRODUCED_IN(29);
282 uint32_t AFont_getAxisTag(const AFont* _Nonnull font, uint32_t axisIndex)
297 float AFont_getAxisValue(const AFont* _Nonnull font, uint32_t axisIndex)
/frameworks/base/libs/hwui/hwui/
DMinikinSkia.cpp48 static void MinikinFontSkia_SetSkiaFont(const minikin::MinikinFont* font, SkFont* skFont, in MinikinFontSkia_SetSkiaFont() argument
56 MinikinFontSkia::populateSkFont(skFont, font, fakery); in MinikinFontSkia_SetSkiaFont()
148 uint32_t MinikinFontSkia::packFontFlags(const SkFont& font) { in packFontFlags() argument
149 uint32_t flags = (unsigned)font.getHinting() << 16; in packFontFlags()
150 flags |= (unsigned)font.getEdging() << 8; in packFontFlags()
151 flags |= font.isEmbolden() << minikin::Embolden_Shift; in packFontFlags()
152 flags |= font.isLinearMetrics() << minikin::LinearMetrics_Shift; in packFontFlags()
153 flags |= font.isSubpixel() << minikin::Subpixel_Shift; in packFontFlags()
154 flags |= font.isEmbeddedBitmaps() << minikin::EmbeddedBitmaps_Shift; in packFontFlags()
155 flags |= font.isForceAutoHinting() << minikin::ForceAutoHinting_Shift; in packFontFlags()
[all …]
DPaintImpl.cpp147 static uint32_t fontToLegacyFlags(const SkFont& font) { in fontToLegacyFlags() argument
149 flags |= -(int)font.isEmbolden() & sFakeBoldFlag; in fontToLegacyFlags()
150 flags |= -(int)font.isLinearMetrics() & sLinearMetrics; in fontToLegacyFlags()
151 flags |= -(int)font.isSubpixel() & sSubpixelMetrics; in fontToLegacyFlags()
152 flags |= -(int)font.isEmbeddedBitmaps() & sEmbeddedBitmaps; in fontToLegacyFlags()
153 flags |= -(int)font.isForceAutoHinting() & sForceAutoHinting; in fontToLegacyFlags()
162 static void applyLegacyFlagsToFont(uint32_t flags, SkFont* font) { in applyLegacyFlagsToFont() argument
163 font->setEmbolden ((flags & sFakeBoldFlag) != 0); in applyLegacyFlagsToFont()
164 font->setLinearMetrics ((flags & sLinearMetrics) != 0); in applyLegacyFlagsToFont()
165 font->setSubpixel ((flags & sSubpixelMetrics) != 0); in applyLegacyFlagsToFont()
[all …]
/frameworks/base/graphics/java/android/graphics/fonts/
DFontFamily.java94 public Builder(@NonNull Font font) { in Builder() argument
95 Preconditions.checkNotNull(font, "font can not be null"); in Builder()
96 mStyles.append(makeStyleIdentifier(font), 0); in Builder()
97 mFonts.add(font); in Builder()
114 public @NonNull Builder addFont(@NonNull Font font) { in addFont() argument
115 Preconditions.checkNotNull(font, "font can not be null"); in addFont()
116 int key = makeStyleIdentifier(font); in addFont()
118 throw new IllegalArgumentException(font + " has already been added"); in addFont()
121 mFonts.add(font); in addFont()
194 private static int makeStyleIdentifier(@NonNull Font font) { in makeStyleIdentifier() argument
[all …]
DFont.java241 public Builder(@NonNull Font font) { in Builder() argument
242 mFont = font; in Builder()
244 mBuffer = font.getBuffer(); in Builder()
245 mWeight = font.getStyle().getWeight(); in Builder()
246 mItalic = font.getStyle().getSlant(); in Builder()
247 mAxes = font.getAxes(); in Builder()
248 mFile = font.getFile(); in Builder()
249 mTtcIndex = font.getTtcIndex(); in Builder()
481 final Font font; in build() local
485 font = new Font(ptr); in build()
[all …]
/frameworks/base/tools/fonts/
Dfontchain_linter.py93 def open_font(font): argument
94 font_file, index = font
102 def get_best_cmap(font): argument
103 ttfont = open_font(font)
109 assert bmp_cmap is None, 'More than one BMP cmap in %s' % (font, )
113 'More than one UCS-4 cmap in %s' % (font, ))
119 def get_variation_sequences_cmap(font): argument
120 ttfont = open_font(font)
125 assert vs_cmap is None, 'More than one VS cmap in %s' % (font, )
130 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, recalcTimestamp=False)
23 update_font_revision(font, args.revision)
24 font.save(args.output)
/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/minikin/include/minikin/
DMinikinPaint.h51 MinikinPaint(const std::shared_ptr<FontCollection>& font) in MinikinPaint()
61 font(font) {} in MinikinPaint()
75 std::shared_ptr<FontCollection> font; member
92 fontFeatureSettings == paint.fontFeatureSettings && font.get() == paint.font.get();
107 .update(font->getId()) in hash()
DLayout.h39 LayoutGlyph(FakedFont font, uint32_t glyph_id, uint32_t cluster, float x, float y) in LayoutGlyph()
40 : font(font), glyph_id(glyph_id), cluster(cluster), x(x), y(y) {} in LayoutGlyph()
41 FakedFont font; member
51 std::optional<std::string> psName = FontFileParser(g.font.hbFont()).getPostScriptName();
133 const Font* getFont(int i) const { return mGlyphs[i].font.font.get(); } in getFont()
134 const std::shared_ptr<Font>& getFontRef(int i) const { return mGlyphs[i].font.font; } in getFontRef()
135 FontFakery getFakery(int i) const { return mGlyphs[i].font.fakery; } in getFakery()
136 const std::shared_ptr<MinikinFont>& typeface(int i) const { return mGlyphs[i].font.typeface(); } in typeface()
/frameworks/base/core/java/android/graphics/fonts/
DFontUpdateRequest.java131 public static void writeToXml(TypedXmlSerializer out, Font font) throws IOException { in writeToXml() argument
132 out.attribute(null, ATTR_POSTSCRIPT_NAME, font.getPostScriptName()); in writeToXml()
133 out.attributeInt(null, ATTR_INDEX, font.getIndex()); in writeToXml()
134 out.attributeInt(null, ATTR_WEIGHT, font.getFontStyle().getWeight()); in writeToXml()
135 out.attributeInt(null, ATTR_SLANT, font.getFontStyle().getSlant()); in writeToXml()
136 out.attribute(null, ATTR_AXIS, font.getFontVariationSettings()); in writeToXml()
183 Font font = (Font) o; in equals()
184 return mIndex == font.mIndex in equals()
185 && mPostScriptName.equals(font.mPostScriptName) in equals()
186 && mFontStyle.equals(font.mFontStyle) in equals()
[all …]
/frameworks/minikin/libs/minikin/
DFont.cpp66 HbFontUniquePtr font = prepareFont(mTypeface); in build() local
67 FontStyle styleFromFont = analyzeStyle(font); in build()
75 std::move(font), mLocaleListId)); in build()
196 HbFontUniquePtr font = prepareFont(typeface); in getExternalRefs() local
197 newExternalRefs = new Font::ExternalRefs(std::move(typeface), std::move(font)); in getExternalRefs()
227 HbFontUniquePtr font(hb_font_create_sub_font(parent.get())); in prepareFont() local
233 hb_font_set_variations(font.get(), variations.data(), variations.size()); in prepareFont()
234 return font; in prepareFont()
238 FontStyle Font::analyzeStyle(const HbFontUniquePtr& font) { in analyzeStyle() argument
239 HbBlob os2Table(font, MakeTag('O', 'S', '/', '2')); in analyzeStyle()
[all …]
DLayoutCore.cpp55 const MinikinFont* font; member
68 float advance = args->font->GetHorizontalAdvance(glyph, *args->paint, args->fakery); in harfbuzzGetGlyphHorizontalAdvance()
88 args->font->GetHorizontalAdvances(glyphVec.data(), count, *args->paint, args->fakery, in harfbuzzGetGlyphHorizontalAdvances()
139 static bool isColorBitmapFont(const HbFontUniquePtr& font) { in isColorBitmapFont() argument
140 HbBlob cbdt(font, HB_TAG('C', 'B', 'D', 'T')); in isColorBitmapFont()
144 static inline hb_codepoint_t determineHyphenChar(hb_codepoint_t preferredHyphen, hb_font_t* font) { in determineHyphenChar() argument
149 if (hb_font_get_nominal_glyph(font, preferredHyphen, &glyph)) { in determineHyphenChar()
161 if (!hb_font_get_nominal_glyph(font, preferredHyphen, &glyph)) { in determineHyphenChar()
169 static inline void addHyphenToHbBuffer(const HbBufferUniquePtr& buffer, const HbFontUniquePtr& font, in addHyphenToHbBuffer() argument
173 hb_buffer_add(buffer.get(), determineHyphenChar(chars[i], font.get()), cluster); in addHyphenToHbBuffer()
[all …]
DFontFamily.cpp111 const auto& font = parent->mFonts[i]; in FontFamily() local
114 if (font->isAxisSupported(axis.axisTag)) { in FontFamily()
120 overriddenFonts.emplace_back(std::make_shared<Font>(font, axesOverride)); in FontFamily()
275 for (const auto& font : fonts) { in writeVector() local
276 font->writeTo(writer); in writeVector()
313 Font* font = mFonts[i].get(); in getClosestMatch() local
314 int match = computeMatch(font->style(), style); in getClosestMatch()
316 bestFont = font; in getClosestMatch()
339 const std::shared_ptr<Font>& font = getClosestMatch(FontStyle()).font; in computeCoverage() local
340 HbBlob cmapTable(font->baseFont(), MakeTag('c', 'm', 'a', 'p')); in computeCoverage()
[all …]
/frameworks/base/libs/hwui/jni/
DFontUtils.h38 explicit FontWrapper(std::shared_ptr<minikin::Font>&& font) : font(font) {} in FontWrapper()
39 std::shared_ptr<minikin::Font> font; member
/frameworks/base/services/core/java/com/android/server/graphics/fonts/
DFontManagerShellCommand.java131 @NonNull FontConfig.Font font in dumpSingleFontConfig() argument
135 sb.append(font.getStyle()); in dumpSingleFontConfig()
137 sb.append(font.getFile().getAbsolutePath()); in dumpSingleFontConfig()
138 if (font.getTtcIndex() != 0) { in dumpSingleFontConfig()
140 sb.append(font.getTtcIndex()); in dumpSingleFontConfig()
142 if (!font.getFontVariationSettings().isEmpty()) { in dumpSingleFontConfig()
144 sb.append(font.getFontVariationSettings()); in dumpSingleFontConfig()
146 if (font.getFontFamilyName() != null) { in dumpSingleFontConfig()
148 sb.append(font.getFontFamilyName()); in dumpSingleFontConfig()
152 if (font.getOriginalFile() != null) { in dumpSingleFontConfig()
[all …]

123456