/frameworks/support/compat/src/main/java/androidx/core/graphics/ |
H A D | TypefaceCompat.java | 104 Typeface typeface; 113 typeface = FontsContractCompat.getFontSync(context, providerEntry.getRequest(), 116 typeface = sTypefaceCompatImpl.createFromFontFamilyFilesResourceEntry( 119 if (typeface != null) { 120 fontCallback.callbackSuccessAsync(typeface, handler); 128 if (typeface != null) { 129 sTypefaceCache.put(createResourceUid(resources, id, style), typeface); 131 return typeface; 141 Typeface typeface = sTypefaceCompatImpl.createFromResourcesFontFile( 143 if (typeface ! [all...] |
/frameworks/base/graphics/java/android/graphics/ |
H A D | LeakyTypefaceStorage.java | 44 * Write typeface to parcel. 49 * @param typeface A {@link Typeface} to be written. 52 public static void writeTypefaceToParcel(@Nullable Typeface typeface, @NonNull Parcel parcel) { argument 56 final Integer i = sTypefaceMap.get(typeface); 61 sStorage.add(typeface); 62 sTypefaceMap.put(typeface, id); 69 * Read typeface from parcel.
|
H A D | Typeface.java | 69 * The Typeface class specifies the typeface and intrinsic style of a font. 81 /** The default NORMAL typeface object */ 84 * The default BOLD typeface object. Note: this may be not actually be 89 /** The NORMAL style of the default sans serif typeface. */ 91 /** The NORMAL style of the default serif typeface. */ 93 /** The NORMAL style of the default monospace typeface. */ 158 // Style value for building typeface. 170 /** Returns the typeface's weight value */ 175 /** Returns the typeface's intrinsic style attributes */ 201 Typeface typeface [all...] |
/frameworks/support/compat/src/androidTest/java/androidx/core/graphics/ |
H A D | TypefaceCompatTest.java | 99 * Helper method to get the used font resource id by typeface. 101 * If the typeface is created from one of the R.font.large_a, R.font.large_b, R.font.large_c or 102 * R.font.large_d resource, this method returns the resource id used by the typeface. 104 private static int getSelectedFontResourceId(Typeface typeface) { argument 111 p.setTypeface(typeface); 154 public void onFontRetrieved(@NonNull Typeface typeface) { argument 155 mTypeface = typeface; 229 Typeface typeface = TypefaceCompat.createFromResourcesFamilyXml(mContext, 234 assertNotNull(typeface); 235 assertNotEquals(Typeface.DEFAULT, typeface); [all...] |
/frameworks/base/libs/hwui/hwui/ |
H A D | MinikinUtils.cpp | 31 const Typeface* typeface) { 32 const Typeface* resolvedFace = Typeface::resolveDefault(typeface); 51 const Typeface* typeface, const uint16_t* buf, size_t start, 53 minikin::MinikinPaint minikinPaint = prepareMinikinPaint(paint, typeface); 71 const Typeface* typeface, const uint16_t* buf, size_t start, 73 minikin::MinikinPaint minikinPaint = prepareMinikinPaint(paint, typeface); 85 bool MinikinUtils::hasVariationSelector(const Typeface* typeface, uint32_t codepoint, uint32_t vs) { argument 86 const Typeface* resolvedFace = Typeface::resolveDefault(typeface); 30 prepareMinikinPaint(const Paint* paint, const Typeface* typeface) argument 50 doLayout(const Paint* paint, minikin::Bidi bidiFlags, const Typeface* typeface, const uint16_t* buf, size_t start, size_t count, size_t bufSize, minikin::MeasuredText* mt) argument 70 measureText(const Paint* paint, minikin::Bidi bidiFlags, const Typeface* typeface, const uint16_t* buf, size_t start, size_t count, size_t bufSize, float* advances) argument
|
H A 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,
|
H A D | Paint.h | 84 void setAndroidTypeface(Typeface* typeface) { mTypeface = typeface; } argument 98 // nullptr is valid: it means the default typeface.
|
H A D | MinikinSkia.h | 31 explicit MinikinFontSkia(sk_sp<SkTypeface> typeface, const void* fontData, size_t fontSize, 58 // set typeface and fake bold/italic parameters
|
H A D | Typeface.cpp | 136 : families[0]->getClosestMatch(defaultStyle).font->typeface().get(); 180 sk_sp<SkTypeface> typeface = SkTypeface::MakeFromStream(fontData.release()); local 181 LOG_ALWAYS_FATAL_IF(typeface == nullptr, "Failed to make typeface from %s", kRobotoFont); 184 std::move(typeface), data, st.st_size, 0, std::vector<minikin::FontVariation>());
|
/frameworks/support/emoji/core/src/main/java/androidx/emoji/text/ |
H A D | MetadataRepo.java | 84 * @param typeface Typeface to be used to render emojis 87 private MetadataRepo(@NonNull final Typeface typeface, argument 89 mTypeface = typeface; 100 * @param typeface Typeface to be used to render emojis 103 public static MetadataRepo create(@NonNull final Typeface typeface, argument 105 return new MetadataRepo(typeface, MetadataListReader.read(inputStream)); 112 * @param typeface Typeface to be used to render emojis 115 public static MetadataRepo create(@NonNull final Typeface typeface, argument 117 return new MetadataRepo(typeface, MetadataListReader.read(byteBuffer)); 129 final Typeface typeface [all...] |
H A D | EmojiMetadata.java | 105 final Typeface typeface = mMetadataRepo.getTypeface(); 107 paint.setTypeface(typeface); 118 * @return return typeface to be used to render this metadata
|
/frameworks/support/compat/src/main/java/androidx/core/content/res/ |
H A D | ResourcesCompat.java | 189 * font closest to a regular weight typeface. 219 * @param typeface The font that was loaded. 221 public abstract void onFontRetrieved(@NonNull Typeface typeface); argument 243 public final void callbackSuccessAsync(final Typeface typeface, @Nullable Handler handler) { argument 250 onFontRetrieved(typeface); 279 * font closest to a regular weight typeface. 338 Typeface typeface = loadFont(context, resources, value, id, style, fontCallback, handler, 340 if (typeface == null && fontCallback == null) { 344 return typeface; 370 Typeface typeface [all...] |
/frameworks/minikin/include/minikin/ |
H A D | FontFamily.h | 62 Builder(const std::shared_ptr<MinikinFont>& typeface) : mTypeface(typeface) {} argument 99 inline const std::shared_ptr<MinikinFont>& typeface() const { return mTypeface; } function in class:minikin::Font 107 Font(std::shared_ptr<MinikinFont>&& typeface, FontStyle style, HbFontUniquePtr&& baseFont) argument 108 : mTypeface(std::move(typeface)), mStyle(style), mBaseFont(std::move(baseFont)) {} 110 static HbFontUniquePtr prepareFont(const std::shared_ptr<MinikinFont>& typeface);
|
/frameworks/base/core/java/android/text/style/ |
H A D | TypefaceSpan.java | 30 * Span that updates the typeface of the text it's attached to. The <code>TypefaceSpan</code> can 37 * <code>android:textStyle="italic"</code> and a typeface created based on a font from resources, 38 * with a bold style. When applying a <code>TypefaceSpan</code> based the typeface, the text will 45 * SpannableString string = new SpannableString("Text with typeface span."); 65 * @param family The font family for this typeface. Examples include 74 * TextPaint is overridden and the style of the typeface is used. 76 * @param typeface the typeface 78 public TypefaceSpan(@NonNull Typeface typeface) { argument 79 this(null, typeface); 90 TypefaceSpan(@ullable String family, @Nullable Typeface typeface) argument [all...] |
/frameworks/minikin/libs/minikin/ |
H A D | FontFamily.cpp | 58 HbFontUniquePtr Font::prepareFont(const std::shared_ptr<MinikinFont>& typeface) { argument 59 const char* buf = reinterpret_cast<const char*>(typeface->GetFontData()); 60 size_t size = typeface->GetFontSize(); 61 uint32_t ttcIndex = typeface->GetFontIndex(); 73 variations.reserve(typeface->GetAxes().size()); 74 for (const FontVariation& variation : typeface->GetAxes()) { 230 minikinFont = font.typeface()->createFontWithVariation(variations); 233 minikinFont = font.typeface();
|
/frameworks/support/compat/src/main/java/androidx/core/provider/ |
H A D | FontsContractCompat.java | 191 final Typeface typeface = TypefaceCompat.createFromFontInfo( 193 return new TypefaceResult(typeface, typeface != null 212 TypefaceResult(@Nullable Typeface typeface, argument 214 mTypeface = typeface; 259 TypefaceResult typeface = getFontInternal(context, request, style); 260 if (typeface.mTypeface != null) { 261 sTypefaceCache.put(id, typeface.mTypeface); 263 return typeface; 277 public void onReply(final TypefaceResult typeface) { 502 onTypefaceRetrieved(Typeface typeface) argument [all...] |
/frameworks/base/core/jni/android/graphics/ |
H A D | Paint.cpp | 110 static int breakText(JNIEnv* env, const Paint& paint, const Typeface* typeface, argument 117 MinikinUtils::measureText(&paint, static_cast<minikin::Bidi>(bidiFlags), typeface, text, 147 const Typeface* typeface = paint->getAndroidTypeface(); local 164 count = breakText(env, *paint, typeface, text + index, count, maxWidth, 176 const Typeface* typeface = paint->getAndroidTypeface(); local 180 count = breakText(env, *paint, typeface, text, count, maxWidth, bidiFlags, jmeasuredWidth, forwards); 185 static jfloat doTextAdvances(JNIEnv *env, Paint *paint, const Typeface* typeface, argument 209 static_cast<minikin::Bidi>(bidiFlags), typeface, text, start, count, contextCount, 221 const Typeface* typeface = paint->getAndroidTypeface(); local 223 jfloat result = doTextAdvances(env, paint, typeface, textArra 233 const Typeface* typeface = paint->getAndroidTypeface(); local 242 doTextRunCursor(JNIEnv *env, Paint* paint, const Typeface* typeface, const jchar *text, jint start, jint count, jint dir, jint offset, jint opt) argument 257 const Typeface* typeface = paint->getAndroidTypeface(); local 269 const Typeface* typeface = paint->getAndroidTypeface(); local 308 getTextPath(JNIEnv* env, Paint* paint, const Typeface* typeface, const jchar* text, jint count, jint bidiFlags, jfloat x, jfloat y, SkPath* path) argument 331 const Typeface* typeface = paint->getAndroidTypeface(); local 341 const Typeface* typeface = paint->getAndroidTypeface(); local 348 doTextBounds(JNIEnv* env, const jchar* text, int count, jobject bounds, const Paint& paint, const Typeface* typeface, jint bidiFlags) argument 368 const Typeface* typeface = paint->getAndroidTypeface(); local 377 const Typeface* typeface = paint->getAndroidTypeface(); local 427 const Typeface* typeface = paint->getAndroidTypeface(); local 501 doRunAdvance(const Paint* paint, const Typeface* typeface, const jchar buf[], jint start, jint count, jint bufSize, jboolean isRtl, jint offset) argument 517 const Typeface* typeface = paint->getAndroidTypeface(); local 525 doOffsetForAdvance(const Paint* paint, const Typeface* typeface, const jchar buf[], jint start, jint count, jint bufSize, jboolean isRtl, jfloat advance) argument 538 const Typeface* typeface = paint->getAndroidTypeface(); local 573 const Typeface* typeface = paint->getAndroidTypeface(); local [all...] |
H A D | HarfBuzzNGFaceSkia.cpp | 143 SkTypeface* typeface = reinterpret_cast<SkTypeface*>(userData); local 145 const size_t tableSize = typeface->getTableSize(tag); 152 size_t actualSize = typeface->getTableData(tag, 0, tableSize, buffer);
|
/frameworks/base/libs/hwui/ |
H A D | TextDropShadowCache.h | 41 , typeface(nullptr) 54 , typeface(paint->getTypeface()) 84 SkTypeface* typeface; member in struct:android::uirenderer::ShadowText
|
H A D | TextDropShadowCache.cpp | 36 hash = JenkinsHashMix(hash, android::hash_type(typeface)); 61 if (lhs.typeface < rhs.typeface) return -1; 62 if (lhs.typeface > rhs.typeface) return +1;
|
/frameworks/base/core/tests/coretests/src/android/provider/ |
H A D | FontsContractE2ETest.java | 92 public void onTypefaceRetrieved(Typeface typeface) { argument 93 mTypeface = typeface; 163 Typeface typeface = FontsContract.buildTypeface( 173 assertNotSame(typeface, typeface2);
|
/frameworks/base/core/java/com/android/internal/widget/ |
H A D | SubtitleView.java | 196 public void setTypeface(Typeface typeface) { argument 197 if (mTextPaint.getTypeface() != typeface) { 198 mTextPaint.setTypeface(typeface); 287 final Typeface typeface = style.getTypeface(); 288 setTypeface(typeface);
|
/frameworks/base/core/java/android/provider/ |
H A D | FontsContract.java | 340 // Unfortunately the typeface is not available at this time, but requesting from the font 359 Typeface typeface = buildTypeface(sContext, null, result.getFonts()); 360 if (typeface != null) { 361 sTypefaceCache.put(id, typeface); 363 holder.set(typeface); 460 * @param typeface The Typeface object retrieved. 462 public void onTypefaceRetrieved(Typeface typeface) {} argument 479 * Create a typeface object given a font request. The font will be asynchronously fetched, 566 final Typeface typeface = buildTypeface(context, cancellationSignal, fonts); 567 if (typeface [all...] |
/frameworks/layoutlib/bridge/src/android/graphics/ |
H A D | Typeface_Delegate.java | 254 Typeface typeface = Typeface.findFromCache(context.getAssets(), path); 255 if (typeface != null) { 256 return typeface; 288 typeface = Typeface.createFromResources(entry, context.getAssets(), path); 300 typeface = Typeface.createFromResources(context.getAssets(), path, 0); 303 return typeface; 331 // Calculate the required weight based on style and weight of this typeface. 408 // Calculate the required weight based on style and weight of this typeface.
|
/frameworks/base/core/jni/ |
H A D | android_text_MeasuredParagraph.cpp | 74 const Typeface* typeface = Typeface::resolveDefault(paint->getAndroidTypeface()); local 75 minikin::MinikinPaint minikinPaint = MinikinUtils::prepareMinikinPaint(paint, typeface);
|