/frameworks/support/compat/src/androidTest/java/androidx/core/graphics/ |
D | TypefaceCompatTest.java | 104 private static int getSelectedFontResourceId(Typeface typeface) { in getSelectedFontResourceId() argument 111 p.setTypeface(typeface); in getSelectedFontResourceId() 154 public void onFontRetrieved(@NonNull Typeface typeface) { in onFontRetrieved() argument 155 mTypeface = typeface; in onFontRetrieved() 229 Typeface typeface = TypefaceCompat.createFromResourcesFamilyXml(mContext, in testProviderFont_xmlRequest() local 234 assertNotNull(typeface); in testProviderFont_xmlRequest() 235 assertNotEquals(Typeface.DEFAULT, typeface); in testProviderFont_xmlRequest() 241 Typeface typeface = TypefaceCompat.createFromResourcesFamilyXml(mContext, in testProviderFont_nonXmlRequest_noCallback() local 246 assertNotNull(typeface); in testProviderFont_nonXmlRequest_noCallback() 247 assertNotEquals(Typeface.DEFAULT, typeface); in testProviderFont_nonXmlRequest_noCallback() [all …]
|
/frameworks/support/compat/src/main/java/androidx/core/graphics/ |
D | TypefaceCompat.java | 104 Typeface typeface; in createFromResourcesFamilyXml() local 113 typeface = FontsContractCompat.getFontSync(context, providerEntry.getRequest(), in createFromResourcesFamilyXml() 116 typeface = sTypefaceCompatImpl.createFromFontFamilyFilesResourceEntry( in createFromResourcesFamilyXml() 119 if (typeface != null) { in createFromResourcesFamilyXml() 120 fontCallback.callbackSuccessAsync(typeface, handler); in createFromResourcesFamilyXml() 128 if (typeface != null) { in createFromResourcesFamilyXml() 129 sTypefaceCache.put(createResourceUid(resources, id, style), typeface); in createFromResourcesFamilyXml() local 131 return typeface; in createFromResourcesFamilyXml() 141 Typeface typeface = sTypefaceCompatImpl.createFromResourcesFontFile( in createFromResourcesFontFile() local 143 if (typeface != null) { in createFromResourcesFontFile() [all …]
|
/frameworks/base/graphics/java/android/graphics/ |
D | Typeface.java | 201 Typeface typeface = sDynamicTypefaceCache.get(key); in createFromResources() local 202 if (typeface != null) return typeface; in createFromResources() 213 typeface = createFromFamiliesWithDefault(families, DEFAULT_FAMILY, in createFromResources() 215 sDynamicTypefaceCache.put(key, typeface); in createFromResources() 216 return typeface; in createFromResources() 248 Typeface typeface = FontsContract.getFontSync(request); in createFromResources() local 249 return typeface == null ? DEFAULT : typeface; in createFromResources() 252 Typeface typeface = findFromCache(mgr, path); in createFromResources() local 253 if (typeface != null) return typeface; in createFromResources() 271 typeface = createFromFamiliesWithDefault(familyChain, DEFAULT_FAMILY, in createFromResources() [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/support/compat/src/main/java/androidx/core/content/res/ |
D | ResourcesCompat.java | 221 public abstract void onFontRetrieved(@NonNull Typeface typeface); in onFontRetrieved() argument 243 public final void callbackSuccessAsync(final Typeface typeface, @Nullable Handler handler) { in callbackSuccessAsync() argument 250 onFontRetrieved(typeface); in callbackSuccessAsync() 338 Typeface typeface = loadFont(context, resources, value, id, style, fontCallback, handler, in loadFont() local 340 if (typeface == null && fontCallback == null) { in loadFont() 344 return typeface; in loadFont() 370 Typeface typeface = TypefaceCompat.findFromCache(wrapper, id, style); in loadFont() local 372 if (typeface != null) { in loadFont() 374 fontCallback.callbackSuccessAsync(typeface, handler); in loadFont() 376 return typeface; in loadFont() [all …]
|
/frameworks/support/emoji/core/src/main/java/androidx/emoji/text/ |
D | MetadataRepo.java | 87 private MetadataRepo(@NonNull final Typeface typeface, in MetadataRepo() argument 89 mTypeface = typeface; in MetadataRepo() 103 public static MetadataRepo create(@NonNull final Typeface typeface, in create() argument 105 return new MetadataRepo(typeface, MetadataListReader.read(inputStream)); in create() 115 public static MetadataRepo create(@NonNull final Typeface typeface, in create() argument 117 return new MetadataRepo(typeface, MetadataListReader.read(byteBuffer)); in create() 129 final Typeface typeface = Typeface.createFromAsset(assetManager, assetPath); in create() local 130 return new MetadataRepo(typeface, MetadataListReader.read(assetManager, assetPath)); in create()
|
/frameworks/base/libs/hwui/hwui/ |
D | MinikinUtils.cpp | 31 const Typeface* typeface) { in prepareMinikinPaint() argument 32 const Typeface* resolvedFace = Typeface::resolveDefault(typeface); in prepareMinikinPaint() 51 const Typeface* typeface, const uint16_t* buf, size_t start, in doLayout() argument 53 minikin::MinikinPaint minikinPaint = prepareMinikinPaint(paint, typeface); in doLayout() 71 const Typeface* typeface, const uint16_t* buf, size_t start, in measureText() argument 73 minikin::MinikinPaint minikinPaint = prepareMinikinPaint(paint, typeface); in measureText() 85 bool MinikinUtils::hasVariationSelector(const Typeface* typeface, uint32_t codepoint, uint32_t vs) { in hasVariationSelector() argument 86 const Typeface* resolvedFace = Typeface::resolveDefault(typeface); in hasVariationSelector()
|
D | MinikinUtils.h | 43 const Typeface* typeface); 46 const Typeface* typeface, const uint16_t* buf, 51 const Typeface* typeface, const uint16_t* buf, 55 ANDROID_API static bool hasVariationSelector(const Typeface* typeface, uint32_t codepoint,
|
D | Typeface.cpp | 136 : families[0]->getClosestMatch(defaultStyle).font->typeface().get(); in createFromFamilies() 180 sk_sp<SkTypeface> typeface = SkTypeface::MakeFromStream(fontData.release()); in setRobotoTypefaceForTest() local 181 LOG_ALWAYS_FATAL_IF(typeface == nullptr, "Failed to make typeface from %s", kRobotoFont); in setRobotoTypefaceForTest() 184 std::move(typeface), data, st.st_size, 0, std::vector<minikin::FontVariation>()); in setRobotoTypefaceForTest()
|
D | Paint.h | 84 void setAndroidTypeface(Typeface* typeface) { mTypeface = typeface; } in setAndroidTypeface() argument
|
D | MinikinSkia.cpp | 27 MinikinFontSkia::MinikinFontSkia(sk_sp<SkTypeface> typeface, const void* fontData, size_t fontSize, in MinikinFontSkia() argument 29 : minikin::MinikinFont(typeface->uniqueID()) in MinikinFontSkia() 30 , mTypeface(std::move(typeface)) in MinikinFontSkia()
|
/frameworks/base/core/jni/android/graphics/ |
D | Paint.cpp | 110 static int breakText(JNIEnv* env, const Paint& paint, const Typeface* typeface, in breakText() argument 117 MinikinUtils::measureText(&paint, static_cast<minikin::Bidi>(bidiFlags), typeface, text, in breakText() 147 const Typeface* typeface = paint->getAndroidTypeface(); in breakTextC() local 164 count = breakText(env, *paint, typeface, text + index, count, maxWidth, in breakTextC() 176 const Typeface* typeface = paint->getAndroidTypeface(); in breakTextS() local 180 …count = breakText(env, *paint, typeface, text, count, maxWidth, bidiFlags, jmeasuredWidth, forward… in breakTextS() 185 static jfloat doTextAdvances(JNIEnv *env, Paint *paint, const Typeface* typeface, in doTextAdvances() argument 209 static_cast<minikin::Bidi>(bidiFlags), typeface, text, start, count, contextCount, in doTextAdvances() 221 const Typeface* typeface = paint->getAndroidTypeface(); in getTextAdvances___CIIIII_FI() local 223 jfloat result = doTextAdvances(env, paint, typeface, textArray + contextIndex, in getTextAdvances___CIIIII_FI() [all …]
|
D | HarfBuzzNGFaceSkia.cpp | 143 SkTypeface* typeface = reinterpret_cast<SkTypeface*>(userData); in harfbuzzSkiaReferenceTable() local 145 const size_t tableSize = typeface->getTableSize(tag); in harfbuzzSkiaReferenceTable() 152 size_t actualSize = typeface->getTableData(tag, 0, tableSize, buffer); in harfbuzzSkiaReferenceTable()
|
/frameworks/support/compat/src/main/java/androidx/core/provider/ |
D | FontsContractCompat.java | 191 final Typeface typeface = TypefaceCompat.createFromFontInfo( in getFontInternal() local 193 return new TypefaceResult(typeface, typeface != null in getFontInternal() 212 TypefaceResult(@Nullable Typeface typeface, in TypefaceResult() argument 214 mTypeface = typeface; in TypefaceResult() 259 TypefaceResult typeface = getFontInternal(context, request, style); in getFontSync() 260 if (typeface.mTypeface != null) { in getFontSync() 261 sTypefaceCache.put(id, typeface.mTypeface); in getFontSync() 263 return typeface; in getFontSync() 277 public void onReply(final TypefaceResult typeface) { in getFontSync() 278 if (typeface == null) { in getFontSync() [all …]
|
/frameworks/minikin/include/minikin/ |
D | FontFamily.h | 62 Builder(const std::shared_ptr<MinikinFont>& typeface) : mTypeface(typeface) {} in Builder() argument 99 inline const std::shared_ptr<MinikinFont>& typeface() const { return mTypeface; } in typeface() function 107 Font(std::shared_ptr<MinikinFont>&& typeface, FontStyle style, HbFontUniquePtr&& baseFont) in Font() argument 108 : mTypeface(std::move(typeface)), mStyle(style), mBaseFont(std::move(baseFont)) {} in Font() 110 static HbFontUniquePtr prepareFont(const std::shared_ptr<MinikinFont>& typeface);
|
/frameworks/minikin/libs/minikin/ |
D | FontFamily.cpp | 58 HbFontUniquePtr Font::prepareFont(const std::shared_ptr<MinikinFont>& typeface) { in prepareFont() argument 59 const char* buf = reinterpret_cast<const char*>(typeface->GetFontData()); in prepareFont() 60 size_t size = typeface->GetFontSize(); in prepareFont() 61 uint32_t ttcIndex = typeface->GetFontIndex(); in prepareFont() 73 variations.reserve(typeface->GetAxes().size()); in prepareFont() 74 for (const FontVariation& variation : typeface->GetAxes()) { in prepareFont() 230 minikinFont = font.typeface()->createFontWithVariation(variations); in createFamilyWithVariation() 233 minikinFont = font.typeface(); in createFamilyWithVariation()
|
/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/base/libs/hwui/ |
D | TextDropShadowCache.cpp | 36 hash = JenkinsHashMix(hash, android::hash_type(typeface)); in hash() 61 if (lhs.typeface < rhs.typeface) return -1; in compare() 62 if (lhs.typeface > rhs.typeface) return +1; in compare()
|
D | TextDropShadowCache.h | 41 , typeface(nullptr) in ShadowText() 54 , typeface(paint->getTypeface()) in ShadowText() 84 SkTypeface* typeface; member
|
/frameworks/base/core/java/android/provider/ |
D | FontsContract.java | 359 Typeface typeface = buildTypeface(sContext, null, result.getFonts()); in getFontSync() local 360 if (typeface != null) { in getFontSync() 361 sTypefaceCache.put(id, typeface); in getFontSync() 363 holder.set(typeface); in getFontSync() 462 public void onTypefaceRetrieved(Typeface typeface) {} in onTypefaceRetrieved() argument 566 final Typeface typeface = buildTypeface(context, cancellationSignal, fonts); in requestFonts() local 567 if (typeface == null) { in requestFonts() 575 sTypefaceCache.put(request.getIdentifier(), typeface); in requestFonts() local 576 callerThreadHandler.post(() -> callback.onTypefaceRetrieved(typeface)); in requestFonts()
|
/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/com/android/internal/widget/ |
D | SubtitleView.java | 196 public void setTypeface(Typeface typeface) { in setTypeface() argument 197 if (mTextPaint.getTypeface() != typeface) { in setTypeface() 198 mTextPaint.setTypeface(typeface); in setTypeface() 287 final Typeface typeface = style.getTypeface(); in setStyle() local 288 setTypeface(typeface); in setStyle()
|
/frameworks/base/libs/hwui/tests/unit/ |
D | TypefaceTests.cpp | 55 sk_sp<SkTypeface> typeface(fm->makeFromStream(std::move(fontData))); in buildFamily() local 56 LOG_ALWAYS_FATAL_IF(typeface == nullptr, "Failed to make typeface from %s", fileName); in buildFamily() 58 std::move(typeface), data, st.st_size, 0, std::vector<minikin::FontVariation>()); in buildFamily() 424 std::unique_ptr<Typeface> typeface(Typeface::createFromFamilies( in TEST() local 426 EXPECT_EQ(400, typeface->fStyle.weight()); in TEST() 427 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, typeface->fStyle.slant()); in TEST() 433 std::unique_ptr<Typeface> typeface(Typeface::createFromFamilies( in TEST() local 435 EXPECT_EQ(700, typeface->fStyle.weight()); in TEST() 436 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, typeface->fStyle.slant()); in TEST()
|
/frameworks/base/core/jni/ |
D | android_graphics_Canvas.cpp | 494 const Typeface* typeface = paint->getAndroidTypeface(); in drawTextChars() local 497 static_cast<minikin::Bidi>(bidiFlags), *paint, typeface, nullptr); in drawTextChars() 505 const Typeface* typeface = paint->getAndroidTypeface(); in drawTextString() local 509 static_cast<minikin::Bidi>(bidiFlags), *paint, typeface, nullptr); in drawTextString() 518 const Typeface* typeface = paint->getAndroidTypeface(); in drawTextRunChars() local 523 contextCount, x, y, bidiFlags, *paint, typeface, mt); in drawTextRunChars() 531 const Typeface* typeface = paint->getAndroidTypeface(); in drawTextRunString() local 538 contextCount, x, y, bidiFlags, *paint, typeface, nullptr); in drawTextRunString() 547 const Typeface* typeface = paint->getAndroidTypeface(); in drawTextOnPathChars() local 552 static_cast<minikin::Bidi>(bidiFlags), *path, hOffset, vOffset, *paint, typeface); in drawTextOnPathChars() [all …]
|
/frameworks/layoutlib/bridge/src/android/graphics/ |
D | Typeface_Delegate.java | 254 Typeface typeface = Typeface.findFromCache(context.getAssets(), path); in createFromDisk() local 255 if (typeface != null) { in createFromDisk() 256 return typeface; in createFromDisk() 288 typeface = Typeface.createFromResources(entry, context.getAssets(), path); in createFromDisk() 300 typeface = Typeface.createFromResources(context.getAssets(), path, 0); in createFromDisk() 303 return typeface; in createFromDisk()
|