/frameworks/base/libs/hwui/jni/ |
D | Typeface.cpp | 112 Typeface* typeface = (fallbackPtr == 0) ? nullptr : toTypeface(fallbackPtr); in Typeface_createFromArray() local 119 return toJLong(Typeface::createFromFamilies(std::move(familyVec), weight, italic, typeface)); in Typeface_createFromArray() 203 void write(minikin::BufferWriter* writer, const minikin::MinikinFont* typeface) const override; 269 const minikin::MinikinFont* typeface) const { in write() 273 const std::string& path = typeface->GetFontPath(); in write() 275 writer->write<int>(typeface->GetFontIndex()); in write() 276 const std::vector<minikin::FontVariation>& axes = typeface->GetAxes(); in write() 282 minikin::FontFileParser parser(typeface->GetFontData(), typeface->GetFontSize(), in write() 283 typeface->GetFontIndex()); in write() 311 for (Typeface* typeface : typefaces) { in Typeface_writeTypefaces() [all …]
|
D | Paint.cpp | 109 static int breakText(JNIEnv* env, const Paint& paint, const Typeface* typeface, in breakText() argument 116 MinikinUtils::measureText(&paint, static_cast<minikin::Bidi>(bidiFlags), typeface, text, 0, in breakText() 146 const Typeface* typeface = paint->getAndroidTypeface(); in breakTextC() local 163 count = breakText(env, *paint, typeface, text + index, count, maxWidth, in breakTextC() 175 const Typeface* typeface = paint->getAndroidTypeface(); in breakTextS() local 179 …count = breakText(env, *paint, typeface, text, count, maxWidth, bidiFlags, jmeasuredWidth, forward… in breakTextS() 184 static jfloat doTextAdvances(JNIEnv *env, Paint *paint, const Typeface* typeface, in doTextAdvances() argument 208 paint, static_cast<minikin::Bidi>(bidiFlags), typeface, text, start, count, in doTextAdvances() 220 const Typeface* typeface = paint->getAndroidTypeface(); in getTextAdvances___CIIIII_FI() local 222 jfloat result = doTextAdvances(env, paint, typeface, textArray + contextIndex, in getTextAdvances___CIIIII_FI() [all …]
|
/frameworks/base/graphics/java/android/graphics/ |
D | Typeface.java | 330 Typeface typeface = FontsContract.getFontSync(request); in createFromResources() local 331 return typeface == null ? DEFAULT : typeface; in createFromResources() 334 Typeface typeface = findFromCache(mgr, path); in createFromResources() local 335 if (typeface != null) return typeface; in createFromResources() 377 typeface = new Typeface.CustomFallbackBuilder(family) in createFromResources() 385 typeface = Typeface.DEFAULT; in createFromResources() 391 sDynamicTypefaceCache.put(key, typeface); in createFromResources() 393 return typeface; in createFromResources() 405 Typeface typeface = sDynamicTypefaceCache.get(key); in findFromCache() local 406 if (typeface != null) { in findFromCache() [all …]
|
D | LeakyTypefaceStorage.java | 52 public static void writeTypefaceToParcel(@Nullable Typeface typeface, @NonNull Parcel parcel) { in writeTypefaceToParcel() argument 56 final Integer i = sTypefaceMap.get(typeface); in writeTypefaceToParcel() 61 sStorage.add(typeface); in writeTypefaceToParcel() 62 sTypefaceMap.put(typeface, id); in writeTypefaceToParcel()
|
/frameworks/base/libs/hwui/hwui/ |
D | MinikinUtils.cpp | 35 const Typeface* typeface) { in prepareMinikinPaint() argument 36 const Typeface* resolvedFace = Typeface::resolveDefault(typeface); in prepareMinikinPaint() 64 const Typeface* typeface, const uint16_t* buf, in doLayout() argument 68 minikin::MinikinPaint minikinPaint = prepareMinikinPaint(paint, typeface); in doLayout() 87 void MinikinUtils::getBounds(const Paint* paint, minikin::Bidi bidiFlags, const Typeface* typeface, in getBounds() argument 89 minikin::MinikinPaint minikinPaint = prepareMinikinPaint(paint, typeface); in getBounds() 100 const Typeface* typeface, const uint16_t* buf, size_t start, in measureText() argument 103 minikin::MinikinPaint minikinPaint = prepareMinikinPaint(paint, typeface); in measureText() 117 const Typeface* typeface, const uint16_t* buf, in getFontExtent() argument 119 minikin::MinikinPaint minikinPaint = prepareMinikinPaint(paint, typeface); in getFontExtent() [all …]
|
D | MinikinUtils.h | 43 const Typeface* typeface); 46 const Typeface* typeface, const uint16_t* buf, 51 static void getBounds(const Paint* paint, minikin::Bidi bidiFlags, const Typeface* typeface, 54 static float measureText(const Paint* paint, minikin::Bidi bidiFlags, const Typeface* typeface, 59 const Typeface* typeface, const uint16_t* buf, 62 static bool hasVariationSelector(const Typeface* typeface, uint32_t codepoint, 78 const minikin::MinikinFont* nextFont = layout.typeface(i).get(); in forFontRun()
|
D | Typeface.cpp | 145 : families[0]->getClosestMatch(defaultStyle).typeface().get(); in createFromFamilies() 192 sk_sp<SkTypeface> typeface = fm->makeFromStream(std::move(fontData)); in setRobotoTypefaceForTest() local 193 LOG_ALWAYS_FATAL_IF(typeface == nullptr, "Failed to make typeface from %s", kRobotoFont); in setRobotoTypefaceForTest() 196 std::make_shared<MinikinFontSkia>(std::move(typeface), 0, data, st.st_size, kRobotoFont, in setRobotoTypefaceForTest()
|
D | Canvas.cpp | 91 const Paint& origPaint, const Typeface* typeface, minikin::MeasuredText* mt) { in drawText() argument 100 minikin::Layout layout = MinikinUtils::doLayout(&paint, bidiFlags, typeface, text, textSize, in drawText() 200 const Paint& origPaint, const Typeface* typeface) { in drawTextOnPath() argument 210 MinikinUtils::doLayout(&paint, bidiFlags, typeface, text, count, // text buffer in drawTextOnPath()
|
/frameworks/minikin/libs/minikin/ |
D | Font.cpp | 112 std::shared_ptr<MinikinFont> typeface = in Font() local 114 HbFontUniquePtr hbFont = prepareFont(typeface); in Font() 115 mExternalRefsHolder.exchange(new ExternalRefs(std::move(typeface), std::move(hbFont))); in Font() 119 std::shared_ptr<MinikinFont> typeface = in Font() local 121 HbFontUniquePtr hbFont = prepareFont(typeface); in Font() 122 return new ExternalRefs(std::move(typeface), std::move(hbFont)); in Font() 194 std::shared_ptr<MinikinFont> typeface = in getExternalRefs() local 196 HbFontUniquePtr font = prepareFont(typeface); in getExternalRefs() 197 newExternalRefs = new Font::ExternalRefs(std::move(typeface), std::move(font)); in getExternalRefs() 214 HbFontUniquePtr Font::prepareFont(const std::shared_ptr<MinikinFont>& typeface) { in prepareFont() argument [all …]
|
D | LayoutCore.cpp | 320 const std::shared_ptr<MinikinFont>& typeface = fakedFont.typeface(); in LayoutPiece() local 321 auto it = fontMap.find(typeface.get()); in LayoutPiece() 327 fontMap.insert(std::make_pair(typeface.get(), font_ix)); in LayoutPiece() 333 new SkiaArguments({fakedFont.typeface().get(), &paint, fakedFont.fakery}), in LayoutPiece() 350 typeface->GetFontExtent(&verticalExtent, paint, fakedFont.fakery); in LayoutPiece() 504 fakedFont.typeface()->GetBounds(&bounds, glyphId, paint, fakedFont.fakery); in calculateBounds()
|
/frameworks/layoutlib/bridge/src/android/graphics/ |
D | Typeface_Delegate.java | 60 Typeface typeface = Typeface.findFromCache(context.getAssets(), path); in createFromDisk() local 61 if (typeface != null) { in createFromDisk() 62 return typeface; in createFromDisk() 82 typeface = Typeface.createFromResources(entry, context.getAssets(), path); in createFromDisk() 95 typeface = new Typeface.Builder(context.getAssets(), path, false, 0).build(); in createFromDisk() 98 return typeface; in createFromDisk()
|
/frameworks/base/libs/hwui/tests/unit/ |
D | UnderlineTest.cpp | 71 sk_sp<SkTypeface> typeface(fm->makeFromStream(std::move(fontData))); in buildFamily() local 72 LOG_ALWAYS_FATAL_IF(typeface == nullptr, "Failed to make typeface from %s", fileName); in buildFamily() 74 std::make_shared<MinikinFontSkia>(std::move(typeface), 0, data, st.st_size, fileName, 0, in buildFamily() 90 minikin::Layout doLayout(const std::vector<uint16_t> text, Paint paint, Typeface* typeface) { in doLayout() argument 91 return MinikinUtils::doLayout(&paint, minikin::Bidi::LTR, typeface, text.data(), text.size(), in doLayout() 104 std::unique_ptr<Typeface> typeface(makeTypeface()); in processFunctor() local 105 minikin::Layout layout = doLayout(text, *paint, typeface.get()); in processFunctor()
|
D | TypefaceTests.cpp | 61 sk_sp<SkTypeface> typeface(fm->makeFromStream(std::move(fontData))); in buildFamily() local 62 LOG_ALWAYS_FATAL_IF(typeface == nullptr, "Failed to make typeface from %s", fileName); in buildFamily() 64 std::make_shared<MinikinFontSkia>(std::move(typeface), 0, data, st.st_size, fileName, 0, in buildFamily() 435 std::unique_ptr<Typeface> typeface( in TEST() local 438 EXPECT_EQ(400, typeface->fStyle.weight()); in TEST() 439 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, typeface->fStyle.slant()); in TEST() 445 std::unique_ptr<Typeface> typeface( in TEST() local 448 EXPECT_EQ(700, typeface->fStyle.weight()); in TEST() 449 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, typeface->fStyle.slant()); in TEST()
|
/frameworks/minikin/include/minikin/ |
D | Font.h | 110 Builder(const std::shared_ptr<MinikinFont>& typeface) : mTypeface(typeface) {} in Builder() argument 184 ExternalRefs(std::shared_ptr<MinikinFont>&& typeface, HbFontUniquePtr&& baseFont) in ExternalRefs() argument 185 : mTypeface(std::move(typeface)), mBaseFont(std::move(baseFont)) {} in ExternalRefs() 199 Font(std::shared_ptr<MinikinFont>&& typeface, FontStyle style, HbFontUniquePtr&& baseFont, in Font() argument 201 : mExternalRefsHolder(new ExternalRefs(std::move(typeface), std::move(baseFont))), in Font() 214 static HbFontUniquePtr prepareFont(const std::shared_ptr<MinikinFont>& typeface); 248 const std::shared_ptr<MinikinFont>& typeface() const { in typeface() function
|
/frameworks/base/libs/hwui/jni/text/ |
D | TextShaper.cpp | 48 const Paint& paint, const Typeface* typeface) { in shapeTextRun() argument 50 minikin::MinikinPaint minikinPaint = MinikinUtils::prepareMinikinPaint(&paint, typeface); in shapeTextRun() 52 minikin::Layout layout = MinikinUtils::doLayout(&paint, bidiFlags, typeface, in shapeTextRun() 62 layout.typeface(i)->GetFontExtent(&extent, minikinPaint, layout.getFakery(i)); in shapeTextRun() 79 const Typeface* typeface = paint->getAndroidTypeface(); in TextShaper_shapeTextRunChars() local 86 *paint, typeface); in TextShaper_shapeTextRunChars() 95 const Typeface* typeface = paint->getAndroidTypeface(); in TextShaper_shapeTextRunString() local 102 *paint, typeface); in TextShaper_shapeTextRunString()
|
/frameworks/base/core/java/android/text/style/ |
D | TypefaceSpan.java | 78 public TypefaceSpan(@NonNull Typeface typeface) { in TypefaceSpan() argument 79 this(null, typeface); in TypefaceSpan() 90 private TypefaceSpan(@Nullable String family, @Nullable Typeface typeface) { in TypefaceSpan() argument 92 mTypeface = typeface; in TypefaceSpan()
|
/frameworks/minikin/tests/unittest/ |
D | FontTest.cpp | 52 const auto& typeface = font.baseTypeface(); in TEST() local 53 EXPECT_NE(nullptr, typeface); in TEST() 54 EXPECT_EQ(typeface, font.baseTypeface()); in TEST() 78 std::shared_ptr<MinikinFont> typeface = moveFrom.baseTypeface(); in TEST() local 81 EXPECT_EQ(typeface, moveTo.baseTypeface()); in TEST() 109 std::shared_ptr<MinikinFont> typeface = moveFrom.baseTypeface(); in TEST() local 114 EXPECT_EQ(typeface, moveTo.baseTypeface()); in TEST() 133 std::shared_ptr<MinikinFont> typeface = moveFrom.baseTypeface(); in TEST() local 139 EXPECT_EQ(typeface, moveTo.baseTypeface()); in TEST()
|
/frameworks/base/apct-tests/perftests/core/src/android/graphics/perftests/ |
D | TypefaceSerializationPerfTest.java | 112 for (Typeface typeface : out.values()) { in testDeserializeFontMap() 113 typeface.releaseNativeObjectForTest(); in testDeserializeFontMap() 144 for (Typeface typeface : out.values()) { in testDeserializeFontMap_memory() 145 typeface.releaseNativeObjectForTest(); in testDeserializeFontMap_memory()
|
D | TypefaceCreatePerfTest.java | 94 Typeface typeface = new Typeface.Builder(mgr, path).build(); in createFromNonAsset() local 95 if (typeface != null) return typeface; in createFromNonAsset()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/animation/ |
D | TextAnimatorTest.kt | 145 typeface = Typeface.createFromFile("/system/fonts/Roboto-Regular.ttf") in testCacheTypeface() 157 val prevTypeface = paint.typeface in testCacheTypeface() 161 assertThat(paint.typeface).isNotSameInstanceAs(prevTypeface) in testCacheTypeface() 165 assertThat(paint.typeface).isSameInstanceAs(prevTypeface) in testCacheTypeface()
|
/frameworks/base/core/tests/coretests/src/android/graphics/ |
D | TypefaceSystemFallbackTest.java | 890 private static void assertA3emFontIsUsed(Typeface typeface) { in assertA3emFontIsUsed() argument 892 assertNotNull(typeface); in assertA3emFontIsUsed() 893 paint.setTypeface(typeface); in assertA3emFontIsUsed() 899 private static void assertB3emFontIsUsed(Typeface typeface) { in assertB3emFontIsUsed() argument 901 assertNotNull(typeface); in assertB3emFontIsUsed() 902 paint.setTypeface(typeface); in assertB3emFontIsUsed() 944 Typeface typeface = fontMap.get("named-family"); in testBuildSystemFallback__Customization_locale_prepend() local 947 assertB3emFontIsUsed(typeface); in testBuildSystemFallback__Customization_locale_prepend() 960 Typeface typeface = fontMap.get("named-family"); in testBuildSystemFallback__Customization_locale_replace() local 963 assertB3emFontIsUsed(typeface); in testBuildSystemFallback__Customization_locale_replace() [all …]
|
/frameworks/base/core/tests/coretests/src/android/provider/ |
D | FontsContractE2ETest.java | 92 public void onTypefaceRetrieved(Typeface typeface) { in onTypefaceRetrieved() argument 93 mTypeface = typeface; in onTypefaceRetrieved() 163 Typeface typeface = FontsContract.buildTypeface( in typefaceNotCacheTest() local 173 assertNotSame(typeface, typeface2); in typefaceNotCacheTest()
|
/frameworks/base/core/java/android/provider/ |
D | FontsContract.java | 383 Typeface typeface = buildTypeface(sContext, null, result.getFonts()); in getFontSync() local 384 if (typeface != null) { in getFontSync() 385 sTypefaceCache.put(id, typeface); in getFontSync() 387 holder.set(typeface); in getFontSync() 490 public void onTypefaceRetrieved(Typeface typeface) {} in onTypefaceRetrieved() argument 594 final Typeface typeface = buildTypeface(context, cancellationSignal, fonts); in requestFonts() local 595 if (typeface == null) { in requestFonts() 603 sTypefaceCache.put(request.getIdentifier(), typeface); in requestFonts() local 604 callerThreadHandler.post(() -> callback.onTypefaceRetrieved(typeface)); in requestFonts()
|
/frameworks/base/core/java/com/android/internal/widget/ |
D | SubtitleView.java | 197 public void setTypeface(Typeface typeface) { in setTypeface() argument 198 if (mTextPaint.getTypeface() != typeface) { in setTypeface() 199 mTextPaint.setTypeface(typeface); in setTypeface() 288 final Typeface typeface = style.getTypeface(); in setStyle() local 289 setTypeface(typeface); in setStyle()
|
/frameworks/base/services/core/java/com/android/server/graphics/fonts/ |
D | OtfFontFileParser.java | 90 Typeface typeface = new Typeface.CustomFallbackBuilder(family).build(); in tryToCreateTypeface() local 94 p.setTypeface(typeface); in tryToCreateTypeface()
|