Home
last modified time | relevance | path

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

1234

/frameworks/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 …]
/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.cpp191 xmlNode* font = firstElement(family, FONT_TAG); in findFirstFontNode() local
192 while (font == nullptr) { in findFirstFontNode()
197 font = firstElement(family, FONT_TAG); in findFirstFontNode()
199 return font; in findFirstFontNode()
256 const minikin::Font* font = runs[0].fakedFont.font; in AFontMatcher_match() local
259 reinterpret_cast<android::MinikinFontSkia*>(font->typeface().get()); in AFontMatcher_match()
261 result->mWeight = font->style().weight(); in AFontMatcher_match()
262 result->mItalic = font->style().slant() == minikin::FontStyle::Slant::ITALIC; in AFontMatcher_match()
305 std::unique_ptr<AFont> font = std::make_unique<AFont>(); in ASystemFontIterator_next() local
306 copyFont(ite->mXmlDoc, ite->mFontNode, font.get(), "/system/fonts/"); in ASystemFontIterator_next()
[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/minikin/tests/unittest/
DFontTest.cpp29 Font font = Font::Builder(minikinFont).build(); in TEST() local
31 Font copied(font); in TEST()
32 EXPECT_EQ(font.typeface(), copied.typeface()); in TEST()
33 EXPECT_EQ(font.style(), copied.style()); in TEST()
34 EXPECT_EQ(font.baseFont(), copied.baseFont()); in TEST()
37 Font copied = font; in TEST()
38 EXPECT_EQ(font.typeface(), copied.typeface()); in TEST()
39 EXPECT_EQ(font.style(), copied.style()); in TEST()
40 EXPECT_EQ(font.baseFont(), copied.baseFont()); in TEST()
DLayoutCoreTest.cpp80 EXPECT_TRUE(layout.fontAt(0).font); in TEST()
93 EXPECT_TRUE(layout.fontAt(0).font); in TEST()
94 EXPECT_TRUE(layout.fontAt(1).font); in TEST()
109 EXPECT_TRUE(layout.fontAt(0).font); in TEST()
110 EXPECT_TRUE(layout.fontAt(1).font); in TEST()
136 EXPECT_TRUE(layout.fontAt(0).font); in TEST()
137 EXPECT_TRUE(layout.fontAt(1).font); in TEST()
152 EXPECT_TRUE(layout.fontAt(0).font); in TEST()
153 EXPECT_TRUE(layout.fontAt(1).font); in TEST()
174 EXPECT_TRUE(layout.fontAt(0).font); in TEST()
[all …]
DMeasuredTextTest.cpp33 auto font = buildFontCollection("Ascii.ttf"); in TEST() local
37 MinikinPaint paint1(font); in TEST()
41 MinikinPaint paint2(font); in TEST()
62 auto font = buildFontCollection("Ascii.ttf"); in TEST() local
65 MinikinPaint paint(font); in TEST()
80 auto font = buildFontCollection("Ascii.ttf"); in TEST() local
84 MinikinPaint paint(font); in TEST()
87 MinikinPaint paint2(font); in TEST()
105 auto font = buildFontCollection("Ascii.ttf"); in TEST() local
108 MinikinPaint paint(font); in TEST()
[all …]
/frameworks/base/tools/fonts/
Dfontchain_linter.py76 def open_font(font): argument
77 font_file, index = font
85 def get_best_cmap(font): argument
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): argument
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): argument
[all …]
/frameworks/native/include/android/
Dfont.h102 void AFont_close(AFont* _Nullable font) __INTRODUCED_IN(29);
122 const char* _Nonnull AFont_getFontFilePath(const AFont* _Nonnull font) __INTRODUCED_IN(29);
190 uint16_t AFont_getWeight(const AFont* _Nonnull font) __INTRODUCED_IN(29);
198 bool AFont_isItalic(const AFont* _Nonnull font) __INTRODUCED_IN(29);
210 const char* _Nullable AFont_getLocale(const AFont* _Nonnull font) __INTRODUCED_IN(29);
222 size_t AFont_getCollectionIndex(const AFont* _Nonnull font) __INTRODUCED_IN(29);
253 size_t AFont_getAxisCount(const AFont* _Nonnull font) __INTRODUCED_IN(29);
266 uint32_t AFont_getAxisTag(const AFont* _Nonnull font, uint32_t axisIndex)
279 float AFont_getAxisValue(const AFont* _Nonnull font, uint32_t axisIndex)
/frameworks/base/graphics/java/android/graphics/fonts/
DFontFamily.java77 public Builder(@NonNull Font font) { in Builder() argument
78 Preconditions.checkNotNull(font, "font can not be null"); in Builder()
79 mStyleHashSet.add(makeStyleIdentifier(font)); in Builder()
80 mFonts.add(font); in Builder()
97 public @NonNull Builder addFont(@NonNull Font font) { in addFont() argument
98 Preconditions.checkNotNull(font, "font can not be null"); in addFont()
99 if (!mStyleHashSet.add(makeStyleIdentifier(font))) { in addFont()
100 throw new IllegalArgumentException(font + " has already been added"); in addFont()
102 mFonts.add(font); in addFont()
127 private static int makeStyleIdentifier(@NonNull Font font) { in makeStyleIdentifier() argument
[all …]
/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.cpp136 static uint32_t fontToLegacyFlags(const SkFont& font) { in fontToLegacyFlags() argument
138 flags |= -(int)font.isEmbolden() & sFakeBoldFlag; in fontToLegacyFlags()
139 flags |= -(int)font.isLinearMetrics() & sLinearMetrics; in fontToLegacyFlags()
140 flags |= -(int)font.isSubpixel() & sSubpixelMetrics; in fontToLegacyFlags()
141 flags |= -(int)font.isEmbeddedBitmaps() & sEmbeddedBitmaps; in fontToLegacyFlags()
142 flags |= -(int)font.isForceAutoHinting() & sForceAutoHinting; in fontToLegacyFlags()
157 static void applyLegacyFlagsToFont(uint32_t flags, SkFont* font) { in applyLegacyFlagsToFont() argument
158 font->setEmbolden ((flags & sFakeBoldFlag) != 0); in applyLegacyFlagsToFont()
159 font->setLinearMetrics ((flags & sLinearMetrics) != 0); in applyLegacyFlagsToFont()
160 font->setSubpixel ((flags & sSubpixelMetrics) != 0); in applyLegacyFlagsToFont()
[all …]
DMinikinUtils.cpp33 const SkFont& font = paint->getSkFont(); in prepareMinikinPaint() local
38 font.isLinearMetrics() ? font.getSize() : static_cast<int>(font.getSize()); in prepareMinikinPaint()
39 minikinPaint.scaleX = font.getScaleX(); in prepareMinikinPaint()
40 minikinPaint.skewX = font.getSkewX(); in prepareMinikinPaint()
43 minikinPaint.fontFlags = MinikinFontSkia::packFontFlags(font); in prepareMinikinPaint()
/frameworks/minikin/libs/minikin/
DFontFamily.cpp46 HbFontUniquePtr font = prepareFont(mTypeface); in build() local
47 FontStyle styleFromFont = analyzeStyle(font); in build()
54 return Font(std::move(mTypeface), FontStyle(mWeight, mSlant), std::move(font)); in build()
71 HbFontUniquePtr font(hb_font_create_sub_font(parent.get())); in prepareFont() local
77 hb_font_set_variations(font.get(), variations.data(), variations.size()); in prepareFont()
78 return font; in prepareFont()
82 FontStyle Font::analyzeStyle(const HbFontUniquePtr& font) { in analyzeStyle() argument
83 HbBlob os2Table(font, MinikinFont::MakeTag('O', 'S', '/', '2')); in analyzeStyle()
150 const Font& font = mFonts[i]; in getClosestMatch() local
151 int match = computeMatch(font.style(), style); in getClosestMatch()
[all …]
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 …]
/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 …]
DFontFamily_Delegate.java50 import sun.font.FontUtilities;
226 for (FontInfo font : mFonts.keySet()) { in getFont()
227 int match = computeMatch(font, desiredStyle); in getFont()
230 bestFont = font; in getFont()
341 /*package*/ static boolean nAddFont(long builderPtr, ByteBuffer font, int ttcIndex,
348 /*package*/ static boolean nAddFontWeightStyle(long builderPtr, ByteBuffer font,
413 Font font = Font.createFont(Font.TRUETYPE_FONT, fontStream);
415 fontInfo.mFont = font;
417 fontInfo.mWeight = FontUtilities.getFont2D(font).getWeight();
423 (FontUtilities.getFont2D(font).getStyle() & Font.ITALIC) != 0;
[all …]
/frameworks/layoutlib/bridge/src/android/graphics/fonts/
DFontFamily_Builder_Delegate.java81 Font_Builder_Delegate font = Font_Builder_Delegate.sBuilderManager.getDelegate(fontPtr); in nAddFont() local
82 if (builder != null && font != null) { in nAddFont()
83 builder.addFont(font.mBuffer, font.mTtcIndex, font.mWeight, font.mItalic); in nAddFont()
133 for (FontInfo font : mFonts.keySet()) {
134 int match = computeMatch(font, desiredStyle);
137 bestFont = font;
168 Font font = loadFont(buffer);
169 if (font == null) {
173 fontInfo.mFont = font;
DFont_Builder_Delegate.java107 Font_Builder_Delegate font = sBuilderManager.getDelegate(builderPtr); in nBuild() local
108 if (font != null) { in nBuild()
109 font.mBuffer = buffer; in nBuild()
110 font.mWeight = weight; in nBuild()
111 font.mItalic = italic; in nBuild()
112 font.mTtcIndex = ttcIndex; in nBuild()
113 font.filePath = filePath; in nBuild()
/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/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 MinikinFont* getFont(int i) const { return mGlyphs[i].font.font->typeface().get(); } in getFont()
88 FontFakery getFakery(int i) const { return mGlyphs[i].font.fakery; } in getFakery()
/frameworks/base/core/jni/android/graphics/
DFontUtils.h37 FontWrapper(minikin::Font&& font) : font(std::move(font)) {} in FontWrapper()
38 minikin::Font font; member

1234