Home
last modified time | relevance | path

Searched refs:italic (Results 1 – 25 of 34) sorted by relevance

12

/frameworks/base/libs/hwui/hwui/
DTypeface.cpp39 static Typeface::Style computeAPIStyle(int weight, bool italic) { in computeAPIStyle() argument
42 return italic ? Typeface::kBoldItalic : Typeface::kBold; in computeAPIStyle()
44 return italic ? Typeface::kItalic : Typeface::kNormal; in computeAPIStyle()
48 static minikin::FontStyle computeMinikinStyle(int weight, bool italic) { in computeMinikinStyle() argument
50 static_cast<minikin::FontStyle::Slant>(italic)); in computeMinikinStyle()
59 bool italic = (relativeStyle & Typeface::kItalic) != 0; in computeRelativeStyle() local
60 return computeMinikinStyle(weight, italic); in computeRelativeStyle()
82 Typeface* Typeface::createAbsolute(Typeface* base, int weight, bool italic) { in createAbsolute() argument
88 result->fAPIStyle = computeAPIStyle(weight, italic); in createAbsolute()
89 result->fStyle = computeMinikinStyle(weight, italic); in createAbsolute()
[all …]
DTypeface.h72 static Typeface* createAbsolute(Typeface* base, int weight, bool italic);
78 std::vector<std::shared_ptr<minikin::FontFamily>>&& families, int weight, int italic);
/frameworks/base/libs/hwui/tests/unit/
DTypefaceTests.cpp110 std::unique_ptr<Typeface> italic(Typeface::createRelative(nullptr, Typeface::kItalic)); in TEST() local
111 EXPECT_EQ(400, italic->fStyle.weight()); in TEST()
112 EXPECT_EQ(minikin::FontStyle::Slant::ITALIC, italic->fStyle.slant()); in TEST()
113 EXPECT_EQ(Typeface::kItalic, italic->fAPIStyle); in TEST()
141 std::unique_ptr<Typeface> italic(Typeface::createRelative(base.get(), Typeface::kItalic)); in TEST() local
142 EXPECT_EQ(700, italic->fStyle.weight()); in TEST()
143 EXPECT_EQ(minikin::FontStyle::Slant::ITALIC, italic->fStyle.slant()); in TEST()
144 EXPECT_EQ(Typeface::kItalic, italic->fAPIStyle); in TEST()
174 std::unique_ptr<Typeface> italic(Typeface::createRelative(base.get(), Typeface::kItalic)); in TEST() local
175 EXPECT_EQ(300, italic->fStyle.weight()); in TEST()
[all …]
/frameworks/base/graphics/java/android/graphics/fonts/
DFontFileUtil.java55 private static int pack(@IntRange(from = 0, to = 1000) int weight, boolean italic) { in pack() argument
56 return weight | (italic ? 0x10000 : 0); in pack()
72 int italic = -1; in analyzeStyle() local
78 italic = (axis.getStyleValue() == 1.0f) ? 1 : 0; in analyzeStyle()
83 if (weight != -1 && italic != -1) { in analyzeStyle()
87 return pack(weight, italic == 1); in analyzeStyle()
129 italic == -1 ? italicFromOS2 : italic == 1); in analyzeStyle()
/frameworks/base/core/tests/coretests/src/android/graphics/
DFontFileUtilTest.java105 boolean italic = style.second.booleanValue(); in testRegularFonts()
106 String path = FontTestUtil.getFontPathFromStyle(weight, italic); in testRegularFonts()
111 assertEquals(path, italic, FontFileUtil.unpackItalic(packed)); in testRegularFonts()
122 boolean italic = style.second.booleanValue(); in testTtcFont()
123 int ttcIndex = FontTestUtil.getTtcIndexFromStyle(weight, italic); in testTtcFont()
127 assertEquals(path + "#" + ttcIndex, italic, FontFileUtil.unpackItalic(packed)); in testTtcFont()
138 boolean italic = style.second.booleanValue(); in testVariationFont()
139 String axes = FontTestUtil.getVarSettingsFromStyle(weight, italic); in testVariationFont()
144 assertEquals(path + "#" + axes, italic, FontFileUtil.unpackItalic(packed)); in testVariationFont()
DFontTestUtil.java184 public static int getTtcIndexFromStyle(int weight, boolean italic) { in getTtcIndexFromStyle() argument
185 return sTtcMap.get(new Pair<>(weight, italic)).intValue(); in getTtcIndexFromStyle()
191 public static String getVarSettingsFromStyle(int weight, boolean italic) { in getVarSettingsFromStyle() argument
192 return sVariationSettingsMap.get(new Pair<>(weight, italic)); in getVarSettingsFromStyle()
198 public static String getFontPathFromStyle(int weight, boolean italic) { in getFontPathFromStyle() argument
199 return sFontMap.get(new Pair<>(weight, italic)); in getFontPathFromStyle()
DTypefaceTest.java146 final boolean italic = random.nextBoolean(); in testMultithreadCacheStressTest()
147 final Typeface result = Typeface.create(base, weight, italic); in testMultithreadCacheStressTest()
148 assertEquals(italic, result.isItalic()); in testMultithreadCacheStressTest()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/cat/
DTextAttribute.java31 public boolean italic; field in TextAttribute
37 FontSize size, boolean bold, boolean italic, boolean underlined, in TextAttribute() argument
44 this.italic = italic; in TextAttribute()
/frameworks/layoutlib/bridge/src/android/graphics/
DFontFamily_Delegate.java292 FontVariationAxis[] axes, int weight, int italic) { in addFont() argument
298 return delegate != null && delegate.addFont(path, ttcIndex, weight, italic); in addFont()
356 int italic = isItalic ? 1 : 0;
359 delegate.mPostInitRunnables.add(() -> delegate.addFont(path, weight, italic));
362 return delegate.addFont(path, weight, italic);
383 private boolean addFont(final String path, int ttcIndex, int weight, int italic) {
386 mPostInitRunnables.add(() -> addFont(path, weight, italic));
389 return addFont(path, weight, italic);
396 private boolean addFont(@NonNull String path, int weight, int italic) {
411 fontInfo.mIsItalic = italic == RESOLVE_BY_FONT_TABLE ? font.isItalic() : italic == 1;
DTypeface_Delegate.java123 boolean italic) { in nativeCreateFromTypefaceWithExactStyle() argument
132 int style = weight >= 600 ? (italic ? Typeface.BOLD_ITALIC : Typeface.BOLD) : in nativeCreateFromTypefaceWithExactStyle()
133 (italic ? Typeface.ITALIC : Typeface.NORMAL); in nativeCreateFromTypefaceWithExactStyle()
175 int italic) { in nativeCreateFromArray() argument
188 if (italic == Typeface.RESOLVE_BY_FONT_TABLE) { in nativeCreateFromArray()
189 italic = 0; in nativeCreateFromArray()
191 int style = weight >= 600 ? (italic == 1 ? Typeface.BOLD_ITALIC : Typeface.BOLD) : in nativeCreateFromArray()
192 (italic == 1 ? Typeface.ITALIC : Typeface.NORMAL); in nativeCreateFromArray()
DTypeface_Builder_Delegate.java39 @Nullable FontVariationAxis[] axes, int weight, int italic, String fallback) { in createAssetUid() argument
40 return Builder.createAssetUid_Original(mgr, path, ttcIndex, axes, weight, italic, fallback); in createAssetUid()
/frameworks/base/graphics/java/android/graphics/
DTypeface.java463 public Builder setItalic(boolean italic) { in setItalic() argument
464 mItalic = italic ? FontStyle.FONT_SLANT_ITALIC : FontStyle.FONT_SLANT_UPRIGHT; in setItalic()
540 @Nullable FontVariationAxis[] axes, int weight, int italic, String fallback) { in createAssetUid() argument
554 builder.append(Integer.toString(italic)); in createAssetUid()
581 final boolean italic = in resolveFallbackTypeface()
583 return createWeightStyle(base, weight, italic); in resolveFallbackTypeface()
792 final int italic =
794 return new Typeface(nativeCreateFromArray(ptrArray, weight, italic));
901 @IntRange(from = 1, to = 1000) int weight, boolean italic) {
906 return createWeightStyle(family, weight, italic);
[all …]
DFontFamily.java140 int italic) { in addFont() argument
153 return nAddFont(mBuilderPtr, fontBuffer, ttcIndex, weight, italic); in addFont()
165 int weight, int italic) { in addFontFromBuffer() argument
174 return nAddFontWeightStyle(mBuilderPtr, font, ttcIndex, weight, italic); in addFontFromBuffer()
/frameworks/base/libs/hwui/jni/
DTypeface.cpp51 jint weight, jboolean italic) { in Typeface_createFromTypefaceWithExactStyle() argument
52 return toJLong(Typeface::createAbsolute(toTypeface(nativeInstance), weight, italic)); in Typeface_createFromTypefaceWithExactStyle()
94 int weight, int italic) { in Typeface_createFromArray() argument
102 return toJLong(Typeface::createFromFamilies(std::move(familyVec), weight, italic)); in Typeface_createFromArray()
DFontFamily.cpp106 jint weight, jint italic) { in addSkTypeface() argument
135 if (italic != RESOLVE_BY_FONT_TABLE) { in addSkTypeface()
136 fontBuilder.setSlant(static_cast<minikin::FontStyle::Slant>(italic != 0)); in addSkTypeface()
/frameworks/minikin/libs/minikin/
DFontUtils.cpp34 bool analyzeStyle(const uint8_t* os2_data, size_t os2_size, int* weight, bool* italic) { in analyzeStyle() argument
44 *italic = (fsSelection & kItalicFlag) != 0; in analyzeStyle()
DFontUtils.h25 bool analyzeStyle(const uint8_t* os2_data, size_t os2_size, int* weight, bool* italic);
DFontFamily.cpp89 bool italic; in analyzeStyle() local
90 if (!::minikin::analyzeStyle(os2Table.get(), os2Table.size(), &weight, &italic)) { in analyzeStyle()
94 return FontStyle(static_cast<uint16_t>(weight), static_cast<FontStyle::Slant>(italic)); in analyzeStyle()
/frameworks/base/core/java/android/content/res/
DFontResourcesParser.java90 public FontFileResourceEntry(@NonNull String fileName, int weight, int italic, in FontFileResourceEntry() argument
94 mItalic = italic; in FontFileResourceEntry()
222 int italic = array.getInt(R.styleable.FontFamilyFont_fontStyle, in readFont() local
235 return new FontFileResourceEntry(filename, weight, italic, variationSettings, ttcIndex); in readFont()
/frameworks/layoutlib/bridge/src/android/graphics/fonts/
DFont_Builder_Delegate.java92 boolean italic, int ttcIndex) { in nBuild() argument
97 font.mItalic = italic; in nBuild()
DFontFamily_Builder_Delegate.java173 private void addFont(@NonNull Font font, int weight, boolean italic) {
177 fontInfo.mIsItalic = italic;
/frameworks/base/libs/hwui/jni/fonts/
DFont.cpp77 jstring filePath, jint weight, jboolean italic, jint ttcIndex) { in Font_Builder_build() argument
119 .setSlant(static_cast<minikin::FontStyle::Slant>(italic)).build(); in Font_Builder_build()
/frameworks/base/core/java/android/provider/
DFontsContract.java198 boolean italic, int resultCode) { in FontInfo() argument
203 mItalic = italic; in FontInfo()
856 boolean italic; in getFontFromProvider()
859 italic = cursor.getInt(italicColumnIndex) == 1; in getFontFromProvider()
862 italic = false; in getFontFromProvider()
866 result.add(new FontInfo(fileUri, ttcIndex, axes, weight, italic, resultCode)); in getFontFromProvider()
/frameworks/native/include/android/
Dfont_matcher.h163 bool italic) __INTRODUCED_IN(29);
/frameworks/minikin/tests/util/
DFontTestUtils.cpp77 FontStyle::Slant italic = static_cast<FontStyle::Slant>( in getFontFamilies() local
93 FontStyle style(weight, italic); in getFontFamilies()

12