/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/lottie/lottie/src/main/java/com/airbnb/lottie/manager/ |
D | FontAssetManager.java | 57 Typeface typeface = fontMap.get(tempPair); in getTypeface() local 58 if (typeface != null) { in getTypeface() 59 return typeface; in getTypeface() 62 typeface = typefaceForStyle(typefaceWithDefaultStyle, style); in getTypeface() 63 fontMap.put(tempPair, typeface); in getTypeface() 64 return typeface; in getTypeface() 73 Typeface typeface = null; in getFontFamily() local 75 typeface = delegate.fetchFont(fontFamily); in getFontFamily() 78 if (delegate != null && typeface == null) { in getFontFamily() 81 typeface = Typeface.createFromAsset(assetManager, path); in getFontFamily() [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/tests/ |
D | TypefaceTest.cpp | 104 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() 182 auto test = [&](SkTypeface* typeface, const Variation& expected, int alsoAcceptedAxisTagCount) { in DEF_TEST() argument 183 if (!typeface) { in DEF_TEST() 187 int actualCount = typeface->getVariationDesignPosition(nullptr, 0); in DEF_TEST() [all …]
|
D | TypefaceMacTest.cpp | 47 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()
|
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() local 99 font.setTypeface(typeface); in DEF_TEST()
|
D | SerializationTest.cpp | 340 static sk_sp<SkData> serialize_typeface_proc(SkTypeface* typeface, void* ctx) { in serialize_typeface_proc() argument 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 374 SkFont font(std::move(typeface), 30); in serialize_and_compare_typeface() 412 sk_sp<SkTypeface> typeface = fm->makeFromStream(std::move(distortable), params); in makeDistortableWithNonDefaultAxes() local 413 if (!typeface) { in makeDistortableWithNonDefaultAxes() 417 int count = typeface->getVariationDesignPosition(nullptr, 0); in makeDistortableWithNonDefaultAxes() [all …]
|
/external/skia/modules/skparagraph/src/ |
D | TypefaceFontProvider.cpp | 31 size_t TypefaceFontProvider::registerTypeface(sk_sp<SkTypeface> typeface) { in registerTypeface() argument 32 if (typeface == nullptr) { in registerTypeface() 37 typeface->getFamilyName(&familyName); in registerTypeface() 39 return registerTypeface(std::move(typeface), std::move(familyName)); in registerTypeface() 42 size_t TypefaceFontProvider::registerTypeface(sk_sp<SkTypeface> typeface, const SkString& familyNam… in registerTypeface() argument 53 (*found)->appendTypeface(std::move(typeface)); in registerTypeface() 82 void TypefaceFontStyleSet::appendTypeface(sk_sp<SkTypeface> typeface) { in appendTypeface() argument 83 if (typeface.get() != nullptr) { in appendTypeface() 84 fStyles.emplace_back(std::move(typeface)); in appendTypeface()
|
/external/skia/src/pdf/ |
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->countGlyphs()); in GetUnicodeMap() [all …]
|
D | SkPDFType1Font.cpp | 228 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 …]
|
/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()
|
/external/skia/tools/fonts/ |
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() 181 sk_sp<SkTypeface> typeface = sk_sp<SkTypeface>(this->matchFamilyStyle(familyName, style)); in onLegacyMakeTypeface() local 182 if (!typeface) { in onLegacyMakeTypeface() 183 typeface = fDefaultTypeface; in onLegacyMakeTypeface() 185 return typeface; in onLegacyMakeTypeface()
|
D | ToolUtilsFont.cpp | 32 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()
|
D | create_test_font_color.cpp | 17 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()
|
/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/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/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/skia/modules/canvaskit/tests/ |
D | font.spec.js | 248 const typeface = fontMgr.MakeTypefaceFromData(fontType.buffer); constant 249 const font = new CanvasKit.Font(typeface, 24); 251 if (font && typeface) { 257 typeface && typeface.delete(); 264 const typeface = fontMgr.MakeTypefaceFromData(fetchedByteBuffers[3]); constant 265 expect(typeface).toBeTruthy('.ttc font'); 266 if (typeface) { 268 typeface.delete(); 280 const typeface = fontMgr.MakeTypefaceFromData(notoSerifFontBuffer); constant 289 const font = new CanvasKit.Font(typeface, fontSizes[idx]); [all …]
|
/external/skia/modules/canvaskit/npm_build/ |
D | textapi_utils.js | 203 typeface: null, 221 if (src.typeface && this.typeface !== src.typeface) { 222 this.typeface = src.typeface; 260 _font: make_default_font(style.typeface), 350 if (!block || (block.typeface === s.typeface && block.size === s.size)) { 352 block = { length: 0, typeface: s.typeface, size: s.size }; property 357 block = { length: s._length, typeface: s.typeface, size: s.size }; property 361 blocks.push({ length: s._length, typeface: s.typeface, size: s.size }); property
|
/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/docs/dev/testing/ |
D | fonts.md | 22 Each gm specifies the typeface to use when drawing text. For now, to set the 23 portable typeface on the paint, call: 30 To create a portable typeface, use: 33 SkTypeface* typeface = ToolUtils::create_portable_typeface(const char* name,
|
/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()
|