/frameworks/minikin/include/minikin/ |
D | FontStyle.h | 27 class FontStyle { 47 constexpr FontStyle() : FontStyle(Weight::NORMAL, Slant::UPRIGHT) {} in FontStyle() function 48 constexpr explicit FontStyle(Weight weight) : FontStyle(weight, Slant::UPRIGHT) {} in FontStyle() function 49 constexpr explicit FontStyle(Slant slant) : FontStyle(Weight::NORMAL, slant) {} in FontStyle() function 50 constexpr FontStyle(Weight weight, Slant slant) in FontStyle() function 51 : FontStyle(static_cast<uint16_t>(weight), slant) {} in FontStyle() 52 constexpr FontStyle(uint16_t weight, Slant slant) : mWeight(weight), mSlant(slant) {} in FontStyle() function 53 explicit FontStyle(BufferReader* reader) { in FontStyle() function 75 inline std::ostream& operator<<(std::ostream& os, const FontStyle::Slant& slant) { 77 case FontStyle::Slant::ITALIC: [all …]
|
D | Font.h | 113 Builder& setStyle(FontStyle style) { in setStyle() 128 Builder& setSlant(FontStyle::Slant slant) { in setSlant() 143 uint16_t mWeight = static_cast<uint16_t>(FontStyle::Weight::NORMAL); 144 FontStyle::Slant mSlant = FontStyle::Slant::UPRIGHT; 162 inline FontStyle style() const { return mStyle; } in style() 199 Font(std::shared_ptr<MinikinFont>&& typeface, FontStyle style, HbFontUniquePtr&& baseFont, in Font() 215 static FontStyle analyzeStyle(const HbFontUniquePtr& font); 220 FontStyle mStyle;
|
D | FontFamily.h | 61 FakedFont getClosestMatch(FontStyle style) const; 62 FakedFont getVariationFamilyAdjustment(FontStyle style) const; 71 FontStyle getStyle(size_t index) const { return mFonts[index]->style(); } in getStyle()
|
D | FontCollection.h | 158 FakedFont getBestFont(U16StringPiece textBuf, const Run& run, FontStyle style); 161 std::vector<Run> itemize(U16StringPiece text, FontStyle style, uint32_t localeListId, 165 std::vector<Run> itemize(U16StringPiece text, FontStyle style, uint32_t localeListId, in itemize() 178 FakedFont baseFontFaked(FontStyle style);
|
/frameworks/minikin/tests/unittest/ |
D | FontFamilyTest.cpp | 771 const char* slantToString(FontStyle::Slant slant) { in slantToString() 772 if (slant == FontStyle::Slant::ITALIC) { in slantToString() 779 std::string fontStyleToString(const FontStyle& style) { in fontStyleToString() 789 constexpr FontStyle::Weight THIN = FontStyle::Weight::THIN; in TEST_F() 790 constexpr FontStyle::Weight LIGHT = FontStyle::Weight::LIGHT; in TEST_F() 791 constexpr FontStyle::Weight NORMAL = FontStyle::Weight::NORMAL; in TEST_F() 792 constexpr FontStyle::Weight MEDIUM = FontStyle::Weight::MEDIUM; in TEST_F() 793 constexpr FontStyle::Weight BOLD = FontStyle::Weight::BOLD; in TEST_F() 794 constexpr FontStyle::Weight BLACK = FontStyle::Weight::BLACK; in TEST_F() 796 constexpr FontStyle::Slant UPRIGHT = FontStyle::Slant::UPRIGHT; in TEST_F() [all …]
|
D | FontCollectionItemizeTest.cpp | 67 FontStyle style, const std::string& localeList) { in itemize() 99 return itemize(collection, str, FontStyle(), localeList); in itemize() 104 FontStyle style) { in itemize() 110 return itemize(collection, str, FontStyle(), ""); in itemize() 127 const FontStyle kRegularStyle = FontStyle(); in TEST() 128 const FontStyle kItalicStyle = FontStyle(FontStyle::Slant::ITALIC); in TEST() 129 const FontStyle kBoldStyle = FontStyle(FontStyle::Weight::BOLD); in TEST() 130 const FontStyle kBoldItalicStyle = FontStyle(FontStyle::Weight::BOLD, FontStyle::Slant::ITALIC); in TEST() 699 FontStyle kBoldStyle(FontStyle::Weight::BOLD); in TEST() 700 FontStyle kItalicStyle(FontStyle::Slant::ITALIC); in TEST() [all …]
|
/frameworks/base/libs/hwui/tests/unit/ |
D | TypefaceTests.cpp | 94 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, bold->fStyle.slant()); in TEST() 99 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, light->fStyle.slant()); in TEST() 107 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, normal->fStyle.slant()); in TEST() 113 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, bold->fStyle.slant()); in TEST() 119 EXPECT_EQ(minikin::FontStyle::Slant::ITALIC, italic->fStyle.slant()); in TEST() 125 EXPECT_EQ(minikin::FontStyle::Slant::ITALIC, boldItalic->fStyle.slant()); in TEST() 136 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, normal->fStyle.slant()); in TEST() 143 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, bold->fStyle.slant()); in TEST() 150 EXPECT_EQ(minikin::FontStyle::Slant::ITALIC, italic->fStyle.slant()); in TEST() 158 EXPECT_EQ(minikin::FontStyle::Slant::ITALIC, boldItalic->fStyle.slant()); in TEST() [all …]
|
/frameworks/base/graphics/java/android/graphics/fonts/ |
D | FontStyle.java | 47 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()
|
D | Font.java | 384 @IntRange(from = FontStyle.FONT_WEIGHT_MIN, to = FontStyle.FONT_WEIGHT_MAX) in setWeight() 387 FontStyle.FONT_WEIGHT_MIN <= weight && weight <= FontStyle.FONT_WEIGHT_MAX); in setWeight() 403 public @NonNull Builder setSlant(@FontStyle.FontSlant int slant) { in setSlant() 404 mItalic = slant == FontStyle.FONT_SLANT_UPRIGHT ? STYLE_NORMAL : STYLE_ITALIC; in setSlant() 466 mWeight = Math.max(FontStyle.FONT_WEIGHT_MIN, in build() 467 Math.min(FontStyle.FONT_WEIGHT_MAX, mWeight)); in build() 470 ? FontStyle.FONT_SLANT_ITALIC : FontStyle.FONT_SLANT_UPRIGHT; in build() 518 private FontStyle mFontStyle = null; 592 public @NonNull FontStyle getStyle() { in getStyle() 596 mFontStyle = new FontStyle( in getStyle() [all …]
|
/frameworks/base/core/tests/coretests/src/android/graphics/ |
D | FontListParserTest.java | 19 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; 35 import android.graphics.fonts.FontStyle; 71 new FontStyle(FONT_WEIGHT_NORMAL, FONT_SLANT_UPRIGHT), 0, "", null, in named() 88 new FontStyle(FONT_WEIGHT_NORMAL, FONT_SLANT_UPRIGHT), in fallback() 91 new FontStyle(FONT_WEIGHT_NORMAL, FONT_SLANT_UPRIGHT), in fallback() 108 new FontStyle(FONT_WEIGHT_NORMAL, FONT_SLANT_UPRIGHT), in compact() 125 new FontStyle(FONT_WEIGHT_NORMAL, FONT_SLANT_UPRIGHT), in elegant() 144 new FontStyle(FONT_WEIGHT_NORMAL, FONT_SLANT_UPRIGHT), 0, "", null, in styles() [all …]
|
/frameworks/base/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/util/ |
D | AnnotatedStringResource.kt | 34 import androidx.compose.ui.text.font.FontStyle 69 SpanStyle(fontWeight = FontWeight.Normal, fontStyle = FontStyle.Normal), in AnnotatedString() 75 SpanStyle(fontWeight = FontWeight.Bold, fontStyle = FontStyle.Normal), in AnnotatedString() 81 SpanStyle(fontWeight = FontWeight.Normal, fontStyle = FontStyle.Italic), in AnnotatedString() 87 SpanStyle(fontWeight = FontWeight.Bold, fontStyle = FontStyle.Italic), in AnnotatedString()
|
/frameworks/base/core/java/android/graphics/fonts/ |
D | FontFamilyUpdateRequest.java | 166 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()
|
D | FontUpdateRequest.java | 80 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()
|
/frameworks/minikin/libs/minikin/ |
D | Font.cpp | 62 return std::shared_ptr<Font>(new Font(std::move(mTypeface), FontStyle(mWeight, mSlant), in build() 67 FontStyle styleFromFont = analyzeStyle(font); in build() 74 return std::shared_ptr<Font>(new Font(std::move(mTypeface), FontStyle(mWeight, mSlant), in build() 82 mStyle = FontStyle(reader); in Font() 238 FontStyle Font::analyzeStyle(const HbFontUniquePtr& font) { in analyzeStyle() 241 return FontStyle(); in analyzeStyle() 247 return FontStyle(); in analyzeStyle() 250 return FontStyle(static_cast<uint16_t>(weight), static_cast<FontStyle::Slant>(italic)); in analyzeStyle()
|
D | FontFamily.cpp | 286 static int computeMatch(FontStyle style1, FontStyle style2) { in computeMatch() 295 static FontFakery computeFakery(FontStyle wanted, FontStyle actual) { in computeFakery() 300 bool isFakeItalic = wanted.slant() == FontStyle::Slant::ITALIC && in computeFakery() 301 actual.slant() == FontStyle::Slant::UPRIGHT; in computeFakery() 305 FakedFont FontFamily::getClosestMatch(FontStyle style) const { in getClosestMatch() 324 FakedFont FontFamily::getVariationFamilyAdjustment(FontStyle style) const { in getVariationFamilyAdjustment() 325 const bool italic = style.slant() == FontStyle::Slant::ITALIC; in getVariationFamilyAdjustment() 339 const std::shared_ptr<Font>& font = getClosestMatch(FontStyle()).font; in computeCoverage()
|
/frameworks/base/core/java/android/view/inputmethod/ |
D | TextAppearanceInfo.java | 28 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()
|
/frameworks/base/libs/hwui/hwui/ |
D | Typeface.cpp | 49 static minikin::FontStyle computeMinikinStyle(int weight, bool italic) { in computeMinikinStyle() 50 return minikin::FontStyle(uirenderer::MathUtils::clamp(weight, 1, 1000), in computeMinikinStyle() 51 static_cast<minikin::FontStyle::Slant>(italic)); in computeMinikinStyle() 55 static minikin::FontStyle computeRelativeStyle(int baseWeight, Typeface::Style relativeStyle) { in computeRelativeStyle() 142 const minikin::FontStyle defaultStyle; in createFromFamilies() 208 hwTypeface->fStyle = minikin::FontStyle(); in setRobotoTypefaceForTest()
|
/frameworks/base/core/java/android/text/style/ |
D | StyleSpan.java | 23 import android.graphics.fonts.FontStyle; 169 Math.max(tf.getWeight() + fontWeightAdjustment, FontStyle.FONT_WEIGHT_MIN), in apply() 170 FontStyle.FONT_WEIGHT_MAX); in apply()
|
D | TextAppearanceSpan.java | 25 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()
|
/frameworks/minikin/tests/util/ |
D | FontTestUtils.cpp | 77 FontStyle::Slant italic = static_cast<FontStyle::Slant>( in getFontFamilies() 93 FontStyle style(weight, italic); in getFontFamilies()
|
/frameworks/base/graphics/java/android/graphics/ |
D | Typeface.java | 34 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;
|
D | FontListParser.java | 25 import android.graphics.fonts.FontStyle; 372 int weight = weightStr == null ? FontStyle.FONT_WEIGHT_NORMAL : Integer.parseInt(weightStr); in readFont() 438 new FontStyle( in readFont() 440 isItalic ? FontStyle.FONT_SLANT_ITALIC : FontStyle.FONT_SLANT_UPRIGHT in readFont() 477 weight = FontStyle.FONT_WEIGHT_NORMAL; in readAlias()
|
/frameworks/base/core/java/android/provider/ |
D | FontsContract.java | 34 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()
|
/frameworks/base/core/java/android/text/ |
D | FontConfig.java | 29 import android.graphics.fonts.FontStyle; 238 private final @NonNull FontStyle mStyle; 266 @NonNull FontStyle style, @IntRange(from = 0) int index, in Font() 312 return new Font(path, originalPath, postScriptName, new FontStyle(weight, slant), 345 public @NonNull FontStyle getStyle() { in getStyle() 427 return getStyle().getSlant() == FontStyle.FONT_SLANT_ITALIC; in isItalic()
|
/frameworks/base/tests/UpdatableSystemFontTest/src/com/android/updatablesystemfont/ |
D | UpdatableSystemFontTest.java | 19 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; 35 import android.graphics.fonts.FontStyle; 398 new FontStyle(FONT_WEIGHT_NORMAL, FONT_SLANT_UPRIGHT)).build(), in updateNotoSerifAs() 400 new FontStyle(FONT_WEIGHT_BOLD, FONT_SLANT_UPRIGHT)).build()); in updateNotoSerifAs()
|