Searched refs:typeface (Results 1 - 25 of 47) sorted by relevance

12

/frameworks/support/compat/tests/java/android/support/v4/graphics/
H A DTypefaceCompatTest.java91 * Helper method to get the used font resource id by typeface.
93 * If the typeface is created from one of the R.font.large_a, R.font.large_b, R.font.large_c or
94 * R.font.large_d resource, this method returns the resource id used by the typeface.
96 private static int getSelectedFontResourceId(Typeface typeface) { argument
103 p.setTypeface(typeface);
139 Typeface typeface = TypefaceCompat.createFromResourcesFamilyXml(mContext,
142 typeface = Typeface.create(typeface, Typeface.NORMAL);
143 assertEquals(R.font.large_a, getSelectedFontResourceId(typeface));
145 typeface
[all...]
/frameworks/base/graphics/java/android/graphics/
H A DLeakyTypefaceStorage.java44 * 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 DTypeface.java73 * The Typeface class specifies the typeface and intrinsic style of a font.
82 /** The default NORMAL typeface object */
85 * The default BOLD typeface object. Note: this may be not actually be
90 /** The NORMAL style of the default sans serif typeface. */
92 /** The NORMAL style of the default serif typeface. */
94 /** The NORMAL style of the default monospace typeface. */
133 // Style value for building typeface.
145 /** Returns the typeface's intrinsic style attributes */
171 Typeface typeface = sDynamicTypefaceCache.get(key);
172 if (typeface !
[all...]
/frameworks/base/libs/hwui/hwui/
H A DMinikinUtils.cpp30 const Paint* paint, Typeface* typeface) {
31 const Typeface* resolvedFace = Typeface::resolveDefault(typeface);
57 Typeface* typeface, const uint16_t* buf, size_t start, size_t count,
60 minikin::FontStyle minikinStyle = prepareMinikinPaint(&minikinPaint, paint, typeface);
63 Typeface::resolveDefault(typeface)->fFontCollection);
67 float MinikinUtils::measureText(const Paint* paint, int bidiFlags, Typeface* typeface, argument
70 minikin::FontStyle minikinStyle = prepareMinikinPaint(&minikinPaint, paint, typeface);
71 Typeface* resolvedTypeface = Typeface::resolveDefault(typeface);
76 bool MinikinUtils::hasVariationSelector(Typeface* typeface, uint32_t codepoint, uint32_t vs) { argument
77 const Typeface* resolvedFace = Typeface::resolveDefault(typeface);
29 prepareMinikinPaint(minikin::MinikinPaint* minikinPaint, const Paint* paint, Typeface* typeface) argument
56 doLayout(const Paint* paint, int bidiFlags, Typeface* typeface, const uint16_t* buf, size_t start, size_t count, size_t bufSize) argument
[all...]
H A DMinikinUtils.h38 const Paint* paint, Typeface* typeface);
41 Typeface* typeface, const uint16_t* buf, size_t start, size_t count,
44 ANDROID_API static float measureText(const Paint* paint, int bidiFlags, Typeface* typeface,
47 ANDROID_API static bool hasVariationSelector(Typeface* typeface, uint32_t codepoint,
H A DMinikinSkia.h31 explicit MinikinFontSkia(sk_sp<SkTypeface> typeface, const void* fontData, size_t fontSize,
54 // set typeface and fake bold/italic parameters
H A DCanvas.cpp161 float x, float y, int bidiFlags, const Paint& origPaint, Typeface* typeface) {
166 &paint, bidiFlags, typeface, text, start, count, contextCount);
210 float hOffset, float vOffset, const Paint& paint, Typeface* typeface) {
213 &paintCopy, bidiFlags, typeface, text, 0, count, count);
160 drawText(const uint16_t* text, int start, int count, int contextCount, float x, float y, int bidiFlags, const Paint& origPaint, Typeface* typeface) argument
209 drawTextOnPath(const uint16_t* text, int count, int bidiFlags, const SkPath& path, float hOffset, float vOffset, const Paint& paint, Typeface* typeface) argument
/frameworks/support/compat/java/android/support/v4/graphics/
H A DTypefaceCompat.java109 Typeface typeface;
112 typeface = FontsContractCompat.getFontSync(context,
116 typeface = sTypefaceCompatImpl.createFromFontFamilyFilesResourceEntry(
119 if (typeface != null) {
120 sTypefaceCache.put(createResourceUid(resources, id, style), typeface);
122 return typeface;
131 Typeface typeface = sTypefaceCompatImpl.createFromResourcesFontFile(
133 if (typeface != null) {
134 sTypefaceCache.put(createResourceUid(resources, id, style), typeface);
136 return typeface;
[all...]
/frameworks/minikin/libs/minikin/
H A DFontFamily.cpp68 Font::Font(const std::shared_ptr<MinikinFont>& typeface, FontStyle style) argument
69 : typeface(typeface), style(style) {
72 Font::Font(std::shared_ptr<MinikinFont>&& typeface, FontStyle style) argument
73 : typeface(typeface), style(style) {
78 HbBlob fvarTable(getFontTable(typeface.get(), fvarTag));
89 typeface = std::move(o.typeface);
91 o.typeface
112 analyzeStyle(const std::shared_ptr<MinikinFont>& typeface, int* weight, bool* italic) argument
171 const MinikinFont* typeface = getClosestMatch(defaultStyle).font; local
[all...]
/frameworks/support/emoji/core/src/android/support/text/emoji/
H A DMetadataRepo.java83 * @param typeface Typeface to be used to render emojis
86 private MetadataRepo(@NonNull final Typeface typeface, argument
88 mTypeface = typeface;
99 * @param typeface Typeface to be used to render emojis
102 public static MetadataRepo create(@NonNull final Typeface typeface, argument
104 return new MetadataRepo(typeface, MetadataListReader.read(inputStream));
111 * @param typeface Typeface to be used to render emojis
114 public static MetadataRepo create(@NonNull final Typeface typeface, argument
116 return new MetadataRepo(typeface, MetadataListReader.read(byteBuffer));
128 final Typeface typeface
[all...]
H A DEmojiMetadata.java104 final Typeface typeface = mMetadataRepo.getTypeface();
106 paint.setTypeface(typeface);
117 * @return return typeface to be used to render this metadata
/frameworks/minikin/include/minikin/
H A DFontFamily.h106 Font(const std::shared_ptr<MinikinFont>& typeface, FontStyle style);
107 Font(std::shared_ptr<MinikinFont>&& typeface, FontStyle style);
111 std::shared_ptr<MinikinFont> typeface; member in struct:minikin::Font
130 static bool analyzeStyle(const std::shared_ptr<MinikinFont>& typeface, int* weight,
140 return mFonts[index].typeface;
H A DFontCollection.h32 explicit FontCollection(std::shared_ptr<FontFamily>&& typeface);
/frameworks/base/core/jni/android/graphics/
H A DPaint.cpp108 static int breakText(JNIEnv* env, const Paint& paint, Typeface* typeface, const jchar text[], argument
115 MinikinUtils::measureText(&paint, bidiFlags, typeface, text, 0, count, count,
146 Typeface* typeface = reinterpret_cast<Typeface*>(typefaceHandle); local
163 count = breakText(env, *paint, typeface, text + index, count, maxWidth,
175 Typeface* typeface = reinterpret_cast<Typeface*>(typefaceHandle); local
179 count = breakText(env, *paint, typeface, text, count, maxWidth, bidiFlags, jmeasuredWidth, forwards);
184 static jfloat doTextAdvances(JNIEnv *env, Paint *paint, Typeface* typeface, argument
207 const float advance = MinikinUtils::measureText(paint, bidiFlags, typeface, text,
220 Typeface* typeface = reinterpret_cast<Typeface*>(typefaceHandle); local
222 jfloat result = doTextAdvances(env, paint, typeface, textArra
233 Typeface* typeface = reinterpret_cast<Typeface*>(typefaceHandle); local
242 doTextRunCursor(JNIEnv *env, Paint* paint, Typeface* typeface, const jchar *text, jint start, jint count, jint dir, jint offset, jint opt) argument
258 Typeface* typeface = reinterpret_cast<Typeface*>(typefaceHandle); local
270 Typeface* typeface = reinterpret_cast<Typeface*>(typefaceHandle); local
309 getTextPath(JNIEnv* env, Paint* paint, Typeface* typeface, const jchar* text, jint count, jint bidiFlags, jfloat x, jfloat y, SkPath* path) argument
332 Typeface* typeface = reinterpret_cast<Typeface*>(typefaceHandle); local
343 Typeface* typeface = reinterpret_cast<Typeface*>(typefaceHandle); local
350 doTextBounds(JNIEnv* env, const jchar* text, int count, jobject bounds, const Paint& paint, Typeface* typeface, jint bidiFlags) argument
370 Typeface* typeface = reinterpret_cast<Typeface*>(typefaceHandle); local
379 Typeface* typeface = reinterpret_cast<Typeface*>(typefaceHandle); local
429 Typeface* typeface = reinterpret_cast<Typeface*>(typefaceHandle); local
501 doRunAdvance(const Paint* paint, Typeface* typeface, const jchar buf[], jint start, jint count, jint bufSize, jboolean isRtl, jint offset) argument
518 Typeface* typeface = reinterpret_cast<Typeface*>(typefaceHandle); local
527 doOffsetForAdvance(const Paint* paint, Typeface* typeface, const jchar buf[], jint start, jint count, jint bufSize, jboolean isRtl, jfloat advance) argument
540 Typeface* typeface = reinterpret_cast<Typeface*>(typefaceHandle); local
577 Typeface* typeface = reinterpret_cast<Typeface*>(typefaceHandle); local
[all...]
H A DHarfBuzzNGFaceSkia.cpp143 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 DTextDropShadowCache.h37 ShadowText(): glyphCount(0), radius(0.0f), textSize(0.0f), typeface(nullptr),
47 , typeface(paint->getTypeface())
83 SkTypeface* typeface; member in struct:android::uirenderer::ShadowText
H A DTextDropShadowCache.cpp36 hash = JenkinsHashMix(hash, android::hash_type(typeface));
62 if (lhs.typeface < rhs.typeface) return -1;
63 if (lhs.typeface > rhs.typeface) return +1;
/frameworks/support/compat/java/android/support/v4/provider/
H A DFontsContractCompat.java224 Typeface typeface = getFontInternal(context, request, style);
225 if (typeface != null) {
226 sTypefaceCache.put(id, typeface);
228 return typeface;
242 public void onReply(final Typeface typeface) {
245 targetView.setTypeface(typeface, style);
263 public void onReply(final Typeface typeface) {
270 replies.get(i).onReply(typeface);
444 * @param typeface The Typeface object retrieved.
446 public void onTypefaceRetrieved(Typeface typeface) {} argument
[all...]
/frameworks/base/core/tests/coretests/src/android/provider/
H A DFontsContractE2ETest.java92 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 DSubtitleView.java196 public void setTypeface(Typeface typeface) { argument
197 if (mTextPaint.getTypeface() != typeface) {
198 mTextPaint.setTypeface(typeface);
284 final Typeface typeface = style.getTypeface();
285 setTypeface(typeface);
/frameworks/base/core/java/android/provider/
H A DFontsContract.java336 // Unfortunately the typeface is not available at this time, but requesting from the font
355 Typeface typeface = buildTypeface(sContext, null, result.getFonts());
356 if (typeface != null) {
357 sTypefaceCache.put(id, typeface);
359 holder.set(typeface);
452 * @param typeface The Typeface object retrieved.
454 public void onTypefaceRetrieved(Typeface typeface) {} argument
471 * Create a typeface object given a font request. The font will be asynchronously fetched,
558 final Typeface typeface = buildTypeface(context, cancellationSignal, fonts);
559 if (typeface
[all...]
/frameworks/base/libs/hwui/tests/unit/
H A DTypefaceTests.cpp55 sk_sp<SkTypeface> typeface(fm->createFromStream(fontData.release()));
56 LOG_ALWAYS_FATAL_IF(typeface == nullptr, "Failed to make typeface from %s", fileName);
58 std::move(typeface), data, st.st_size, 0, std::vector<minikin::FontVariation>());
245 // Typeface typeface = new Typeface.Builder(invalid).setFallback("sans-serif")
247 // Typeface.create(typeface, Typeface.NORMAL);
254 // Typeface typeface = new Typeface.Builder(invalid).setFallback("sans-serif")
256 // Typeface.create(typeface, Typeface.BOLD);
263 // Typeface typeface = new Typeface.Builder(invalid).setFallback("sans-serif")
265 // Typeface.create(typeface, Typefac
[all...]
/frameworks/support/design/src/android/support/design/widget/
H A DCollapsingTextHelper.java273 void setCollapsedTypeface(Typeface typeface) { argument
274 if (areTypefacesDifferent(mCollapsedTypeface, typeface)) {
275 mCollapsedTypeface = typeface;
280 void setExpandedTypeface(Typeface typeface) { argument
281 if (areTypefacesDifferent(mExpandedTypeface, typeface)) {
282 mExpandedTypeface = typeface;
287 void setTypefaces(Typeface typeface) { argument
288 mCollapsedTypeface = mExpandedTypeface = typeface;
/frameworks/support/design/tests/src/android/support/design/testutils/
H A DTextInputLayoutActions.java105 public static ViewAction setTypeface(final Typeface typeface) { argument
114 return "Sets the typeface";
122 layout.setTypeface(typeface);
/frameworks/base/core/jni/
H A Dandroid_graphics_Canvas.cpp485 Typeface* typeface = reinterpret_cast<Typeface*>(typefaceHandle); local
488 bidiFlags, *paint, typeface);
496 Typeface* typeface = reinterpret_cast<Typeface*>(typefaceHandle); local
500 bidiFlags, *paint, typeface);
508 Typeface* typeface = reinterpret_cast<Typeface*>(typefaceHandle); local
513 contextCount, x, y, bidiFlags, *paint, typeface);
522 Typeface* typeface = reinterpret_cast<Typeface*>(typefaceHandle); local
529 contextCount, x, y, bidiFlags, *paint, typeface);
539 Typeface* typeface = reinterpret_cast<Typeface*>(typefaceHandle); local
544 hOffset, vOffset, *paint, typeface);
554 Typeface* typeface = reinterpret_cast<Typeface*>(typefaceHandle); local
[all...]

Completed in 2597 milliseconds

12