Home
last modified time | relevance | path

Searched refs:typeface (Results 1 – 25 of 30) sorted by relevance

12

/cts/tests/tests/graphics/src/android/graphics/cts/
DTypefaceTest.java69 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 …]
DTypefaceCustomFallbackBuilderTest.java115 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 …]
DPaint_TextBoundsTest.java65 Typeface typeface = Typeface.createFromAsset(am, "fonts/measurement/bbox.ttf"); in getPaint() local
66 paint.setTypeface(typeface); in getPaint()
DPaintTest.java482 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/
DFontTestUtil.java223 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 …]
DGB18030Test.kt35 typeface = Typeface.create("serif", Typeface.NORMAL) in testLevel2CodePoints()
DSystemFontsTest.java193 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/
DBoringLayoutFallbackLineSpacingTest.java55 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()
DStaticLayoutFallbackLineSpacingTest.java52 Typeface typeface = new Typeface.CustomFallbackBuilder( in testFallbackSpacing() local
64 p.setTypeface(typeface); in testFallbackSpacing()
DTextRunAdvancesTest.java41 Typeface typeface = Typeface.createFromAsset(am, "fonts/textrunadvances.ttf"); in getPaint() local
42 paint.setTypeface(typeface); in getPaint()
DFallbackLineSpacingTest.java50 Typeface typeface = new Typeface.CustomFallbackBuilder( in testFallbackSpacing() local
62 p.setTypeface(typeface); in testFallbackSpacing()
DStaticLayoutLineBreakAutoTest.kt74 paint.typeface = Typeface.createFromAsset(context.assets, JP_FONT) in setupPaint()
77 paint.typeface = Typeface.createFromAsset(context.assets, KO_FONT) in setupPaint()
DStaticLayoutLineBreakingNoBreakSpanTest.kt47 typeface = Typeface.createFromAsset(context.assets, "fonts/AllOneEmASCIIFont.ttf") in <lambda>()
DEllipsisHyphenationTest.kt57 typeface = Typeface.createFromAsset(assets, "fonts/AllOneEmASCIIFont.ttf") in <lambda>()
DBoringLayoutUseBoundsTest.kt51 typeface = overshootFont in <lambda>()
DVariableFamilyTest.kt171 typeface = Typeface.CustomFallbackBuilder(family).setStyle(style).build() in shape()
DPrecomputedTextTest.java785 Typeface typeface = new Typeface.CustomFallbackBuilder( in getTestPaint() local
797 p.setTypeface(typeface); in getTestPaint()
/cts/tests/tests/text/src/android/text/style/cts/
DTypefaceSpanTest.java41 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/
DPathTests.java38 Typeface typeface = paint.getTypeface(); in testTextPathWithOffset() local
41 typeface.getWeight(), in testTextPathWithOffset()
42 typeface.isItalic())); in testTextPathWithOffset()
DFontRenderingTests.java58 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/
DTextViewFontWeightTest.java103 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/
DFontsContractTest.java110 public void onTypefaceRetrieved(Typeface typeface) { in onTypefaceRetrieved() argument
112 mTypeface = typeface; in onTypefaceRetrieved()
/cts/tests/tests/graphics/src/android/graphics/text/cts/
DTextRunShaperTest.java190 Typeface typeface = new Typeface.CustomFallbackBuilder( in shapeText_FontCreateFromNative() local
193 paint.setTypeface(typeface); in shapeText_FontCreateFromNative()
DMeasuredTextTest.java201 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/
DResourcesTest.java1258 Typeface typeface = mResources.getFont(R.font.sample_downloadable_font); in testSystemFontFamilyReturnsSystemFont() local
1259 assertEquals(typeface, Typeface.create("sans-serif", Typeface.NORMAL)); in testSystemFontFamilyReturnsSystemFont()

12