Home
last modified time | relevance | path

Searched refs:typeface (Results 1 – 25 of 226) sorted by relevance

12345678910

/third_party/flutter/engine/flutter/third_party/txt/src/txt/
Dtypeface_font_asset_provider.cc50 void TypefaceFontAssetProvider::RegisterTypeface(sk_sp<SkTypeface> typeface) { in RegisterTypeface() argument
51 if (typeface == nullptr) { in RegisterTypeface()
56 typeface->getFamilyName(&sk_family_name); in RegisterTypeface()
59 RegisterTypeface(std::move(typeface), std::move(family_name)); in RegisterTypeface()
63 sk_sp<SkTypeface> typeface, in RegisterTypeface() argument
77 family_it->second->registerTypeface(std::move(typeface)); in RegisterTypeface()
84 void TypefaceFontStyleSet::registerTypeface(sk_sp<SkTypeface> typeface) { in registerTypeface() argument
85 if (typeface == nullptr) { in registerTypeface()
88 typefaces_.emplace_back(std::move(typeface)); in registerTypeface()
111 for (const sk_sp<SkTypeface>& typeface : typefaces_) in matchStyle() local
[all …]
Dfont_skia.cc26 SkTypeface* typeface = reinterpret_cast<SkTypeface*>(context); in GetTable() local
28 const size_t table_size = typeface->getTableSize(tag); in GetTable()
35 size_t actual_size = typeface->getTableData(tag, 0, table_size, buffer); in GetTable()
46 FontSkia::FontSkia(sk_sp<SkTypeface> typeface) in FontSkia() argument
47 : MinikinFont(typeface->uniqueID()), typeface_(std::move(typeface)) {} in FontSkia()
51 static void FontSkia_SetSkiaFont(sk_sp<SkTypeface> typeface, in FontSkia_SetSkiaFont() argument
54 skFont->setTypeface(std::move(typeface)); in FontSkia_SetSkiaFont()
/third_party/skia/tests/
DTypefaceTest.cpp104 sk_sp<SkTypeface> typeface(MakeResourceAsTypeface("fonts/Em.ttf")); in DEF_TEST() local
105 if (!typeface) { in DEF_TEST()
111 bool hasName = typeface->getPostScriptName(&postScriptName); in DEF_TEST()
112 bool hasName2 = typeface->getPostScriptName(nullptr); in DEF_TEST()
120 sk_sp<SkTypeface> typeface(MakeResourceAsTypeface("fonts/7630.otf")); in DEF_TEST() local
121 if (!typeface) { in DEF_TEST()
127 std::unique_ptr<SkStreamAsset> stream = typeface->openStream(&fontIndex); in DEF_TEST()
160 auto test = [&](SkTypeface* typeface, const Variation& expected, int alsoAcceptedAxisTagCount) { in DEF_TEST() argument
161 if (!typeface) { in DEF_TEST()
165 int actualCount = typeface->getVariationDesignPosition(nullptr, 0); in DEF_TEST()
[all …]
DTypefaceMacTest.cpp47 sk_sp<SkTypeface> typeface(SkMakeTypefaceFromCTFont(makeSystemFont(30))); in DEF_TEST() local
62 if (!typeface) { in DEF_TEST()
63 REPORTER_ASSERT(reporter, typeface); in DEF_TEST()
69 const int originalPositionCount = typeface->getVariationDesignPosition(nullptr, 0); in DEF_TEST()
72 typeface->getVariationDesignPosition(originalPosition.data(), originalPosition.size()); in DEF_TEST()
90 const int originalAxisCount = typeface->getVariationDesignParameters(nullptr, 0); in DEF_TEST()
93 typeface->getVariationDesignParameters(originalAxes.data(), originalAxes.size()); in DEF_TEST()
146 typeface->makeClone(SkFontArguments().setVariationDesignPosition(variationPosition))); in DEF_TEST()
/third_party/flutter/engine/flutter/third_party/txt/src/minikin/
DFontFamily.cpp69 Font::Font(const std::shared_ptr<MinikinFont>& typeface, FontStyle style) in Font() argument
70 : typeface(typeface), style(style) {} in Font()
72 Font::Font(std::shared_ptr<MinikinFont>&& typeface, FontStyle style) in Font() argument
73 : typeface(typeface), style(style) {} in Font()
77 HbBlob fvarTable(getFontTable(typeface.get(), fvarTag)); in getSupportedAxesLocked()
88 typeface = std::move(o.typeface); in Font()
90 o.typeface = nullptr; in Font()
94 typeface = o.typeface; in Font()
115 bool FontFamily::analyzeStyle(const std::shared_ptr<MinikinFont>& typeface, in analyzeStyle() argument
120 HbBlob os2Table(getFontTable(typeface.get(), os2Tag)); in analyzeStyle()
[all …]
/third_party/skia/modules/skparagraph/src/
DTypefaceFontProvider.cpp27 size_t TypefaceFontProvider::registerTypeface(sk_sp<SkTypeface> typeface) { in registerTypeface() argument
28 if (typeface == nullptr) { in registerTypeface()
33 typeface->getFamilyName(&familyName); in registerTypeface()
35 return registerTypeface(std::move(typeface), std::move(familyName)); in registerTypeface()
38 size_t TypefaceFontProvider::registerTypeface(sk_sp<SkTypeface> typeface, const SkString& familyNam… in registerTypeface() argument
49 (*found)->appendTypeface(std::move(typeface)); in registerTypeface()
78 void TypefaceFontStyleSet::appendTypeface(sk_sp<SkTypeface> typeface) { in appendTypeface() argument
79 if (typeface.get() != nullptr) { in appendTypeface()
80 fStyles.emplace_back(std::move(typeface)); in appendTypeface()
/third_party/flutter/skia/modules/skparagraph/src/
DTypefaceFontProvider.cpp25 size_t TypefaceFontProvider::registerTypeface(sk_sp<SkTypeface> typeface) { in registerTypeface() argument
26 if (typeface == nullptr) { in registerTypeface()
31 typeface->getFamilyName(&familyName); in registerTypeface()
33 return registerTypeface(std::move(typeface), std::move(familyName)); in registerTypeface()
36 size_t TypefaceFontProvider::registerTypeface(sk_sp<SkTypeface> typeface, const SkString& familyNam… in registerTypeface() argument
47 (*found)->appendTypeface(std::move(typeface)); in registerTypeface()
76 void TypefaceFontStyleSet::appendTypeface(sk_sp<SkTypeface> typeface) { in appendTypeface() argument
77 fStyles.emplace_back(std::move(typeface)); in appendTypeface()
DFontCollection.cpp76 sk_sp<SkTypeface> typeface = nullptr; in matchTypeface() local
89 typeface = std::move(match); in matchTypeface()
90 return typeface; in matchTypeface()
105 sk_sp<SkTypeface> typeface = nullptr; in matchDefaultTypeface() local
118 typeface = std::move(match); in matchDefaultTypeface()
119 return typeface; in matchDefaultTypeface()
133 sk_sp<SkTypeface> typeface(manager->matchFamilyStyleCharacter( in defaultFallback() local
135 if (typeface != nullptr) { in defaultFallback()
136 return typeface; in defaultFallback()
DFontResolver.cpp58 auto typeface = fFontCollection->matchTypeface(fontFamily.c_str(), style.getFontStyle()); in findAllFontsForStyledBlock() local
59 if (typeface.get() == nullptr) { in findAllFontsForStyledBlock()
64 auto font = makeFont(typeface, style.getFontSize(), style.getHeight()); in findAllFontsForStyledBlock()
72 auto typeface = fFontCollection->matchDefaultTypeface(style.getFontStyle()); in findAllFontsForStyledBlock() local
73 if (typeface.get() != nullptr) { in findAllFontsForStyledBlock()
75 auto font = makeFont(typeface, style.getFontSize(), style.getHeight()); in findAllFontsForStyledBlock()
85 …auto typeface = fFontCollection->defaultFallback(unicode, style.getFontStyle(), style.getLocale()); in findAllFontsForStyledBlock() local
86 if (typeface == nullptr) { in findAllFontsForStyledBlock()
89 auto font = makeFont(typeface, style.getFontSize(), style.getHeight()); in findAllFontsForStyledBlock()
95 typeface->getFamilyName(&name); in findAllFontsForStyledBlock()
[all …]
/third_party/skia/src/pdf/
DSkPDFFont.cpp106 const SkAdvancedTypefaceMetrics* SkPDFFont::GetMetrics(const SkTypeface* typeface, in GetMetrics() argument
108 SkASSERT(typeface); in GetMetrics()
109 SkFontID id = typeface->uniqueID(); in GetMetrics()
113 int count = typeface->countGlyphs(); in GetMetrics()
119 std::unique_ptr<SkAdvancedTypefaceMetrics> metrics = typeface->getAdvancedMetrics(); in GetMetrics()
127 font.setTypeface(sk_ref_sp(typeface)); in GetMetrics()
156 const std::vector<SkUnichar>& SkPDFFont::GetUnicodeMap(const SkTypeface* typeface, in GetUnicodeMap() argument
158 SkASSERT(typeface); in GetUnicodeMap()
160 SkFontID id = typeface->uniqueID(); in GetUnicodeMap()
164 std::vector<SkUnichar> buffer(typeface->countGlyphs()); in GetUnicodeMap()
[all …]
DSkPDFType1Font.cpp228 const SkTypeface* typeface, in make_type1_font_descriptor() argument
231 uint16_t emSize = SkToU16(typeface->getUnitsPerEm()); in make_type1_font_descriptor()
239 std::unique_ptr<SkStreamAsset> rawFontData = typeface->openStream(&ttcIndex); in make_type1_font_descriptor()
258 const SkTypeface* typeface) { in type_1_glyphnames() argument
259 SkFontID fontID = typeface->uniqueID(); in type_1_glyphnames()
262 std::vector<SkString> names(typeface->countGlyphs()); in type_1_glyphnames()
263 SkPDFFont::GetType1GlyphNames(*typeface, names.data()); in type_1_glyphnames()
271 const SkTypeface* typeface) { in type1_font_descriptor() argument
272 SkFontID fontID = typeface->uniqueID(); in type1_font_descriptor()
276 const SkAdvancedTypefaceMetrics* info = SkPDFFont::GetMetrics(typeface, doc); in type1_font_descriptor()
[all …]
/third_party/flutter/skia/tools/fonts/
DToolUtilsFont.cpp31 sk_sp<SkTypeface> typeface = MakeResourceAsTypeface(filename); in planet_typeface() local
32 if (typeface) { in planet_typeface()
33 return typeface; in planet_typeface()
50 sk_sp<SkTypeface> typeface = MakeResourceAsTypeface(filename); in emoji_typeface() local
51 if (typeface) { in emoji_typeface()
52 return typeface; in emoji_typeface()
DTestFontMgr.cpp31 TypefaceEntry(sk_sp<SkTypeface> typeface, SkFontStyle style, const char* styleName) in TypefaceEntry()
32 : fTypeface(std::move(typeface)), fStyle(style), fStyleName(styleName) {} in TypefaceEntry()
67 sk_sp<TestTypeface> typeface = in FontMgr() local
72 fDefaultTypeface = typeface; in FontMgr()
78 std::move(typeface), sub.fStyle, sub.fStyleName); in FontMgr()
90 std::move(typeface), in FontMgr()
187 sk_sp<SkTypeface> typeface = sk_sp<SkTypeface>(this->matchFamilyStyle(familyName, style)); in onLegacyMakeTypeface() local
188 if (!typeface) { in onLegacyMakeTypeface()
189 typeface = fDefaultTypeface; in onLegacyMakeTypeface()
191 return typeface; in onLegacyMakeTypeface()
Dcreate_test_font_color.cpp17 static void export_ttx(sk_sp<TestSVGTypeface> typeface, in export_ttx() argument
22 typeface->exportTtxCbdt(&cbdt, cbdtStrikeSizes); in export_ttx()
27 typeface->exportTtxSbix(&sbix, sbixStrikeSizes); in export_ttx()
32 typeface->exportTtxColr(&colr); in export_ttx()
/third_party/flutter/skia/src/pdf/
DSkPDFFont.cpp107 const SkAdvancedTypefaceMetrics* SkPDFFont::GetMetrics(const SkTypeface* typeface, in GetMetrics() argument
109 SkASSERT(typeface); in GetMetrics()
110 SkFontID id = typeface->uniqueID(); in GetMetrics()
114 int count = typeface->countGlyphs(); in GetMetrics()
120 std::unique_ptr<SkAdvancedTypefaceMetrics> metrics = typeface->getAdvancedMetrics(); in GetMetrics()
128 font.setTypeface(sk_ref_sp(typeface)); in GetMetrics()
157 const std::vector<SkUnichar>& SkPDFFont::GetUnicodeMap(const SkTypeface* typeface, in GetUnicodeMap() argument
159 SkASSERT(typeface); in GetUnicodeMap()
161 SkFontID id = typeface->uniqueID(); in GetUnicodeMap()
165 std::vector<SkUnichar> buffer(typeface->countGlyphs()); in GetUnicodeMap()
[all …]
DSkPDFType1Font.cpp228 const SkTypeface* typeface, in make_type1_font_descriptor() argument
231 uint16_t emSize = SkToU16(typeface->getUnitsPerEm()); in make_type1_font_descriptor()
239 std::unique_ptr<SkStreamAsset> rawFontData = typeface->openStream(&ttcIndex); in make_type1_font_descriptor()
258 const SkTypeface* typeface) { in type_1_glyphnames() argument
259 SkFontID fontID = typeface->uniqueID(); in type_1_glyphnames()
262 std::vector<SkString> names(typeface->countGlyphs()); in type_1_glyphnames()
263 SkPDFFont::GetType1GlyphNames(*typeface, names.data()); in type_1_glyphnames()
271 const SkTypeface* typeface) { in type1_font_descriptor() argument
272 SkFontID fontID = typeface->uniqueID(); in type1_font_descriptor()
276 const SkAdvancedTypefaceMetrics* info = SkPDFFont::GetMetrics(typeface, doc); in type1_font_descriptor()
[all …]
/third_party/skia/tools/fonts/
DTestFontMgr.cpp31 TypefaceEntry(sk_sp<SkTypeface> typeface, SkFontStyle style, const char* styleName) in TypefaceEntry()
32 : fTypeface(std::move(typeface)), fStyle(style), fStyleName(styleName) {} in TypefaceEntry()
67 sk_sp<TestTypeface> typeface = in FontMgr() local
72 fDefaultTypeface = typeface; in FontMgr()
78 std::move(typeface), sub.fStyle, sub.fStyleName); in FontMgr()
90 std::move(typeface), in FontMgr()
178 sk_sp<SkTypeface> typeface = sk_sp<SkTypeface>(this->matchFamilyStyle(familyName, style)); in onLegacyMakeTypeface() local
179 if (!typeface) { in onLegacyMakeTypeface()
180 typeface = fDefaultTypeface; in onLegacyMakeTypeface()
182 return typeface; in onLegacyMakeTypeface()
DToolUtilsFont.cpp32 sk_sp<SkTypeface> typeface = MakeResourceAsTypeface(filename); in planet_typeface() local
33 if (typeface) { in planet_typeface()
34 return typeface; in planet_typeface()
51 sk_sp<SkTypeface> typeface = MakeResourceAsTypeface(filename); in emoji_typeface() local
52 if (typeface) { in emoji_typeface()
53 return typeface; in emoji_typeface()
Dcreate_test_font_color.cpp19 static void export_ttx(sk_sp<TestSVGTypeface> typeface, in export_ttx() argument
24 typeface->exportTtxCbdt(&cbdt, cbdtStrikeSizes); in export_ttx()
29 typeface->exportTtxSbix(&sbix, sbixStrikeSizes); in export_ttx()
34 typeface->exportTtxColr(&colr); in export_ttx()
/third_party/flutter/skia/include/atlastext/
DSkAtlasTextFont.h18 static sk_sp<SkAtlasTextFont> Make(sk_sp<SkTypeface> typeface, SkScalar size) { in Make() argument
19 return sk_sp<SkAtlasTextFont>(new SkAtlasTextFont(std::move(typeface), size)); in Make()
22 SkTypeface* typeface() const { return fTypeface.get(); } in typeface() function
31 SkAtlasTextFont(sk_sp<SkTypeface> typeface, SkScalar size) in SkAtlasTextFont() argument
32 : fTypeface(std::move(typeface)), fSize(size) {} in SkAtlasTextFont()
/third_party/flutter/engine/flutter/lib/ui/text/
Dasset_manager_font_provider.cc92 if (!asset.typeface) { in createTypeface()
106 asset.typeface = SkTypeface::MakeFromStream(std::move(stream)); in createTypeface()
107 if (!asset.typeface) in createTypeface()
111 return SkRef(asset.typeface.get()); in createTypeface()
119 if (asset.typeface && asset.typeface->fontStyle() == pattern) in matchStyle()
120 return SkRef(asset.typeface.get()); in matchStyle()
122 return SkRef(assets_[0].typeface.get()); in matchStyle()
/third_party/skia/modules/canvaskit/htmlcanvas/
Dfont.js71 var typeface = getFromFontCache(descriptors);
72 descriptors['typeface'] = typeface;
88 function addToFontCache(typeface, descriptors) { argument
96 '*': typeface,
99 fontCache[fam][key] = typeface;
/third_party/flutter/skia/modules/canvaskit/htmlcanvas/
Dfont.js71 var typeface = getFromFontCache(descriptors);
72 descriptors['typeface'] = typeface;
88 function addToFontCache(typeface, descriptors) { argument
96 '*': typeface,
99 fontCache[fam][key] = typeface;
/third_party/flutter/skia/src/ports/skia_ohos/
DSkFontMgr_ohos.cpp158 sk_sp<SkTypeface> typeface = FontConfig_OHOS::matchFontStyle(tpSet, style); in onMatchFamilyStyleCharacter() local
159 return SkSafeRef(typeface.get()); in onMatchFamilyStyleCharacter()
214 sk_sp<SkTypeface> typeface = FontConfig_OHOS::matchFontStyle(tpSet, style); in findTypeface() local
215 return SkSafeRef(typeface.get()); in findTypeface()
224 sk_sp<SkTypeface> typeface = FontConfig_OHOS::matchFontStyle(tpSet, style); in findTypeface() local
225 return SkSafeRef(typeface.get()); in findTypeface()
278 SkTypeface* SkFontMgr_OHOS::onMatchFaceStyle(const SkTypeface* typeface, const SkFontStyle& style) … in onMatchFaceStyle() argument
280 if (typeface == nullptr) { in onMatchFaceStyle()
284 typeface->getFamilyName(&familyName); in onMatchFaceStyle()
393 SkTypeface* typeface = this->onMatchFamilyStyle(familyName, style); in onLegacyMakeTypeface() local
[all …]
/third_party/skia/src/ports/
DSkScalerContext_win_dw.cpp51 static SkSharedMutex* maybe_dw_mutex(DWriteFontTypeface& typeface) { in maybe_dw_mutex() argument
53 return typeface.fDWriteFontFace4 ? nullptr : &mutex; in maybe_dw_mutex()
99 static bool is_hinted(DWriteFontTypeface* typeface) { in is_hinted() argument
100 Exclusive l(maybe_dw_mutex(*typeface)); in is_hinted()
101 AutoTDWriteTable<SkOTTableMaximumProfile> maxp(typeface->fDWriteFontFace.get()); in is_hinted()
125 bool get_gasp_range(DWriteFontTypeface* typeface, int size, GaspRange* range) { in get_gasp_range() argument
126 AutoTDWriteTable<SkOTTableGridAndScanProcedure> gasp(typeface->fDWriteFontFace.get()); in get_gasp_range()
170 static bool has_bitmap_strike(DWriteFontTypeface* typeface, GaspRange range) { in has_bitmap_strike() argument
171 Exclusive l(maybe_dw_mutex(*typeface)); in has_bitmap_strike()
173 AutoTDWriteTable<SkOTTableEmbeddedBitmapLocation> eblc(typeface->fDWriteFontFace.get()); in has_bitmap_strike()
[all …]

12345678910