Home
last modified time | relevance | path

Searched refs:FontStyle (Results 1 – 25 of 35) sorted by relevance

12

/aosp14/frameworks/base/libs/hwui/tests/unit/
H A DTypefaceTests.cpp93 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, bold->fStyle.slant()); in TEST()
98 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, light->fStyle.slant()); in TEST()
106 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, normal->fStyle.slant()); in TEST()
112 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, bold->fStyle.slant()); in TEST()
118 EXPECT_EQ(minikin::FontStyle::Slant::ITALIC, italic->fStyle.slant()); in TEST()
142 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, bold->fStyle.slant()); in TEST()
149 EXPECT_EQ(minikin::FontStyle::Slant::ITALIC, italic->fStyle.slant()); in TEST()
175 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, bold->fStyle.slant()); in TEST()
208 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, bold->fStyle.slant()); in TEST()
243 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, bold->fStyle.slant()); in TEST()
[all …]
/aosp14/frameworks/base/core/tests/coretests/src/android/graphics/
H A DFontListParserTest.java19 import static android.graphics.fonts.FontStyle.FONT_SLANT_ITALIC;
20 import static android.graphics.fonts.FontStyle.FONT_SLANT_UPRIGHT;
21 import static android.graphics.fonts.FontStyle.FONT_WEIGHT_NORMAL;
31 import android.graphics.fonts.FontStyle;
82 new FontStyle(FONT_WEIGHT_NORMAL, FONT_SLANT_UPRIGHT), in fallback()
85 new FontStyle(FONT_WEIGHT_NORMAL, FONT_SLANT_UPRIGHT), in fallback()
102 new FontStyle(FONT_WEIGHT_NORMAL, FONT_SLANT_UPRIGHT), in compact()
119 new FontStyle(FONT_WEIGHT_NORMAL, FONT_SLANT_UPRIGHT), in elegant()
140 new FontStyle(100, FONT_SLANT_UPRIGHT), 0, "", null), in styles()
164 new FontStyle(FONT_WEIGHT_NORMAL, FONT_SLANT_UPRIGHT), in variable()
[all …]
/aosp14/frameworks/base/graphics/java/android/graphics/fonts/
H A DFontStyle.java47 public final class FontStyle { class
133 public FontStyle() { in FontStyle() method in FontStyle
211 public FontStyle(int weight, @FontSlant int slant) { in FontStyle() method in FontStyle
246 public int getMatchScore(@NonNull FontStyle o) { in getMatchScore()
255 if (o == null || !(o instanceof FontStyle)) { in equals()
258 FontStyle fontStyle = (FontStyle) o; in equals()
H A DFont.java382 @IntRange(from = FontStyle.FONT_WEIGHT_MIN, to = FontStyle.FONT_WEIGHT_MAX) in setWeight()
385 FontStyle.FONT_WEIGHT_MIN <= weight && weight <= FontStyle.FONT_WEIGHT_MAX); in setWeight()
401 public @NonNull Builder setSlant(@FontStyle.FontSlant int slant) { in setSlant()
402 mItalic = slant == FontStyle.FONT_SLANT_UPRIGHT ? STYLE_NORMAL : STYLE_ITALIC; in setSlant()
464 mWeight = Math.max(FontStyle.FONT_WEIGHT_MIN, in build()
465 Math.min(FontStyle.FONT_WEIGHT_MAX, mWeight)); in build()
468 ? FontStyle.FONT_SLANT_ITALIC : FontStyle.FONT_SLANT_UPRIGHT; in build()
516 private FontStyle mFontStyle = null;
590 public @NonNull FontStyle getStyle() { in getStyle()
594 mFontStyle = new FontStyle( in getStyle()
[all …]
/aosp14/frameworks/base/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/util/
H A DAnnotatedStringResource.kt34 import androidx.compose.ui.text.font.FontStyle
65 fontStyle = FontStyle.Normal
73 fontStyle = FontStyle.Normal
81 fontStyle = FontStyle.Italic
89 fontStyle = FontStyle.Italic
/aosp14/frameworks/base/core/java/android/graphics/fonts/
H A DFontFamilyUpdateRequest.java166 private final @NonNull FontStyle mStyle;
178 public Builder(@NonNull String postScriptName, @NonNull FontStyle style) { in Builder()
219 private final FontStyle mStyle;
241 private Font(@NonNull String postScriptName, @NonNull FontStyle style, in Font()
261 public FontStyle getStyle() { in getStyle()
H A DFontUpdateRequest.java80 private final @NonNull FontStyle mFontStyle;
84 public Font(@NonNull String postScriptName, @NonNull FontStyle fontStyle, in Font()
114 return new Font(fontName, new FontStyle(weight, slant), index, varSettings);
154 int weight = getAttributeValueInt(parser, ATTR_WEIGHT, FontStyle.FONT_WEIGHT_NORMAL); in readFromXml()
155 int slant = getAttributeValueInt(parser, ATTR_SLANT, FontStyle.FONT_SLANT_UPRIGHT); in readFromXml()
160 return new Font(psName, new FontStyle(weight, slant), index, varSettings); in readFromXml()
167 public @NonNull FontStyle getFontStyle() { in getFontStyle()
/aosp14/frameworks/base/core/java/android/view/inputmethod/
H A DTextAppearanceInfo.java28 import android.graphics.fonts.FontStyle;
70 @IntRange(from = FontStyle.FONT_WEIGHT_UNSPECIFIED, to = FontStyle.FONT_WEIGHT_MAX)
219 int textWeight = FontStyle.FONT_WEIGHT_UNSPECIFIED; in createFromTextView()
355 @IntRange(from = FontStyle.FONT_WEIGHT_UNSPECIFIED, to = FontStyle.FONT_WEIGHT_MAX)
596 @IntRange(from = FontStyle.FONT_WEIGHT_UNSPECIFIED, to = FontStyle.FONT_WEIGHT_MAX)
597 private int mTextFontWeight = FontStyle.FONT_WEIGHT_UNSPECIFIED;
654 @IntRange(from = FontStyle.FONT_WEIGHT_UNSPECIFIED, in setTextFontWeight()
655 to = FontStyle.FONT_WEIGHT_MAX) int textFontWeight) { in setTextFontWeight()
/aosp14/frameworks/base/libs/hwui/hwui/
H A DTypeface.cpp48 static minikin::FontStyle computeMinikinStyle(int weight, bool italic) { in computeMinikinStyle()
49 return minikin::FontStyle(uirenderer::MathUtils::clamp(weight, 1, 1000), in computeMinikinStyle()
50 static_cast<minikin::FontStyle::Slant>(italic)); in computeMinikinStyle()
54 static minikin::FontStyle computeRelativeStyle(int baseWeight, Typeface::Style relativeStyle) { in computeRelativeStyle()
141 const minikin::FontStyle defaultStyle; in createFromFamilies()
206 hwTypeface->fStyle = minikin::FontStyle(); in setRobotoTypefaceForTest()
H A DTypeface.h38 minikin::FontStyle fStyle;
/aosp14/frameworks/base/core/java/android/text/style/
H A DStyleSpan.java23 import android.graphics.fonts.FontStyle;
169 Math.max(tf.getWeight() + fontWeightAdjustment, FontStyle.FONT_WEIGHT_MIN), in apply()
170 FontStyle.FONT_WEIGHT_MAX); in apply()
H A DTextAppearanceSpan.java25 import android.graphics.fonts.FontStyle;
152 .TextAppearance_textFontWeight, /*defValue*/ FontStyle.FONT_WEIGHT_UNSPECIFIED); in TextAppearanceSpan()
218 mTextFontWeight = FontStyle.FONT_WEIGHT_UNSPECIFIED; in TextAppearanceSpan()
501 final int weight = Math.min(FontStyle.FONT_WEIGHT_MAX, mTextFontWeight); in updateMeasureState()
/aosp14/frameworks/base/graphics/java/android/graphics/
H A DTypeface.java34 import android.graphics.fonts.FontStyle;
217 private @IntRange(from = 0, to = FontStyle.FONT_WEIGHT_MAX) final int mWeight;
352 ? FontStyle.FONT_SLANT_ITALIC : FontStyle.FONT_SLANT_UPRIGHT); in createFromResources()
365 final FontStyle normal = new FontStyle(FontStyle.FONT_WEIGHT_NORMAL, in createFromResources()
366 FontStyle.FONT_SLANT_UPRIGHT); in createFromResources()
555 mItalic = italic ? FontStyle.FONT_SLANT_ITALIC : FontStyle.FONT_SLANT_UPRIGHT; in setItalic()
707 .setStyle(new FontStyle(weight, slant)); in build()
792 private @Nullable FontStyle mStyle;
844 public @NonNull CustomFallbackBuilder setStyle(@NonNull FontStyle style) { in setStyle()
881 (mStyle == null || mStyle.getSlant() == FontStyle.FONT_SLANT_UPRIGHT) ? 0 : 1;
H A DFontListParser.java25 import android.graphics.fonts.FontStyle;
365 int weight = weightStr == null ? FontStyle.FONT_WEIGHT_NORMAL : Integer.parseInt(weightStr); in readFont()
418 new FontStyle( in readFont()
420 isItalic ? FontStyle.FONT_SLANT_ITALIC : FontStyle.FONT_SLANT_UPRIGHT in readFont()
456 weight = FontStyle.FONT_WEIGHT_NORMAL; in readAlias()
/aosp14/frameworks/base/packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/framework/util/
H A DAnnotatedStringResourceTest.kt21 import androidx.compose.ui.text.font.FontStyle
54 SpanStyle(fontWeight = FontWeight.Bold, fontStyle = FontStyle.Normal))
/aosp14/frameworks/base/core/java/android/provider/
H A DFontsContract.java34 import android.graphics.fonts.FontStyle;
678 ? FontStyle.FONT_SLANT_ITALIC : FontStyle.FONT_SLANT_UPRIGHT) in buildTypeface()
701 final FontStyle normal = new FontStyle(FontStyle.FONT_WEIGHT_NORMAL, in buildTypeface()
702 FontStyle.FONT_SLANT_UPRIGHT); in buildTypeface()
/aosp14/frameworks/base/core/java/android/text/
H A DFontConfig.java29 import android.graphics.fonts.FontStyle;
218 private final @NonNull FontStyle mStyle;
229 @NonNull FontStyle style, @IntRange(from = 0) int index, in Font()
271 return new Font(path, originalPath, postScriptName, new FontStyle(weight, slant),
304 public @NonNull FontStyle getStyle() { in getStyle()
377 return getStyle().getSlant() == FontStyle.FONT_SLANT_ITALIC; in isItalic()
/aosp14/frameworks/base/tests/UpdatableSystemFontTest/src/com/android/updatablesystemfont/
H A DUpdatableSystemFontTest.java19 import static android.graphics.fonts.FontStyle.FONT_SLANT_UPRIGHT;
20 import static android.graphics.fonts.FontStyle.FONT_WEIGHT_BOLD;
21 import static android.graphics.fonts.FontStyle.FONT_WEIGHT_NORMAL;
36 import android.graphics.fonts.FontStyle;
417 new FontStyle(FONT_WEIGHT_NORMAL, FONT_SLANT_UPRIGHT)).build(), in updateNotoSerifAs()
419 new FontStyle(FONT_WEIGHT_BOLD, FONT_SLANT_UPRIGHT)).build()); in updateNotoSerifAs()
/aosp14/frameworks/base/native/android/
H A Dsystem_fonts.cpp102 minikin::FontStyle mFontStyle;
260 font->style().slant() == minikin::FontStyle::Slant::ITALIC, in ASystemFontIterator_open()
292 matcher->mFontStyle = minikin::FontStyle( in AFontMatcher_setStyle()
293 weight, static_cast<minikin::FontStyle::Slant>(italic)); in AFontMatcher_setStyle()
329 result->mItalic = font->style().slant() == minikin::FontStyle::Slant::ITALIC; in AFontMatcher_match()
/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/graphics/fonts/
H A DUpdatableFontDirTest.java27 import android.graphics.fonts.FontStyle;
324 new FontStyle(400, FontStyle.FONT_SLANT_UPRIGHT), 0, null, null); in construct_olderThanPreinstalledFont()
327 new FontStyle(400, FontStyle.FONT_SLANT_UPRIGHT), 0, null, null); in construct_olderThanPreinstalledFont()
489 file, null, "bar", new FontStyle(400, FontStyle.FONT_SLANT_UPRIGHT), in installFontFile_systemFontHasPSNameDifferentFromFileName()
642 file, null, "test", new FontStyle(400, FontStyle.FONT_SLANT_UPRIGHT), 0, null, in installFontFile_preinstalled_downgrade()
/aosp14/frameworks/base/libs/hwui/jni/fonts/
H A DFont.cpp120 .setSlant(static_cast<minikin::FontStyle::Slant>(italic)) in Font_Builder_build()
150 .setSlant(static_cast<minikin::FontStyle::Slant>(italic)) in Font_Builder_clone()
266 uint32_t isItalic = font->font->style().slant() == minikin::FontStyle::Slant::ITALIC ? 1 : 0; in Font_getPackedStyle()
/aosp14/frameworks/base/core/tests/coretests/src/android/view/inputmethod/
H A DTextAppearanceInfoTest.java28 import android.graphics.fonts.FontStyle;
61 private static final int TEXT_WEIGHT = FontStyle.FONT_WEIGHT_MEDIUM;
/aosp14/frameworks/base/libs/hwui/jni/
H A DFontFamily.cpp144 fontBuilder.setSlant(static_cast<minikin::FontStyle::Slant>(italic != 0)); in addSkTypeface()
H A DTypeface.cpp348 typeface->fStyle = minikin::FontStyle(&reader); in Typeface_readTypefaces()
/aosp14/frameworks/base/core/java/android/widget/
H A DTextView.java84 import android.graphics.fonts.FontStyle;
2356 @IntRange(from = FontStyle.FONT_WEIGHT_UNSPECIFIED, to = FontStyle.FONT_WEIGHT_MAX) in setTypefaceFromAttrs()
2384 @IntRange(from = FontStyle.FONT_WEIGHT_UNSPECIFIED, to = FontStyle.FONT_WEIGHT_MAX) in resolveStyleAndSetTypeface()
2387 weight = Math.min(FontStyle.FONT_WEIGHT_MAX, weight); in resolveStyleAndSetTypeface()
4109 int mFontWeight = FontStyle.FONT_WEIGHT_UNSPECIFIED;
4736 Math.max(tf.getWeight() + mFontWeightAdjustment, FontStyle.FONT_WEIGHT_MIN), in setTypeface()
4737 FontStyle.FONT_WEIGHT_MAX); in setTypeface()
7483 Typeface.NORMAL, FontStyle.FONT_WEIGHT_UNSPECIFIED); in setInputType()
7489 Typeface.NORMAL, FontStyle.FONT_WEIGHT_UNSPECIFIED); in setInputType()
7494 FontStyle.FONT_WEIGHT_UNSPECIFIED); in setInputType()

12