Searched refs:typeface (Results 1 – 9 of 9) sorted by relevance
/cts/tests/tests/graphics/src/android/graphics/cts/ |
D | TypefaceTest.java | 61 private static float measureText(String text, Typeface typeface) { in measureText() argument 65 paint.setTypeface(typeface); in measureText() 72 final Typeface typeface = ctx.getResources().getFont(R.font.a3em); 73 GLYPH_3EM_WIDTH = measureText("a", typeface); 74 GLYPH_1EM_WIDTH = measureText("b", typeface); 105 Typeface typeface = createTypeface(Typeface.BOLD); in testIsBold() local 106 if (typeface != null) { in testIsBold() 107 assertEquals(Typeface.BOLD, typeface.getStyle()); in testIsBold() 108 assertTrue(typeface.isBold()); in testIsBold() 109 assertFalse(typeface.isItalic()); in testIsBold() [all …]
|
D | TypefaceCustomFallbackBuilderTest.java | 115 final Typeface typeface = createFullFamilyTypeface(); in testFamily_defaultStyle() local 118 FontTestUtil.getSelectedStyle(typeface)); in testFamily_defaultStyle() 123 final Typeface typeface = createFullFamilyTypeface(); in testFamily_selectStyle() local 128 FontTestUtil.getSelectedStyle(Typeface.create(typeface, weight, italic))); in testFamily_selectStyle() 149 final Typeface typeface = new Typeface.CustomFallbackBuilder(b.build()) in testFamily_selectStyleByBuilder() local 154 assertEquals(testStyle, FontTestUtil.getSelectedStyle(typeface)); in testFamily_selectStyleByBuilder() 166 final Typeface typeface = new Typeface.CustomFallbackBuilder(b.build()).build(); in testFamily_closestDefault() local 170 FontTestUtil.getSelectedStyle(typeface)); in testFamily_closestDefault() 174 FontTestUtil.getSelectedStyle(Typeface.create(typeface, 600, false))); in testFamily_closestDefault() 187 final Typeface typeface = new Typeface.CustomFallbackBuilder(baseFamily) in testUserFallback() local [all …]
|
D | PaintTest.java | 467 for (Typeface typeface : TYPEFACES) { in testGetFontSpacing() 468 p.setTypeface(typeface); in testGetFontSpacing() 545 for (Typeface typeface : TYPEFACES) { in testAscent() 546 p.setTypeface(typeface); in testAscent() 885 for (Typeface typeface : TYPEFACES) { 886 p.setTypeface(typeface); 904 for (Typeface typeface : TYPEFACES) { 905 p.setTypeface(typeface); 965 for (Typeface typeface : TYPEFACES) { 966 p.setTypeface(typeface); [all …]
|
/cts/tests/tests/graphics/src/android/graphics/fonts/ |
D | FontTestUtil.java | 223 private static float measureChar(Typeface typeface, char c) { in measureChar() argument 226 tp.setTypeface(typeface); in measureChar() 299 private static int getSelectedFontStyle(Typeface typeface) { in getSelectedFontStyle() argument 302 if (measureChar(typeface, CHAR_3EM_WIDTH[i]) == 300.0f) { in getSelectedFontStyle() 316 public static Pair<Integer, Boolean> getSelectedStyle(Typeface typeface) { in getSelectedStyle() argument 317 return sStyleList.get(getSelectedFontStyle(typeface)); in getSelectedStyle() 326 public static String getSelectedFontPathInAsset(Typeface typeface) { in getSelectedFontPathInAsset() argument 327 return sFontList[getSelectedFontStyle(typeface)]; in getSelectedFontPathInAsset() 336 public static int getSelectedTtcIndex(Typeface typeface) { in getSelectedTtcIndex() argument 337 return getSelectedFontStyle(typeface); in getSelectedTtcIndex() [all …]
|
/cts/tests/tests/text/src/android/text/style/cts/ |
D | TypefaceSpanTest.java | 41 Typeface typeface = Typeface.create(FAMILY, Typeface.BOLD); in testConstructorFromTypeface() local 42 TypefaceSpan t = new TypefaceSpan(typeface); in testConstructorFromTypeface() 44 assertEquals(typeface, t.getTypeface()); in testConstructorFromTypeface()
|
/cts/tests/tests/widget/src/android/widget/cts/ |
D | TextViewFontWeightTest.java | 103 Typeface typeface = tv.getTypeface(); in assertFontSelected() local 104 assertNotNull(typeface); in assertFontSelected() 105 assertEquals(style.getWeight(), typeface.getWeight()); in assertFontSelected() 106 assertEquals(style.isItalic(), typeface.isItalic()); in assertFontSelected() 113 paint.setTypeface(typeface); in assertFontSelected()
|
D | TextViewTest.java | 3603 Typeface typeface = Typeface.createFromAsset(context.getAssets(), "multiaxis.ttf"); in testSetGetFontVariationSettings() local 3604 mTextView.setTypeface(typeface); in testSetGetFontVariationSettings()
|
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/ |
D | FontRenderingTests.java | 56 final Typeface typeface = Typeface.create(family, style); in fontTestBody() local 63 p.setTypeface(typeface); in fontTestBody()
|
/cts/tests/tests/provider/src/android/provider/cts/ |
D | FontsContractTest.java | 110 public void onTypefaceRetrieved(Typeface typeface) { in onTypefaceRetrieved() argument 112 mTypeface = typeface; in onTypefaceRetrieved()
|