/packages/apps/Messaging/src/com/android/messaging/util/ |
Typefaces.java | 18 import android.graphics.Typeface; 27 private static Typeface sRobotoBold; 28 private static Typeface sRobotoNormal; 30 public static Typeface getRobotoBold() { 33 sRobotoBold = Typeface.create(Typeface.SANS_SERIF, Typeface.BOLD); 38 public static Typeface getRobotoNormal() { 41 sRobotoNormal = Typeface.create(Typeface.SANS_SERIF, Typeface.NORMAL) [all...] |
/frameworks/base/libs/hwui/hwui/ |
Typeface.h | 31 // This value must be the same as the android.graphics.Typeface$Builder.RESOLVE_BY_FONT_TABLE. 34 struct ANDROID_API Typeface { 41 // style used for constructing and querying Typeface objects 44 static Typeface* resolveDefault(Typeface* src); 46 // The following three functions create new Typeface from an existing Typeface with a different 48 // existing Typeface. 49 // The createRelative method creates a new Typeface with a style relative to the base Typeface [all...] |
Typeface.cpp | 18 * This is the implementation of the Typeface object. Historically, it has 23 #include "Typeface.h" 68 Typeface* gDefaultTypeface = NULL; 70 Typeface* Typeface::resolveDefault(Typeface* src) { 75 Typeface* Typeface::createRelative(Typeface* src, SkTypeface::Style style) { 76 Typeface* resolvedFace = Typeface::resolveDefault(src) 188 sk_sp<SkTypeface> typeface = SkTypeface::MakeFromStream(fontData.release()); local [all...] |
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/base/core/tests/coretests/src/android/graphics/ |
TypefaceTest.java | 20 import android.graphics.Typeface; 30 private final Typeface[] mFaces = new Typeface[] { 31 Typeface.create(Typeface.SANS_SERIF, 0), 32 Typeface.create(Typeface.SANS_SERIF, 1), 33 Typeface.create(Typeface.SERIF, 0), 34 Typeface.create(Typeface.SERIF, 1) [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...] |
/frameworks/base/libs/hwui/tests/unit/ |
TypefaceTests.cpp | 28 #include "hwui/Typeface.h" 55 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>()); 68 std::unique_ptr<Typeface> regular( 69 Typeface::createFromFamilies(makeSingleFamlyVector(kRobotoRegular), 71 EXPECT_EQ(regular.get(), Typeface::resolveDefault(regular.get())); 73 Typeface* old = Typeface::resolveDefault(nullptr); // Keep the original to restore it later [all...] |
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/ |
Typeface_Accessor.java | 26 return Typeface.sSystemFontMap.containsKey(fontName);
|
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/ |
FontRenderingTests.java | 23 import android.graphics.Typeface; 51 boolean thinTestCase = family.endsWith("-thin") && ((style & Typeface.BOLD) == 0); 55 final Typeface typeface = Typeface.create(family, style); local 62 p.setTypeface(typeface); 73 Typeface.NORMAL, 80 Typeface.BOLD, 87 Typeface.ITALIC, 94 Typeface.BOLD | Typeface.ITALIC [all...] |
/frameworks/base/core/jni/android/graphics/ |
Typeface.cpp | 26 #include <hwui/Typeface.h> 32 Typeface* family = reinterpret_cast<Typeface*>(familyHandle); 33 Typeface* face = Typeface::createRelative(family, (SkTypeface::Style)style); 37 face = Typeface::createRelative(family, (SkTypeface::Style)(style ^ SkTypeface::kItalic)); 40 face = Typeface::createRelative(family, (SkTypeface::Style)i); 47 Typeface* baseTypeface = reinterpret_cast<Typeface*>(nativeInstance); 48 return reinterpret_cast<jlong>(Typeface::createAbsolute(baseTypeface, weight, italic)) [all...] |
/cts/tests/tests/text/src/android/text/style/cts/ |
StyleSpanTest.java | 22 import android.graphics.Typeface; 62 StyleSpan styleSpan = new StyleSpan(Typeface.BOLD); 65 Typeface tf = Typeface.defaultFromStyle(Typeface.NORMAL); 69 assertEquals(Typeface.NORMAL, tp.getTypeface().getStyle()); 74 assertEquals(Typeface.BOLD, tp.getTypeface().getStyle()); 79 StyleSpan styleSpan = new StyleSpan(Typeface.BOLD); 86 StyleSpan styleSpan = new StyleSpan(Typeface.BOLD); 89 Typeface tf = Typeface.defaultFromStyle(Typeface.NORMAL) [all...] |
/frameworks/base/core/java/android/text/style/ |
StyleSpan.java | 20 import android.graphics.Typeface; 42 * in {@link android.graphics.Typeface}. 75 * Returns the style constant defined in {@link android.graphics.Typeface}. 94 Typeface old = paint.getTypeface(); 103 Typeface tf; 105 tf = Typeface.defaultFromStyle(want); 107 tf = Typeface.create(old, want); 112 if ((fake & Typeface.BOLD) != 0) { 116 if ((fake & Typeface.ITALIC) != 0) {
|
TypefaceSpan.java | 20 import android.graphics.Typeface; 27 * Changes the typeface family of the text to which the span is attached. 33 * @param family The font family for this typeface. Examples include 86 Typeface old = paint.getTypeface(); 93 Typeface tf = Typeface.create(family, oldStyle); 96 if ((fake & Typeface.BOLD) != 0) { 100 if ((fake & Typeface.ITALIC) != 0) {
|
/frameworks/base/apct-tests/perftests/core/src/android/graphics/perftests/ |
TypefaceCreatePerfTest.java | 21 import android.graphics.Typeface; 52 Typeface face = Typeface.create(Typeface.SANS_SERIF, Typeface.NORMAL); 61 Typeface face = Typeface.create("monospace", Typeface.NORMAL); 72 Typeface face = Typeface.createFromAsset(am, TEST_FONT_NAME) [all...] |
/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...] |
/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...] |
TypefaceCompatBaseImpl.java | 23 import android.graphics.Typeface; 38 * Implementation of the Typeface compat methods for API 14 and above. 48 public Typeface createTypeface(Context context, @NonNull FontInfo[] fonts, 54 Typeface typeface = null; local 65 return Typeface.createFromFile(tmpFile.getPath()); 67 // This was thrown from Typeface.createFromFile when a Typeface could not be loaded, 95 public Typeface createFromFontFamilyFilesResourceEntry(Context context, 98 entry, ((style & Typeface.BOLD) == 0) ? 400 : 700, (style & Typeface.ITALIC) != 0) [all...] |
/frameworks/base/libs/hwui/tests/microbench/ |
main.cpp | 20 #include "hwui/Typeface.h" 32 Typeface::setRobotoTypefaceForTest();
|
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/span/ |
LinkSpan.java | 20 import android.graphics.Typeface; 49 private static final Typeface TYPEFACE_MEDIUM = 50 Typeface.create("sans-serif-medium", Typeface.NORMAL);
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/ |
TypefaceUtils.java | 21 import android.graphics.Typeface; 74 final Typeface face = paint.getTypeface(); 76 if (face == Typeface.DEFAULT) { 78 } else if (face == Typeface.DEFAULT_BOLD) { 80 } else if (face == Typeface.MONOSPACE) {
|
/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...] |
/development/samples/ApiDemos/src/com/example/android/apis/graphics/ |
Typefaces.java | 23 import android.graphics.Typeface; 37 private Typeface mFace; 42 mFace = Typeface.createFromAsset(getContext().getAssets(), "fonts/samplefont.ttf");
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/volume/ |
SegmentedButtons.java | 20 import android.graphics.Typeface; 34 private static final Typeface REGULAR = Typeface.create("sans-serif", Typeface.NORMAL); 35 private static final Typeface MEDIUM = Typeface.create("sans-serif-medium", Typeface.NORMAL);
|