Home
last modified time | relevance | path

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

12

/frameworks/minikin/tests/unittest/
DFontFamilyTest.cpp646 const char* slantToString(FontStyle::Slant slant) { in slantToString()
647 if (slant == FontStyle::Slant::ITALIC) { in slantToString()
654 std::string fontStyleToString(const FontStyle& style) { in fontStyleToString()
664 constexpr FontStyle::Weight THIN = FontStyle::Weight::THIN; in TEST_F()
665 constexpr FontStyle::Weight LIGHT = FontStyle::Weight::LIGHT; in TEST_F()
666 constexpr FontStyle::Weight NORMAL = FontStyle::Weight::NORMAL; in TEST_F()
667 constexpr FontStyle::Weight MEDIUM = FontStyle::Weight::MEDIUM; in TEST_F()
668 constexpr FontStyle::Weight BOLD = FontStyle::Weight::BOLD; in TEST_F()
669 constexpr FontStyle::Weight BLACK = FontStyle::Weight::BLACK; in TEST_F()
671 constexpr FontStyle::Slant UPRIGHT = FontStyle::Slant::UPRIGHT; in TEST_F()
[all …]
DFontCollectionItemizeTest.cpp60 const char* str, FontStyle style, in itemize()
88 return itemize(collection, str, FontStyle(), localeList); in itemize()
93 const char* str, FontStyle style) { in itemize()
100 return itemize(collection, str, FontStyle(), ""); in itemize()
118 const FontStyle kRegularStyle = FontStyle(); in TEST()
119 const FontStyle kItalicStyle = FontStyle(FontStyle::Slant::ITALIC); in TEST()
120 const FontStyle kBoldStyle = FontStyle(FontStyle::Weight::BOLD); in TEST()
121 const FontStyle kBoldItalicStyle = FontStyle(FontStyle::Weight::BOLD, FontStyle::Slant::ITALIC); in TEST()
690 FontStyle kBoldStyle(FontStyle::Weight::BOLD); in TEST()
691 FontStyle kItalicStyle(FontStyle::Slant::ITALIC); in TEST()
[all …]
/frameworks/minikin/include/minikin/
DFontStyle.h23 class FontStyle {
43 constexpr FontStyle() : FontStyle(Weight::NORMAL, Slant::UPRIGHT) {} in FontStyle() function
44 constexpr explicit FontStyle(Weight weight) : FontStyle(weight, Slant::UPRIGHT) {} in FontStyle() function
45 constexpr explicit FontStyle(Slant slant) : FontStyle(Weight::NORMAL, slant) {} in FontStyle() function
46 constexpr FontStyle(Weight weight, Slant slant) in FontStyle() function
47 : FontStyle(static_cast<uint16_t>(weight), slant) {} in FontStyle()
48 constexpr FontStyle(uint16_t weight, Slant slant) : mWeight(weight), mSlant(slant) {} in FontStyle() function
53 constexpr bool operator==(const FontStyle& other) const {
DFont.h70 Builder& setStyle(FontStyle style) { in setStyle()
85 Builder& setSlant(FontStyle::Slant slant) { in setSlant()
95 uint16_t mWeight = static_cast<uint16_t>(FontStyle::Weight::NORMAL);
96 FontStyle::Slant mSlant = FontStyle::Slant::UPRIGHT;
113 inline FontStyle style() const { return mStyle; } in style()
120 Font(std::shared_ptr<MinikinFont>&& typeface, FontStyle style, HbFontUniquePtr&& baseFont) in Font()
124 static FontStyle analyzeStyle(const HbFontUniquePtr& font);
127 FontStyle mStyle;
DFontCollection.h45 std::vector<Run> itemize(U16StringPiece text, FontStyle style, uint32_t localeListId,
49 std::vector<Run> itemize(U16StringPiece text, FontStyle style, uint32_t localeListId, in itemize()
60 FakedFont baseFontFaked(FontStyle style);
DFontFamily.h41 FakedFont getClosestMatch(FontStyle style) const;
49 FontStyle getStyle(size_t index) const { return mFonts[index].style(); } in getStyle()
DMinikinPaint.h71 FontStyle fontStyle;
DLayoutCache.h90 FontStyle mStyle;
/frameworks/base/libs/hwui/tests/unit/
DTypefaceTests.cpp87 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, bold->fStyle.slant()); in TEST()
92 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, light->fStyle.slant()); in TEST()
100 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, normal->fStyle.slant()); in TEST()
106 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, bold->fStyle.slant()); in TEST()
112 EXPECT_EQ(minikin::FontStyle::Slant::ITALIC, italic->fStyle.slant()); in TEST()
118 EXPECT_EQ(minikin::FontStyle::Slant::ITALIC, boldItalic->fStyle.slant()); in TEST()
129 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, normal->fStyle.slant()); in TEST()
136 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, bold->fStyle.slant()); in TEST()
143 EXPECT_EQ(minikin::FontStyle::Slant::ITALIC, italic->fStyle.slant()); in TEST()
151 EXPECT_EQ(minikin::FontStyle::Slant::ITALIC, boldItalic->fStyle.slant()); in TEST()
[all …]
/frameworks/minikin/libs/minikin/
DFontFamily.cpp43 return Font(std::move(mTypeface), FontStyle(mWeight, mSlant), prepareFont(mTypeface)); in build()
47 FontStyle styleFromFont = analyzeStyle(font); in build()
54 return Font(std::move(mTypeface), FontStyle(mWeight, mSlant), std::move(font)); in build()
82 FontStyle Font::analyzeStyle(const HbFontUniquePtr& font) { in analyzeStyle()
85 return FontStyle(); in analyzeStyle()
91 return FontStyle(); in analyzeStyle()
94 return FontStyle(static_cast<uint16_t>(weight), static_cast<FontStyle::Slant>(italic)); in analyzeStyle()
127 static int computeMatch(FontStyle style1, FontStyle style2) { in computeMatch()
136 static FontFakery computeFakery(FontStyle wanted, FontStyle actual) { in computeFakery()
141 bool isFakeItalic = wanted.slant() == FontStyle::Slant::ITALIC && in computeFakery()
[all …]
DFontCollection.cpp60 const FontStyle defaultStyle; in init()
371 std::vector<FontCollection::Run> FontCollection::itemize(U16StringPiece text, FontStyle style, in itemize()
481 FakedFont FontCollection::baseFontFaked(FontStyle style) { in baseFontFaked()
/frameworks/base/graphics/java/android/graphics/fonts/
DFontStyle.java47 public final class FontStyle { class
129 public FontStyle() { in FontStyle() method in FontStyle
207 public FontStyle(int weight, @FontSlant int slant) { in FontStyle() method in FontStyle
242 public int getMatchScore(@NonNull FontStyle o) { in getMatchScore()
251 if (o == null || !(o instanceof FontStyle)) { in equals()
254 FontStyle fontStyle = (FontStyle) o; in equals()
DFont.java295 @IntRange(from = FontStyle.FONT_WEIGHT_MIN, to = FontStyle.FONT_WEIGHT_MAX) in setWeight()
298 FontStyle.FONT_WEIGHT_MIN <= weight && weight <= FontStyle.FONT_WEIGHT_MAX); in setWeight()
314 public @NonNull Builder setSlant(@FontStyle.FontSlant int slant) { in setSlant()
315 mItalic = slant == FontStyle.FONT_SLANT_UPRIGHT ? STYLE_NORMAL : STYLE_ITALIC; in setSlant()
377 mWeight = Math.max(FontStyle.FONT_WEIGHT_MIN, in build()
378 Math.min(FontStyle.FONT_WEIGHT_MAX, mWeight)); in build()
381 ? FontStyle.FONT_SLANT_ITALIC : FontStyle.FONT_SLANT_UPRIGHT; in build()
393 new FontStyle(mWeight, slant), mTtcIndex, mAxes, mLocaleList); in build()
423 private final FontStyle mFontStyle;
432 @NonNull FontStyle fontStyle, @IntRange(from = 0) int ttcIndex, in Font()
[all …]
DSystemFonts.java195 .setSlant(fontConfig.isItalic() ? FontStyle.FONT_SLANT_ITALIC in createFontFamily()
196 : FontStyle.FONT_SLANT_UPRIGHT) in createFontFamily()
/frameworks/base/libs/hwui/hwui/
DTypeface.cpp46 static minikin::FontStyle computeMinikinStyle(int weight, bool italic) { in computeMinikinStyle()
47 return minikin::FontStyle(uirenderer::MathUtils::clamp(weight, 1, 1000), in computeMinikinStyle()
48 static_cast<minikin::FontStyle::Slant>(italic)); in computeMinikinStyle()
52 static minikin::FontStyle computeRelativeStyle(int baseWeight, Typeface::Style relativeStyle) { in computeRelativeStyle()
134 const minikin::FontStyle defaultStyle; in createFromFamilies()
198 hwTypeface->fStyle = minikin::FontStyle(); in setRobotoTypefaceForTest()
DTypeface.h38 minikin::FontStyle fStyle;
/frameworks/base/graphics/java/android/graphics/
DTypeface.java32 import android.graphics.fonts.FontStyle;
167 private @IntRange(from = 0, to = FontStyle.FONT_WEIGHT_MAX) int mWeight = 0;
261 ? FontStyle.FONT_SLANT_ITALIC : FontStyle.FONT_SLANT_UPRIGHT); in createFromResources()
274 final FontStyle normal = new FontStyle(FontStyle.FONT_WEIGHT_NORMAL, in createFromResources()
275 FontStyle.FONT_SLANT_UPRIGHT); in createFromResources()
464 mItalic = italic ? FontStyle.FONT_SLANT_ITALIC : FontStyle.FONT_SLANT_UPRIGHT; in setItalic()
616 .setStyle(new FontStyle(weight, slant)); in build()
701 private @Nullable FontStyle mStyle;
753 public @NonNull CustomFallbackBuilder setStyle(@NonNull FontStyle style) { in setStyle()
793 (mStyle == null || mStyle.getSlant() == FontStyle.FONT_SLANT_UPRIGHT) ? 0 : 1;
/frameworks/minikin/tests/util/
DFontTestUtils.cpp77 FontStyle::Slant italic = static_cast<FontStyle::Slant>( in getFontFamilies()
93 FontStyle style(weight, italic); in getFontFamilies()
/frameworks/base/core/java/android/provider/
DFontsContract.java34 import android.graphics.fonts.FontStyle;
647 ? FontStyle.FONT_SLANT_ITALIC : FontStyle.FONT_SLANT_UPRIGHT) in buildTypeface()
670 final FontStyle normal = new FontStyle(FontStyle.FONT_WEIGHT_NORMAL, in buildTypeface()
671 FontStyle.FONT_SLANT_UPRIGHT); in buildTypeface()
/frameworks/base/native/android/
Dsystem_fonts.cpp68 minikin::FontStyle mFontStyle;
227 matcher->mFontStyle = minikin::FontStyle( in AFontMatcher_setStyle()
228 weight, static_cast<minikin::FontStyle::Slant>(italic)); in AFontMatcher_setStyle()
262 result->mItalic = font->style().slant() == minikin::FontStyle::Slant::ITALIC; in AFontMatcher_match()
/frameworks/base/core/java/android/text/style/
DTextAppearanceSpan.java25 import android.graphics.fonts.FontStyle;
493 final int weight = Math.min(FontStyle.FONT_WEIGHT_MAX, mTextFontWeight); in updateMeasureState()
/frameworks/base/core/jni/android/graphics/fonts/
DFont.cpp179 .setSlant(static_cast<minikin::FontStyle::Slant>(italic)).build(); in Font_Builder_build()
/frameworks/base/core/jni/android/graphics/
DFontFamily.cpp141 fontBuilder.setSlant(static_cast<minikin::FontStyle::Slant>(italic != 0)); in addSkTypeface()
/frameworks/base/core/java/android/widget/
DTextView.java69 import android.graphics.fonts.FontStyle;
2124 @IntRange(from = -1, to = FontStyle.FONT_WEIGHT_MAX) int weight) { in setTypefaceFromAttrs()
2151 @IntRange(from = -1, to = FontStyle.FONT_WEIGHT_MAX) int weight) { in resolveStyleAndSetTypeface()
2153 weight = Math.min(FontStyle.FONT_WEIGHT_MAX, weight); in resolveStyleAndSetTypeface()
/frameworks/base/config/
Dpreloaded-classes1381 android.graphics.fonts.FontStyle

12