/third_party/skia/tests/ |
H A D | TypefaceTest.cpp | 104 sk_sp<SkTypeface> typeface(MakeResourceAsTypeface("fonts/Em.ttf")); in DEF_TEST() 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() 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() 161 if (!typeface) { in DEF_TEST() 165 int actualCount = typeface in DEF_TEST() 231 sk_sp<SkTypeface> typeface = fm->makeFromStream(std::move(variable), 0); DEF_TEST() local 252 sk_sp<SkTypeface> typeface = fm->makeFromStream(std::move(dupTags), params); DEF_TEST() local 272 sk_sp<SkTypeface> typeface = fm->makeFromStream(std::move(distortable), params); DEF_TEST() local 294 sk_sp<SkTypeface> typeface = fm->makeFromStream(std::move(distortable), params); DEF_TEST() local 434 sk_sp<SkTypeface> typeface = fm->makeFromStream(std::move(variable), 0); DEF_TEST() local 452 sk_sp<SkTypeface> typeface = fm->makeFromStream(std::move(dupTags), 0); DEF_TEST() local 466 sk_sp<SkTypeface> typeface = fm->makeFromStream(std::move(distortable), 0); DEF_TEST() local [all...] |
H A D | TypefaceMacTest.cpp | 46 // This typeface has the issue. in DEF_TEST() 47 sk_sp<SkTypeface> typeface(SkMakeTypefaceFromCTFont(makeSystemFont(30))); in DEF_TEST() 51 //typeface = SkMakeTypefaceFromCTFont(makeSystemFont(12)); in DEF_TEST() 52 //typeface = SkTypeface::MakeFromFile("/System/Library/Fonts/SFNS.ttf"); in DEF_TEST() 55 //typeface = SkMakeTypefaceFromCTFont(makeSystemFont(17)); in DEF_TEST() 56 //typeface = SkMakeTypefaceFromCTFont(makeSystemFont(17.01)); in DEF_TEST() 59 //typeface = SkMakeTypefaceFromCTFont(makeSystemFont(95.9)); in DEF_TEST() 60 //typeface = SkMakeTypefaceFromCTFont(makeSystemFont(96)); in DEF_TEST() 62 if (!typeface) { in DEF_TEST() 63 REPORTER_ASSERT(reporter, typeface); in DEF_TEST() [all...] |
H A D | FontTest.cpp | 32 SkTypeface* typeface; in serialize_deserialize() local 33 typefaces->copyToArray((SkRefCnt**)&typeface); in serialize_deserialize() 34 SkASSERT(typeface == font.getTypeface()); in serialize_deserialize() 98 for (const sk_sp<SkTypeface>& typeface : typefaces) { in DEF_TEST() 99 font.setTypeface(typeface); in DEF_TEST()
|
H A D | SerializationTest.cpp | 340 static sk_sp<SkData> serialize_typeface_proc(SkTypeface* typeface, void* ctx) { in serialize_typeface_proc() argument 341 // Write out typeface ID followed by entire typeface. in serialize_typeface_proc() 343 sk_sp<SkData> data(typeface->serialize(SkTypeface::SerializeBehavior::kDoIncludeData)); in serialize_typeface_proc() 344 uint32_t typeface_id = typeface->uniqueID(); in serialize_typeface_proc() 362 sk_sp<SkTypeface> typeface = SkTypeface::MakeDeserialize(stream); in deserialize_typeface_proc() local 363 return typeface; in deserialize_typeface_proc() 366 static void serialize_and_compare_typeface(sk_sp<SkTypeface> typeface, in serialize_and_compare_typeface() argument 371 // Create a font with the typeface. in serialize_and_compare_typeface() 374 SkFont font(std::move(typeface), 3 in serialize_and_compare_typeface() 412 sk_sp<SkTypeface> typeface = fm->makeFromStream(std::move(distortable), params); makeDistortableWithNonDefaultAxes() local 431 auto typeface = MakeResourceAsTypeface("fonts/test.ttc", 1); TestPictureTypefaceSerialization() local 442 auto typeface = makeDistortableWithNonDefaultAxes(reporter); TestPictureTypefaceSerialization() local 453 TestTypefaceSerialization(skiatest::Reporter* reporter, sk_sp<SkTypeface> typeface) TestTypefaceSerialization() argument [all...] |
H A D | FontNamesTest.cpp | 157 sk_sp<SkTypeface> typeface(set->createTypeface(j)); in test_systemfonts() 160 typeface->getFamilyName(&familyName); in test_systemfonts() 166 typeface->createFamilyNameIterator()); in test_systemfonts() 175 size_t nameTableSize = typeface->getTableSize(nameTag); in test_systemfonts() 180 size_t copied = typeface->getTableData(nameTag, 0, nameTableSize, nameTableData.get()); in test_systemfonts()
|
/third_party/skia/modules/skparagraph/src/ |
H A D | TypefaceFontProvider.cpp | 27 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& familyName) { in registerTypeface() argument 44 if (typeface != nullptr) { in registerTypeface() 50 (*found)->appendTypeface(std::move(typeface)); in registerTypeface() 89 void TypefaceFontStyleSet::appendTypeface(sk_sp<SkTypeface> typeface) { in appendTypeface() argument 90 if (typeface.get() != nullptr) { in appendTypeface() 91 fStyles.emplace_back(std::move(typeface)); in appendTypeface() [all...] |
H A D | FontCollection.cpp | 16 RSTypeface* typeface = fontMgr->MatchFamilyStyle(familyName, style); in RSLegacyMakeTypeface() local 17 if (typeface == nullptr && familyName != nullptr) { in RSLegacyMakeTypeface() 18 typeface = fontMgr->MatchFamilyStyle(nullptr, style); in RSLegacyMakeTypeface() 21 if (typeface) { in RSLegacyMakeTypeface() 22 return std::shared_ptr<RSTypeface>(typeface); in RSLegacyMakeTypeface() 319 sk_sp<SkTypeface> typeface(manager->matchFamilyStyleCharacter( 322 std::shared_ptr<RSTypeface> typeface(manager->MatchFamilyStyleCharacter( 325 if (typeface != nullptr) { 326 return typeface; 406 sk_sp<SkTypeface> FontCollection::CloneTypeface(sk_sp<SkTypeface> typeface, argument [all...] |
H A D | OneLineShaper.cpp | 450 for (const auto& typeface : typefaces) { 451 if (visitor(typeface) == Resolved::Everything) { 491 sk_sp<SkTypeface> typeface; local 493 std::shared_ptr<RSTypeface> typeface; local 499 typeface = *found; 502 typeface = found->second; 505 typeface = fParagraph->fFontCollection->defaultFallback( 508 if (typeface == nullptr) { 513 fFallbackFonts.set(fontKey, typeface); 515 fFallbackFonts.emplace(fontKey, typeface); 612 auto typeface = typefaces.size() ? typefaces.front() : nullptr; global() local [all...] |
H A D | FontArguments.cpp | 59 sk_sp<SkTypeface> FontArguments::CloneTypeface(sk_sp<SkTypeface> typeface) const { in CloneTypeface() 76 return typeface->makeClone(args); in CloneTypeface() 79 std::shared_ptr<RSTypeface> FontArguments::CloneTypeface(std::shared_ptr<RSTypeface> typeface) const in CloneTypeface() 97 return typeface->MakeClone(args); in CloneTypeface()
|
/third_party/skia/src/pdf/ |
H A D | SkPDFFont.cpp | 106 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 in GetUnicodeMap() 225 SkPDFFont(sk_sp<SkTypeface> typeface, SkGlyphID firstGlyphID, SkGlyphID lastGlyphID, SkAdvancedTypefaceMetrics::FontType fontType, SkPDFIndirectReference indirectReference) SkPDFFont() argument 484 type3_descriptor(SkPDFDocument* doc, const SkTypeface* typeface, SkScalar xHeight) type3_descriptor() argument 518 make_small_strike(const SkTypeface& typeface) make_small_strike() argument 530 SkTypeface* typeface = pdfFont.typeface(); emit_subset_type3() local 685 CanEmbedTypeface(SkTypeface* typeface, SkPDFDocument* doc) CanEmbedTypeface() argument [all...] |
H A D | SkPDFType1Font.cpp | 228 const SkTypeface* typeface, in make_type1_font_descriptor() 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() 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() 272 SkFontID fontID = typeface->uniqueID(); in type1_font_descriptor() 276 const SkAdvancedTypefaceMetrics* info = SkPDFFont::GetMetrics(typeface, do in type1_font_descriptor() 227 make_type1_font_descriptor(SkPDFDocument* doc, const SkTypeface* typeface, const SkAdvancedTypefaceMetrics* info) make_type1_font_descriptor() argument 257 type_1_glyphnames(SkPDFDocument* canon, const SkTypeface* typeface) type_1_glyphnames() argument 270 type1_font_descriptor(SkPDFDocument* doc, const SkTypeface* typeface) type1_font_descriptor() argument 284 SkTypeface* typeface = pdfFont.typeface(); SkPDFEmitType1Font() local [all...] |
H A D | SkPDFFont.h | 36 /** Returns the typeface represented by this class. Returns nullptr for the 37 * default typeface. 39 SkTypeface* typeface() const { return fTypeface.get(); } in typeface() function in SkPDFFont 81 /** Get the font resource for the passed typeface and glyphID. The 86 * @param typeface The typeface to find, not nullptr. 91 SkTypeface* typeface); 94 * @param typeface can not be nullptr. 95 * @return nullptr only when typeface is bad. 97 static const SkAdvancedTypefaceMetrics* GetMetrics(const SkTypeface* typeface, [all...] |
/third_party/skia/tools/fonts/ |
H A D | TestFontMgr.cpp | 31 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)); variable 179 if (!typeface) { 180 typeface = fDefaultTypeface; 182 return typeface; [all...] |
H A D | ToolUtilsFont.cpp | 32 sk_sp<SkTypeface> typeface = MakeResourceAsTypeface(filename); in planet_typeface() 33 if (typeface) { in planet_typeface() 34 return typeface; in planet_typeface() 51 sk_sp<SkTypeface> typeface = MakeResourceAsTypeface(filename); in emoji_typeface() 52 if (typeface) { in emoji_typeface() 53 return typeface; in emoji_typeface()
|
H A D | create_test_font_color.cpp | 19 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/skia/src/ports/ |
H A D | SkScalerContext_win_dw.cpp | 51 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 in has_bitmap_strike() 263 DWriteFontTypeface* typeface = this->getDWriteTypeface(); SkScalerContext_DW() local 430 DWriteFontTypeface* typeface = this->getDWriteTypeface(); generateAdvance() local 487 DWriteFontTypeface* typeface = this->getDWriteTypeface(); getBoundingBox() local 970 DWriteFontTypeface* typeface = this->getDWriteTypeface(); drawDWMask() local [all...] |
/third_party/skia/src/ports/skia_ohos/ |
H A D | SkFontMgr_ohos.cpp | 84 /*! To get a matched typeface 87 * \return An object of typeface which is closest matching to 'style' 88 * \n Return the typeface in the default font style set, if family name is null 105 /*! To get a matched typeface 106 * \n Use the system fallback to find a typeface for the given character. 107 * \param familyName the family name which the typeface is fallback For 112 * \return An object of typeface which is for the given character 113 * \return Return the typeface in the default fallback set, if familyName is null 114 * \return Return null, if the typeface is not found for the given character 159 sk_sp<SkTypeface> typeface in onMatchFamilyStyleCharacter() local 215 sk_sp<SkTypeface> typeface = FontConfig_OHOS::matchFontStyle(tpSet, style); findTypeface() local 225 sk_sp<SkTypeface> typeface = FontConfig_OHOS::matchFontStyle(tpSet, style); findTypeface() local 279 onMatchFaceStyle(const SkTypeface* typeface, const SkFontStyle& style) const onMatchFaceStyle() argument 375 SkTypeface* typeface = this->onMatchFamilyStyle(familyName, style); onLegacyMakeTypeface() local 399 sk_sp<SkTypeface_OHOS> typeface = fontConfig->getTypefaceSP(i, j); onGetSystemFonts() local [all...] |
H A D | SkFontStyleSet_ohos.cpp | 22 /*! To get the count of typeface 23 * \return The count of typeface in this font style set 30 /*! To get the font style for the specified typeface 31 * \param the index of a typeface 41 SkTypeface* typeface = fontConfig_->getTypeface(styleIndex, index, isFallback); in getStyle() local 42 if (typeface == nullptr) { in getStyle() 47 *style = typeface->fontStyle(); in getStyle() 65 unsigned int i = typeface->fontStyle().weight() / 100; in getStyle() 74 /*! To create a typeface 75 * \param index the index of the typeface i [all...] |
/third_party/skia/modules/canvaskit/htmlcanvas/ |
H A D | font.js | 71 var typeface = getFromFontCache(descriptors); 72 descriptors['typeface'] = typeface; 76 // null means use the default typeface (which is currently NotoMono) 88 function addToFontCache(typeface, descriptors) { 94 // preload with a fallback to this typeface 96 '*': typeface, 99 fontCache[fam][key] = typeface;
|
/third_party/skia/modules/canvaskit/npm_build/ |
H A D | textapi_utils.js | 203 typeface: null, 222 if (src.typeface && this.typeface !== src.typeface) { 223 this.typeface = src.typeface; 264 _font: make_default_font(style.typeface), 354 if (!block || (block.typeface === s.typeface && block.size === s.size)) { 356 block = { length: 0, typeface [all...] |
/third_party/skia/src/core/ |
H A D | SkTypeface.cpp | 109 sk_sp<SkTypeface> GetVarFont(sk_sp<SkTypeface> typeface, const SkFontArguments& args) in GetVarFont() argument 111 if (!typeface) { in GetVarFont() 116 hash ^= std::hash<uint32_t>()(typeface->uniqueID()); in GetVarFont() 129 auto varTypeface = SkFontMgr::RefDefault()->makeFromStream(typeface->openStream(&ttcIndex), args); in GetVarFont() 131 return typeface; in GetVarFont() 285 sk_sp<SkTypeface> typeface = defaultFm->makeFromStream(desc.detachStream(), args); in MakeDeserialize() local 286 if (typeface) { in MakeDeserialize() 287 return typeface; in MakeDeserialize() 291 auto typeface = SkTypeface::MakeFromName(desc.getFamilyName(), desc.getStyle()); in MakeDeserialize() local 292 if (desc.getVariationCoordinateCount() > 0 && typeface) { in MakeDeserialize() [all...] |
/third_party/skia/demos.skia.org/demos/textedit/ |
H A D | textapi_utils.js | 183 typeface: null, 201 if (src.typeface && this.typeface !== src.typeface) { 202 this.typeface = src.typeface; 253 _font: make_default_font(style.typeface), 335 if (!block || (block.typeface === s.typeface && block.size === s.size)) { 337 block = { length: 0, typeface [all...] |
/third_party/skia/gm/ |
H A D | fontscalerdistortable.cpp | 49 sk_sp<SkTypeface> typeface[rows][cols]; member in skiagm::FontScalerDistortableGM 81 typeface[row][col] = [&]() -> sk_sp<SkTypeface> { 110 font.setTypeface(typeface[row][col] ? typeface[row][col] : nullptr);
|
H A D | fontmgr.cpp | 48 // find typeface containing the requested character and draw it in drawCharacter() 51 sk_sp<SkTypeface> typeface(fm->matchFamilyStyleCharacter(fontName, fontStyle, in drawCharacter() 53 font.setTypeface(typeface); in drawCharacter() 56 if (nullptr == typeface) { in drawCharacter() 60 // repeat the process, but this time use the family name of the typeface in drawCharacter() 64 typeface->getFamilyName(&familyName); in drawCharacter() 65 font.setTypeface(fm->legacyMakeTypeface(familyName.c_str(), typeface->fontStyle())); in drawCharacter() 352 SkTypeface* typeface = font.getTypefaceOrDefault(); variable 353 if (typeface && 0 < typeface [all...] |
/third_party/skia/src/fonts/ |
H A D | SkFontMgr_indirect.cpp | 123 sk_sp<SkTypeface> typeface(fImpl->makeFromStream(std::move(stream), id.fTtcIndex)); in createTypefaceFromFontId() 124 if (typeface.get() == nullptr) { in createTypefaceFromFontId() 129 typeface->weak_ref(); in createTypefaceFromFontId() 132 newEntry.fTypeface = typeface.get(); // weak reference passed to new entry. in createTypefaceFromFontId() 134 return typeface.release(); in createTypefaceFromFontId()
|