/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/shadows/ |
D | ShadowTypefaceTest.java | 30 Typeface typeface = Typeface.create("roboto", Typeface.BOLD); in create_withFamilyName_shouldCreateTypeface() local 31 assertThat(typeface.getStyle()).isEqualTo(Typeface.BOLD); in create_withFamilyName_shouldCreateTypeface() 32 assertThat(shadowOf(typeface).getFontDescription().getFamilyName()).isEqualTo("roboto"); in create_withFamilyName_shouldCreateTypeface() 33 assertThat(shadowOf(typeface).getFontDescription().getStyle()).isEqualTo(Typeface.BOLD); in create_withFamilyName_shouldCreateTypeface() 38 Typeface typeface = Typeface.create(Typeface.create("roboto", Typeface.BOLD), Typeface.ITALIC); in create_withFamily_shouldCreateTypeface() local 40 assertThat(typeface.getStyle()).isEqualTo(Typeface.ITALIC); in create_withFamily_shouldCreateTypeface() 41 assertThat(shadowOf(typeface).getFontDescription().getFamilyName()).isEqualTo("roboto"); in create_withFamily_shouldCreateTypeface() 42 assertThat(shadowOf(typeface).getFontDescription().getStyle()).isEqualTo(Typeface.ITALIC); in create_withFamily_shouldCreateTypeface() 47 Typeface typeface = Typeface.create((Typeface) null, Typeface.ITALIC); in create_withoutFamily_shouldCreateTypeface() local 48 assertThat(typeface.getStyle()).isEqualTo(Typeface.ITALIC); in create_withoutFamily_shouldCreateTypeface() [all …]
|
/external/skqp/src/pdf/ |
D | SkPDFFont.cpp | 107 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 …]
|
D | SkPDFFont.h | 34 SkTypeface* typeface() const { return fTypeface.get(); } in typeface() function 88 SkTypeface* typeface, 95 static const SkAdvancedTypefaceMetrics* GetMetrics(const SkTypeface* typeface, 98 static const std::vector<SkUnichar>& GetUnicodeMap(const SkTypeface* typeface,
|
/external/skia/src/pdf/ |
D | SkPDFFont.cpp | 108 const SkAdvancedTypefaceMetrics* SkPDFFont::GetMetrics(const SkTypeface* typeface, in GetMetrics() argument 110 SkASSERT(typeface); in GetMetrics() 111 SkFontID id = typeface->uniqueID(); in GetMetrics() 115 int count = typeface->countGlyphs(); in GetMetrics() 121 std::unique_ptr<SkAdvancedTypefaceMetrics> metrics = typeface->getAdvancedMetrics(); in GetMetrics() 129 font.setTypeface(sk_ref_sp(typeface)); in GetMetrics() 158 const std::vector<SkUnichar>& SkPDFFont::GetUnicodeMap(const SkTypeface* typeface, in GetUnicodeMap() argument 160 SkASSERT(typeface); in GetUnicodeMap() 162 SkFontID id = typeface->uniqueID(); in GetUnicodeMap() 166 std::vector<SkUnichar> buffer(typeface->countGlyphs()); in GetUnicodeMap() [all …]
|
D | SkPDFFont.h | 34 SkTypeface* typeface() const { return fTypeface.get(); } in typeface() function 88 SkTypeface* typeface, 95 static const SkAdvancedTypefaceMetrics* GetMetrics(const SkTypeface* typeface, 98 static const std::vector<SkUnichar>& GetUnicodeMap(const SkTypeface* typeface,
|
/external/skqp/tools/fonts/ |
D | SkTestFontMgr.cpp | 30 TypefaceEntry(sk_sp<SkTypeface> typeface, SkFontStyle style, const char* styleName) in TypefaceEntry() 31 : fTypeface(std::move(typeface)) in TypefaceEntry() 67 sk_sp<SkTestTypeface> typeface = in FontMgr() local 72 fDefaultTypeface = typeface; in FontMgr() 77 … family->fTypefaces.emplace_back(std::move(typeface), sub.fStyle, sub.fStyleName); in FontMgr() 88 … fFamilies.back()->fTypefaces.emplace_back(std::move(typeface), sub.fStyle, sub.fStyleName); in FontMgr() 170 sk_sp<SkTypeface> typeface = sk_sp<SkTypeface>(this->matchFamilyStyle(familyName, style)); in onLegacyMakeTypeface() local 171 if (!typeface) { in onLegacyMakeTypeface() 172 typeface = fDefaultTypeface; in onLegacyMakeTypeface() 174 return typeface; in onLegacyMakeTypeface()
|
D | create_test_font_color.cpp | 19 sk_sp<SkTestSVGTypeface> typeface = SkTestSVGTypeface::Default(); in main() local 22 typeface->exportTtxCbdt(&cbdt); in main() 27 typeface->exportTtxSbix(&sbix); in main() 32 typeface->exportTtxColr(&colr); in main()
|
D | sk_tool_utils_font.cpp | 31 sk_sp<SkTypeface> typeface = MakeResourceAsTypeface(filename); in emoji_typeface() local 32 if (typeface) { in emoji_typeface() 33 return typeface; in emoji_typeface()
|
/external/skia/tools/fonts/ |
D | SkTestFontMgr.cpp | 30 TypefaceEntry(sk_sp<SkTypeface> typeface, SkFontStyle style, const char* styleName) in TypefaceEntry() 31 : fTypeface(std::move(typeface)) in TypefaceEntry() 67 sk_sp<SkTestTypeface> typeface = in FontMgr() local 72 fDefaultTypeface = typeface; in FontMgr() 77 … family->fTypefaces.emplace_back(std::move(typeface), sub.fStyle, sub.fStyleName); in FontMgr() 88 … fFamilies.back()->fTypefaces.emplace_back(std::move(typeface), sub.fStyle, sub.fStyleName); in FontMgr() 170 sk_sp<SkTypeface> typeface = sk_sp<SkTypeface>(this->matchFamilyStyle(familyName, style)); in onLegacyMakeTypeface() local 171 if (!typeface) { in onLegacyMakeTypeface() 172 typeface = fDefaultTypeface; in onLegacyMakeTypeface() 174 return typeface; in onLegacyMakeTypeface()
|
D | create_test_font_color.cpp | 19 sk_sp<SkTestSVGTypeface> typeface = SkTestSVGTypeface::Default(); in main() local 22 typeface->exportTtxCbdt(&cbdt); in main() 27 typeface->exportTtxSbix(&sbix); in main() 32 typeface->exportTtxColr(&colr); in main()
|
D | sk_tool_utils_font.cpp | 31 sk_sp<SkTypeface> typeface = MakeResourceAsTypeface(filename); in emoji_typeface() local 32 if (typeface) { in emoji_typeface() 33 return typeface; in emoji_typeface()
|
/external/skia/tests/ |
D | TypefaceTest.cpp | 100 sk_sp<SkTypeface> typeface(MakeResourceAsTypeface("fonts/7630.otf")); in DEF_TEST() local 101 if (!typeface) { in DEF_TEST() 107 std::unique_ptr<SkStreamAsset> stream = typeface->openStream(&fontIndex); in DEF_TEST() 156 sk_sp<SkTypeface> typeface = fm->makeFromStream(std::move(distortable), params); in DEF_TEST() local 158 if (!typeface) { in DEF_TEST() 163 int count = typeface->getVariationDesignPosition(nullptr, 0); in DEF_TEST() 170 count = typeface->getVariationDesignPosition(positionRead, SK_ARRAY_COUNT(positionRead)); in DEF_TEST() 192 sk_sp<SkTypeface> typeface = fm->makeFromStream(std::move(distortable), params); in DEF_TEST() local 193 if (!typeface) { in DEF_TEST() 199 int count = typeface->getVariationDesignPosition(nullptr, 0); in DEF_TEST() [all …]
|
/external/skqp/tests/ |
D | TypefaceTest.cpp | 100 sk_sp<SkTypeface> typeface(MakeResourceAsTypeface("fonts/7630.otf")); in DEF_TEST() local 101 if (!typeface) { in DEF_TEST() 107 std::unique_ptr<SkStreamAsset> stream(typeface->openStream(&fontIndex)); in DEF_TEST() 156 sk_sp<SkTypeface> typeface = fm->makeFromStream(std::move(distortable), params); in DEF_TEST() local 158 if (!typeface) { in DEF_TEST() 163 int count = typeface->getVariationDesignPosition(nullptr, 0); in DEF_TEST() 170 count = typeface->getVariationDesignPosition(positionRead, SK_ARRAY_COUNT(positionRead)); in DEF_TEST() 192 sk_sp<SkTypeface> typeface = fm->makeFromStream(std::move(distortable), params); in DEF_TEST() local 193 if (!typeface) { in DEF_TEST() 199 int count = typeface->getVariationDesignPosition(nullptr, 0); in DEF_TEST() [all …]
|
/external/skia/include/atlastext/ |
D | SkAtlasTextFont.h | 18 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()
|
/external/skqp/include/atlastext/ |
D | SkAtlasTextFont.h | 18 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()
|
/external/skqp/experimental/canvaskit/htmlcanvas/ |
D | font.js | 71 var typeface = getFromFontCache(descriptors); 72 descriptors['typeface'] = typeface; 88 function addToFontCache(typeface, descriptors) { argument 96 '*': typeface, 99 fontCache[fam][key] = typeface;
|
/external/skia/modules/canvaskit/htmlcanvas/ |
D | font.js | 71 var typeface = getFromFontCache(descriptors); 72 descriptors['typeface'] = typeface; 88 function addToFontCache(typeface, descriptors) { argument 96 '*': typeface, 99 fontCache[fam][key] = typeface;
|
/external/skqp/gm/ |
D | atlastext.cpp | 29 uint32_t color, sk_sp<SkTypeface> typeface, float size) { in draw_string() argument 33 auto atlas_font = SkAtlasTextFont::Make(typeface, size); in draw_string() 36 typeface->charsToGlyphs(text.c_str(), SkTypeface::Encoding::kUTF8_Encoding, glyphs.get(), cnt); in draw_string() 41 font.setTypeface(std::move(typeface)); in draw_string() 116 for (const auto& typeface : fTypefaces) { in drawText() local 137 draw_string(fTarget.get(), text, drawX, drawY, color, typeface, size); in drawText()
|
/external/skia/gm/ |
D | atlastext.cpp | 29 uint32_t color, sk_sp<SkTypeface> typeface, float size) { in draw_string() argument 33 auto atlas_font = SkAtlasTextFont::Make(typeface, size); in draw_string() 36 typeface->charsToGlyphs(text.c_str(), SkTypeface::Encoding::kUTF8_Encoding, glyphs.get(), cnt); in draw_string() 41 font.setTypeface(std::move(typeface)); in draw_string() 117 for (const auto& typeface : fTypefaces) { in drawText() local 138 draw_string(fTarget.get(), text, drawX, drawY, color, typeface, size); in drawText()
|
/external/skqp/site/dev/testing/ |
D | fonts.md | 17 Each gm specifies the typeface to use when drawing text. For now, to set the 18 portable typeface on the paint, call: 25 To create a portable typeface, use: 28 SkTypeface* typeface = sk_tool_utils::create_portable_typeface(const char* name,
|
/external/skia/site/dev/testing/ |
D | fonts.md | 17 Each gm specifies the typeface to use when drawing text. For now, to set the 18 portable typeface on the paint, call: 25 To create a portable typeface, use: 28 SkTypeface* typeface = sk_tool_utils::create_portable_typeface(const char* name,
|
/external/skia/src/core/ |
D | SkStrikeCache.cpp | 145 const SkTypeface& typeface) { in CreateScalerContext() argument 146 auto scaler = typeface.createScalerContext(effects, &desc, true /* can fail */); in CreateScalerContext() 154 scaler = typeface.createScalerContext(effects, &desc, false /* must succeed */); in CreateScalerContext() 160 const SkDescriptor& desc, const SkScalerContextEffects& effects, const SkTypeface& typeface) in FindOrCreateStrikeExclusive() argument 162 return GlobalStrikeCache()->findOrCreateStrikeExclusive(desc, effects, typeface); in FindOrCreateStrikeExclusive() 166 const SkDescriptor& desc, const SkScalerContextEffects& effects, const SkTypeface& typeface) in findOrCreateStrikeExclusive() argument 168 return SkExclusiveStrikePtr(this->findOrCreateStrike(desc, effects, typeface)); in findOrCreateStrikeExclusive() 173 const SkTypeface& typeface) -> Node* { in findOrCreateStrike() argument 176 auto scaler = CreateScalerContext(desc, effects, typeface); in findOrCreateStrike() 184 const SkTypeface& typeface) { in findOrCreateScopedStrike() argument [all …]
|
D | SkStrikeInterface.h | 39 const SkTypeface& typeface, in SkStrikeSpec() argument 42 , fTypeface{typeface} 46 const SkTypeface& typeface() const { return fTypeface; } in typeface() function 92 const SkTypeface& typeface) = 0;
|
D | SkRemoteGlyphCache.cpp | 332 const SkTypeface& typeface) { in findOrCreateScopedStrike() argument 333 return SkScopedStrike{this->getOrCreateCache(desc, typeface, effects)}; in findOrCreateScopedStrike() 349 const SkDescriptor& desc, const SkTypeface& typeface, SkScalerContextEffects effects) { in getOrCreateCache() argument 369 cache->setTypefaceAndEffects(&typeface, effects); in getOrCreateCache() 380 cache->setTypefaceAndEffects(&typeface, effects); in getOrCreateCache() 389 const SkFontID typefaceId = typeface.uniqueID(); in getOrCreateCache() 392 fTypefacesToSend.emplace_back(typefaceId, typeface.countGlyphs(), in getOrCreateCache() 393 typeface.fontStyle(), in getOrCreateCache() 394 typeface.isFixedPitch()); in getOrCreateCache() 397 auto context = typeface.createScalerContext(effects, &desc); in getOrCreateCache() [all …]
|
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/ |
D | ShadowPaint.java | 38 private Typeface typeface; field in ShadowPaint 161 return typeface; in getTypeface() 165 protected Typeface setTypeface(Typeface typeface) { in setTypeface() argument 166 this.typeface = typeface; in setTypeface() 167 return typeface; in setTypeface()
|