/frameworks/support/compat/tests/java/android/support/v4/graphics/ |
TypefaceCompatTest.java | 29 import android.graphics.Typeface; 94 * Helper method to get the used font resource id by typeface. 96 * If the typeface is created from one of the R.font.large_a, R.font.large_b, R.font.large_c or 97 * R.font.large_d resource, this method returns the resource id used by the typeface. 99 private static int getSelectedFontResourceId(Typeface typeface) { 106 p.setTypeface(typeface); 142 Typeface typeface = TypefaceCompat.createFromResourcesFamilyXml(mContext, local 144 R.font.styletest_sync_providerfont, Typeface.NORMAL, null /* TextView */) 175 Typeface typeface = TypefaceCompat.createFromResourcesFamilyXml(mContext, entry, mResources, local 210 Typeface typeface = TypefaceCompat.createFromResourcesFontFile( local [all...] |
/cts/tests/tests/graphics/src/android/graphics/cts/ |
TypefaceTest.java | 32 import android.graphics.Typeface; 55 // list of family names to try when attempting to find a typeface with a given style 62 * Create a typeface of the given style. If the default font does not support the style, 64 * @return The typeface or null, if no typeface with the given style can be found. 66 private static Typeface createTypeface(int style) { 68 Typeface tf = Typeface.create(family, style); 83 Typeface typeface = createTypeface(Typeface.BOLD) local 114 Typeface typeface = Typeface.create(DEFAULT, Typeface.NORMAL); local 129 Typeface typeface = Typeface.defaultFromStyle(Typeface.NORMAL); local 168 Typeface typeface = Typeface.createFromAsset(mContext.getAssets(), "samplefont.ttf"); local 181 Typeface typeface = Typeface.createFromFile(file); local 205 Typeface typeface = Typeface.createFromFile(obtainPath()); local 232 Typeface typeface = Typeface.createFromAsset(mContext.getAssets(), "bombfont.ttf"); local 244 Typeface typeface = Typeface.createFromAsset(mContext.getAssets(), "bombfont2.ttf"); local 278 Typeface typeface = Typeface.createFromAsset(mContext.getAssets(), "ft45987.ttf"); local 449 Typeface typeface = Typeface.createFromAsset(mContext.getAssets(), fontPath); local [all...] |
/external/skia/src/gpu/ |
GrPathRendering.cpp | 48 GlyphGenerator(const SkTypeface& typeface, const SkScalerContextEffects& effects, 50 : fScalerContext(typeface.createScalerContext(effects, &desc)) 73 GrPathRange* GrPathRendering::createGlyphs(const SkTypeface* typeface, 77 if (nullptr == typeface) { 78 typeface = SkTypeface::GetDefaultTypeface(); 79 SkASSERT(nullptr != typeface); 83 sk_sp<GlyphGenerator> generator(new GlyphGenerator(*typeface, effects, *desc)); 89 rec.fFontID = typeface->uniqueID(); 104 sk_sp<GlyphGenerator> generator(new GlyphGenerator(*typeface, noEffects, *genericDesc));
|
/frameworks/base/libs/hwui/hwui/ |
MinikinUtils.cpp | 25 #include "Typeface.h" 30 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) [all...] |
MinikinUtils.h | 31 #include "Typeface.h" 38 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,
|
/frameworks/support/compat/java/android/support/v4/graphics/ |
TypefaceCompat.java | 23 import android.graphics.Typeface; 43 * Helper for accessing features in {@link Typeface} in a backwards compatible fashion. 66 * Cache for Typeface objects dynamically loaded from assets. 68 private static final LruCache<String, Typeface> sTypefaceCache = new LruCache<>(16); 71 // Create Typeface from XML which root node is "font-family" 72 Typeface createFromFontFamilyFilesResourceEntry( 76 Typeface createTypeface(Context context, @NonNull FontInfo[] fonts, 87 public static Typeface findFromCache(Resources resources, int id, int style) { 104 * Create Typeface from XML resource which root node is font-family. 108 public static Typeface createFromResourcesFamilyXml 111 Typeface typeface; local 122 sTypefaceCache.put(createResourceUid(resources, id, style), typeface); local 141 Typeface typeface = Typeface.createFromFile(tmpFile.getPath()); local 143 sTypefaceCache.put(createResourceUid(resources, id, style), typeface); local [all...] |
/frameworks/minikin/libs/minikin/ |
FontFamily.cpp | 68 Font::Font(const std::shared_ptr<MinikinFont>& typeface, FontStyle style) 69 : typeface(typeface), style(style) { 72 Font::Font(std::shared_ptr<MinikinFont>&& typeface, FontStyle style) 73 : typeface(typeface), style(style) { 78 HbBlob fvarTable(getFontTable(typeface.get(), fvarTag)); 89 typeface = std::move(o.typeface); 91 o.typeface = nullptr 171 const MinikinFont* typeface = getClosestMatch(defaultStyle).font; local [all...] |
/frameworks/base/graphics/java/android/graphics/ |
Typeface.java | 73 * The Typeface class specifies the typeface and intrinsic style of a font. 78 public class Typeface { 80 private static String TAG = "Typeface"; 82 /** The default NORMAL typeface object */ 83 public static final Typeface DEFAULT; 85 * The default BOLD typeface object. Note: this may be not actually be 89 public static final Typeface DEFAULT_BOLD; 90 /** The NORMAL style of the default sans serif typeface. */ 91 public static final Typeface SANS_SERIF 171 Typeface typeface = sDynamicTypefaceCache.get(key); local 220 Typeface typeface = FontsContract.getFontSync(request); local 224 Typeface typeface = findFromCache(mgr, path); local 265 Typeface typeface = sDynamicTypefaceCache.get(key); local 552 Typeface typeface; local 604 Typeface typeface = sDynamicTypefaceCache.get(key); local 707 Typeface typeface; local 756 Typeface typeface = new Builder(mgr, path).build(); local 951 Typeface typeface; local 967 systemFonts.put(f.getName(), typeface); local [all...] |
/frameworks/support/emoji/core/src/android/support/text/emoji/ |
MetadataRepo.java | 21 import android.graphics.Typeface; 62 * Typeface to be used to render emojis. 64 private final Typeface mTypeface; 82 * @param typeface Typeface to be used to render emojis 85 private MetadataRepo(@NonNull final Typeface typeface, 87 mTypeface = typeface; 98 * @param typeface Typeface to be used to render emoji 127 final Typeface typeface = Typeface.createFromAsset(assetManager, assetPath); local [all...] |
/external/skia/src/core/ |
SkTypefaceCache.cpp | 27 for (const sk_sp<SkTypeface>& typeface : fTypefaces) { 28 if (proc(typeface.get(), ctx)) { 29 return SkRef(typeface.get());
|
/external/skia/src/pdf/ |
SkPDFFont.h | 34 /** Returns the typeface represented by this class. Returns nullptr for the 35 * default typeface. 37 SkTypeface* typeface() const { return fTypeface.get(); } function in class:SkPDFFont 78 /** Get the font resource for the passed typeface and glyphID. The 83 * @param typeface The typeface to find, not nullptr. 87 SkTypeface* typeface, 92 * @param typeface can not be nullptr. 93 * @return nullptr only when typeface is bad. 95 static const SkAdvancedTypefaceMetrics* GetMetrics(SkTypeface* typeface, [all...] |
SkPDFFont.cpp | 141 const SkAdvancedTypefaceMetrics* SkPDFFont::GetMetrics(SkTypeface* typeface, 143 SkASSERT(typeface); 144 SkFontID id = typeface->uniqueID(); 148 int count = typeface->countGlyphs(); 155 typeface->getAdvancedTypefaceMetrics( 183 SkASSERT(fontMetrics); // SkPDFDevice::internalDrawText ensures the typeface is good. 184 // GetMetrics only returns null to signify a bad typeface. 197 sk_sp<SkTypeface> typeface(sk_ref_sp(face)); 198 SkASSERT(typeface); 200 SkGlyphID lastGlyph = SkToU16(typeface->countGlyphs() - 1) [all...] |
/external/skia/include/ports/ |
SkTypeface_win.h | 17 * Like the other Typeface create methods, this returns a new reference to the 18 * corresponding typeface for the specified logfont. The caller is responsible 24 * Copy the LOGFONT associated with this typeface into the lf parameter. Note 25 * that the lfHeight will need to be set afterwards, since the typeface does 27 * typeface may be NULL, in which case we return the logfont for the default font. 29 SK_API void SkLOGFONTFromTypeface(const SkTypeface* typeface, LOGFONT* lf);
|
/frameworks/minikin/include/minikin/ |
FontFamily.h | 106 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;
|
/external/skia/experimental/docs/ |
canvasBackend.js | 133 if ('typeface' in paint) { 134 var typeface = typefaces[paint.typeface]; 135 var font = typeface.style; 139 if ('family' in typeface) { 140 font += " " + typeface.family;
|
svgBackend.js | 197 if ('typeface' in paint) { 198 var typeface = typefaces[paint.typeface]; 199 var font = typeface.style; 203 if ('family' in typeface) { 204 svgElement.setAttribute("font-family", typeface.family);
|
/frameworks/base/core/jni/android/graphics/ |
Paint.cpp | 42 #include <hwui/Typeface.h> 108 static int breakText(JNIEnv* env, const Paint& paint, Typeface* typeface, const jchar text[], 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 220 Typeface* typeface = reinterpret_cast<Typeface*>(typefaceHandle); local 233 Typeface* typeface = reinterpret_cast<Typeface*>(typefaceHandle); local 258 Typeface* typeface = reinterpret_cast<Typeface*>(typefaceHandle); local 270 Typeface* typeface = reinterpret_cast<Typeface*>(typefaceHandle); local 332 Typeface* typeface = reinterpret_cast<Typeface*>(typefaceHandle); local 343 Typeface* typeface = reinterpret_cast<Typeface*>(typefaceHandle); local 370 Typeface* typeface = reinterpret_cast<Typeface*>(typefaceHandle); local 379 Typeface* typeface = reinterpret_cast<Typeface*>(typefaceHandle); local 429 Typeface* typeface = reinterpret_cast<Typeface*>(typefaceHandle); local 518 Typeface* typeface = reinterpret_cast<Typeface*>(typefaceHandle); local 540 Typeface* typeface = reinterpret_cast<Typeface*>(typefaceHandle); local 577 Typeface* typeface = reinterpret_cast<Typeface*>(typefaceHandle); local [all...] |
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/ |
TextDropShadowCache.h | 37 ShadowText(): glyphCount(0), radius(0.0f), textSize(0.0f), typeface(nullptr), 47 , typeface(paint->getTypeface()) 83 SkTypeface* typeface; member in struct:android::uirenderer::ShadowText
|
TextDropShadowCache.cpp | 36 hash = JenkinsHashMix(hash, android::hash_type(typeface)); 62 if (lhs.typeface < rhs.typeface) return -1; 63 if (lhs.typeface > rhs.typeface) return +1;
|
/packages/apps/Camera2/src/com/android/camera/ui/ |
ModeSelectorItem.java | 21 import android.graphics.Typeface; 74 Typeface typeface; local 76 typeface = Typeface.create("sans-serif-medium", Typeface.NORMAL); 78 // Load roboto_light typeface from assets. 79 typeface = Typeface.createFromAsset(getResources().getAssets(), 82 mText.setTypeface(typeface); [all...] |
/external/skia/src/ports/ |
SkFontHost_FreeType_common.h | 32 SkScalerContext_FreeType_Base(sk_sp<SkTypeface> typeface, const SkScalerContextEffects& effects, 34 : INHERITED(std::move(typeface), effects, desc)
|
/external/skia/tests/ |
TypefaceTest.cpp | 106 // TODO: if axes are set and the back-end doesn't support them, should we create the typeface? 107 sk_sp<SkTypeface> typeface(fm->createFromStream(distortable.release(), params)); 109 int count = typeface->getVariationDesignPosition(nullptr, 0); 116 count = typeface->getVariationDesignPosition(positionRead, SK_ARRAY_COUNT(positionRead)); 138 sk_sp<SkTypeface> typeface(fm->createFromStream(distortable.release(), params)); 139 if (!typeface) { 145 int count = typeface->getVariationDesignPosition(nullptr, 0); 152 count = typeface->getVariationDesignPosition(positionRead, SK_ARRAY_COUNT(positionRead)); 164 DEF_TEST(Typeface, reporter) {
|
FontNamesTest.cpp | 154 sk_sp<SkTypeface> typeface(set->createTypeface(j)); 157 typeface->getFamilyName(&familyName); 163 typeface->createFamilyNameIterator()); 172 size_t nameTableSize = typeface->getTableSize(nameTag); 177 size_t copied = typeface->getTableData(nameTag, 0, nameTableSize, nameTableData.get());
|
/external/skia/src/fonts/ |
SkFontMgr_indirect.cpp | 124 sk_sp<SkTypeface> typeface(fImpl->createFromStream(stream.release(), id.fTtcIndex)); 125 if (typeface.get() == nullptr) { 130 typeface->weak_ref(); 133 newEntry.fTypeface = typeface.get(); // weak reference passed to new entry. 135 return typeface.release();
|