/cts/tests/tests/graphics/src/android/graphics/cts/ |
D | TypefaceTest.java | 69 private static float measureText(String text, Typeface typeface) { in measureText() argument 73 paint.setTypeface(typeface); in measureText() 80 final Typeface typeface = ctx.getResources().getFont(R.font.a3em); 81 GLYPH_3EM_WIDTH = measureText("a", typeface); 82 GLYPH_1EM_WIDTH = measureText("b", typeface); 113 Typeface typeface = createTypeface(Typeface.BOLD); in testIsBold() local 114 if (typeface != null) { in testIsBold() 115 assertEquals(Typeface.BOLD, typeface.getStyle()); in testIsBold() 116 assertTrue(typeface.isBold()); in testIsBold() 117 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 | Paint_TextBoundsTest.java | 65 Typeface typeface = Typeface.createFromAsset(am, "fonts/measurement/bbox.ttf"); in getPaint() local 66 paint.setTypeface(typeface); in getPaint()
|
D | PaintTest.java | 482 for (Typeface typeface : TYPEFACES) { in testGetFontSpacing() 483 p.setTypeface(typeface); in testGetFontSpacing() 560 for (Typeface typeface : TYPEFACES) { in testAscent() 561 p.setTypeface(typeface); in testAscent() 900 for (Typeface typeface : TYPEFACES) { 901 p.setTypeface(typeface); 919 for (Typeface typeface : TYPEFACES) { 920 p.setTypeface(typeface); 986 for (Typeface typeface : TYPEFACES) { 987 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 …]
|
D | GB18030Test.kt | 35 typeface = Typeface.create("serif", Typeface.NORMAL) in testLevel2CodePoints()
|
D | SystemFontsTest.java | 193 Typeface typeface = Typeface.create("sans-serif-condensed", Typeface.NORMAL); in testAdjustmentPreserveWidth() local 195 paint.setTypeface(Typeface.create(typeface, w, true)); in testAdjustmentPreserveWidth()
|
/cts/tests/tests/text/src/android/text/cts/ |
D | BoringLayoutFallbackLineSpacingTest.java | 55 Typeface typeface = new Typeface.CustomFallbackBuilder( in testFallbackSpacing_Metrics() local 67 p.setTypeface(typeface); in testFallbackSpacing_Metrics() 89 Typeface typeface = new Typeface.CustomFallbackBuilder( in testFallbackSpacing_Layout() local 101 p.setTypeface(typeface); in testFallbackSpacing_Layout()
|
D | StaticLayoutFallbackLineSpacingTest.java | 52 Typeface typeface = new Typeface.CustomFallbackBuilder( in testFallbackSpacing() local 64 p.setTypeface(typeface); in testFallbackSpacing()
|
D | TextRunAdvancesTest.java | 41 Typeface typeface = Typeface.createFromAsset(am, "fonts/textrunadvances.ttf"); in getPaint() local 42 paint.setTypeface(typeface); in getPaint()
|
D | FallbackLineSpacingTest.java | 50 Typeface typeface = new Typeface.CustomFallbackBuilder( in testFallbackSpacing() local 62 p.setTypeface(typeface); in testFallbackSpacing()
|
D | StaticLayoutLineBreakAutoTest.kt | 74 paint.typeface = Typeface.createFromAsset(context.assets, JP_FONT) in setupPaint() 77 paint.typeface = Typeface.createFromAsset(context.assets, KO_FONT) in setupPaint()
|
D | StaticLayoutLineBreakingNoBreakSpanTest.kt | 47 typeface = Typeface.createFromAsset(context.assets, "fonts/AllOneEmASCIIFont.ttf") in <lambda>()
|
D | EllipsisHyphenationTest.kt | 57 typeface = Typeface.createFromAsset(assets, "fonts/AllOneEmASCIIFont.ttf") in <lambda>()
|
D | BoringLayoutUseBoundsTest.kt | 51 typeface = overshootFont in <lambda>()
|
D | VariableFamilyTest.kt | 171 typeface = Typeface.CustomFallbackBuilder(family).setStyle(style).build() in shape()
|
D | PrecomputedTextTest.java | 785 Typeface typeface = new Typeface.CustomFallbackBuilder( in getTestPaint() local 797 p.setTypeface(typeface); in getTestPaint()
|
/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/uirendering/src/android/uirendering/cts/testclasses/ |
D | PathTests.java | 38 Typeface typeface = paint.getTypeface(); in testTextPathWithOffset() local 41 typeface.getWeight(), in testTextPathWithOffset() 42 typeface.isItalic())); in testTextPathWithOffset()
|
D | FontRenderingTests.java | 58 final Typeface typeface = Typeface.create(family, style); in fontTestBody() local 65 p.setTypeface(typeface); in fontTestBody() 71 typeface.getWeight(), in fontTestBody() 72 typeface.isItalic())); in fontTestBody()
|
/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()
|
/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()
|
/cts/tests/tests/graphics/src/android/graphics/text/cts/ |
D | TextRunShaperTest.java | 190 Typeface typeface = new Typeface.CustomFallbackBuilder( in shapeText_FontCreateFromNative() local 193 paint.setTypeface(typeface); in shapeText_FontCreateFromNative()
|
D | MeasuredTextTest.java | 201 Typeface typeface = Typeface.createFromAsset(am, "fonts/measurement/bbox.ttf"); in testGetBounds_RTL() local 202 paint.setTypeface(typeface); in testGetBounds_RTL()
|
/cts/tests/tests/content/src/android/content/res/cts/ |
D | ResourcesTest.java | 1258 Typeface typeface = mResources.getFont(R.font.sample_downloadable_font); in testSystemFontFamilyReturnsSystemFont() local 1259 assertEquals(typeface, Typeface.create("sans-serif", Typeface.NORMAL)); in testSystemFontFamilyReturnsSystemFont()
|