Home
last modified time | relevance | path

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

/frameworks/minikin/tests/unittest/
DFontFamilyTest.cpp634 const char* slantToString(FontStyle::Slant slant) { in slantToString()
635 if (slant == FontStyle::Slant::ITALIC) { in slantToString()
642 std::string fontStyleToString(const FontStyle& style) { in fontStyleToString()
652 constexpr FontStyle::Weight THIN = FontStyle::Weight::THIN; in TEST_F()
653 constexpr FontStyle::Weight LIGHT = FontStyle::Weight::LIGHT; in TEST_F()
654 constexpr FontStyle::Weight NORMAL = FontStyle::Weight::NORMAL; in TEST_F()
655 constexpr FontStyle::Weight MEDIUM = FontStyle::Weight::MEDIUM; in TEST_F()
656 constexpr FontStyle::Weight BOLD = FontStyle::Weight::BOLD; in TEST_F()
657 constexpr FontStyle::Weight BLACK = FontStyle::Weight::BLACK; in TEST_F()
659 constexpr FontStyle::Slant UPRIGHT = FontStyle::Slant::UPRIGHT; in TEST_F()
[all …]
DFontCollectionItemizeTest.cpp57 void itemize(const std::shared_ptr<FontCollection>& collection, const char* str, FontStyle style, in itemize()
75 itemize(collection, str, FontStyle(), localeList, result); in itemize()
79 void itemize(const std::shared_ptr<FontCollection>& collection, const char* str, FontStyle style, in itemize()
87 itemize(collection, str, FontStyle(), "", result); in itemize()
106 const FontStyle kRegularStyle = FontStyle(); in TEST()
107 const FontStyle kItalicStyle = FontStyle(FontStyle::Slant::ITALIC); in TEST()
108 const FontStyle kBoldStyle = FontStyle(FontStyle::Weight::BOLD); in TEST()
109 const FontStyle kBoldItalicStyle = FontStyle(FontStyle::Weight::BOLD, FontStyle::Slant::ITALIC); in TEST()
686 FontStyle kBoldStyle(FontStyle::Weight::BOLD); in TEST()
687 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 {
DFontFamily.h65 Builder& setStyle(FontStyle style) { in setStyle()
80 Builder& setSlant(FontStyle::Slant slant) { in setSlant()
90 uint16_t mWeight = static_cast<uint16_t>(FontStyle::Weight::NORMAL);
91 FontStyle::Slant mSlant = FontStyle::Slant::UPRIGHT;
100 inline FontStyle style() const { return mStyle; } in style()
107 Font(std::shared_ptr<MinikinFont>&& typeface, FontStyle style, HbFontUniquePtr&& baseFont) in Font()
111 static FontStyle analyzeStyle(const HbFontUniquePtr& font);
114 FontStyle mStyle;
139 FakedFont getClosestMatch(FontStyle style) const;
147 FontStyle getStyle(size_t index) const { return mFonts[index].style(); } in getStyle()
DFontCollection.h52 FakedFont baseFontFaked(FontStyle style);
DMinikinFont.h57 FontStyle fontStyle;
DLayoutCache.h90 FontStyle mStyle;
/frameworks/base/libs/hwui/tests/unit/
DTypefaceTests.cpp86 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, bold->fStyle.slant()); in TEST()
91 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, light->fStyle.slant()); in TEST()
99 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, normal->fStyle.slant()); in TEST()
105 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, bold->fStyle.slant()); in TEST()
111 EXPECT_EQ(minikin::FontStyle::Slant::ITALIC, italic->fStyle.slant()); in TEST()
117 EXPECT_EQ(minikin::FontStyle::Slant::ITALIC, boldItalic->fStyle.slant()); in TEST()
128 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, normal->fStyle.slant()); in TEST()
135 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, bold->fStyle.slant()); in TEST()
142 EXPECT_EQ(minikin::FontStyle::Slant::ITALIC, italic->fStyle.slant()); in TEST()
150 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()
124 static int computeMatch(FontStyle style1, FontStyle style2) { in computeMatch()
133 static FontFakery computeFakery(FontStyle wanted, FontStyle actual) { in computeFakery()
138 bool isFakeItalic = wanted.slant() == FontStyle::Slant::ITALIC && in computeFakery()
[all …]
DFontCollection.cpp61 const FontStyle defaultStyle; in init()
374 const FontStyle style = paint.fontStyle; in itemize()
464 FakedFont FontCollection::baseFontFaked(FontStyle style) { in baseFontFaked()
/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()
195 hwTypeface->fStyle = minikin::FontStyle(); in setRobotoTypefaceForTest()
DTypeface.h38 minikin::FontStyle fStyle;
/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/jni/android/graphics/
DFontFamily.cpp140 fontBuilder.setSlant(static_cast<minikin::FontStyle::Slant>(italic != 0)); in addSkTypeface()