Home
last modified time | relevance | path

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

12

/frameworks/base/libs/hwui/hwui/
DTypeface.cpp37 static Typeface::Style computeAPIStyle(int weight, bool italic) { in computeAPIStyle() argument
40 return italic ? Typeface::kBoldItalic : Typeface::kBold; in computeAPIStyle()
42 return italic ? Typeface::kItalic : Typeface::kNormal; in computeAPIStyle()
46 static minikin::FontStyle computeMinikinStyle(int weight, bool italic) { in computeMinikinStyle() argument
48 static_cast<minikin::FontStyle::Slant>(italic)); in computeMinikinStyle()
57 bool italic = (relativeStyle & Typeface::kItalic) != 0; in computeRelativeStyle() local
58 return computeMinikinStyle(weight, italic); in computeRelativeStyle()
80 Typeface* Typeface::createAbsolute(Typeface* base, int weight, bool italic) { in createAbsolute() argument
86 result->fAPIStyle = computeAPIStyle(weight, italic); in createAbsolute()
87 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()
DFont.java379 final boolean italic = (mItalic == STYLE_ITALIC); in build()
390 final long ptr = nBuild(builderPtr, readonlyBuffer, filePath, mWeight, italic, in build()
415 boolean italic, int ttcIndex); in nBuild() argument
/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/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.java133 int italic) { in addFont() argument
146 return nAddFont(mBuilderPtr, fontBuffer, ttcIndex, weight, italic); in addFont()
158 int weight, int italic) { in addFontFromBuffer() argument
167 return nAddFontWeightStyle(mBuilderPtr, font, ttcIndex, weight, italic); in addFontFromBuffer()
/frameworks/layoutlib/bridge/src/android/graphics/
DFontFamily_Delegate.java298 FontVariationAxis[] axes, int weight, int italic) { in addFont() argument
304 return delegate != null && delegate.addFont(path, ttcIndex, weight, italic); in addFont()
362 int italic = isItalic ? 1 : 0;
365 delegate.mPostInitRunnables.add(() -> delegate.addFont(path, weight, italic));
368 return delegate.addFont(path, weight, italic);
477 private boolean addFont(final String path, int ttcIndex, int weight, int italic) {
480 mPostInitRunnables.add(() -> addFont(path, weight, italic));
483 return addFont(path, weight, italic);
490 private boolean addFont(@NonNull String path, int weight, int italic) {
505 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/layoutlib/bridge/src/android/graphics/fonts/
DFontFamily_Builder_Delegate.java162 private void addFont(final ByteBuffer buffer, int ttcIndex, int weight, boolean italic) {
163 addFont(buffer, weight, italic);
166 private void addFont(@NonNull ByteBuffer buffer, int weight, boolean italic) {
175 fontInfo.mIsItalic = italic;
DFont_Builder_Delegate.java106 boolean italic, int ttcIndex) { in nBuild() argument
111 font.mItalic = italic; in nBuild()
/frameworks/base/core/jni/android/graphics/
DTypeface.cpp56 jint weight, jboolean italic) { in Typeface_createFromTypefaceWithExactStyle() argument
57 return toJLong(Typeface::createAbsolute(toTypeface(nativeInstance), weight, italic)); in Typeface_createFromTypefaceWithExactStyle()
99 int weight, int italic) { in Typeface_createFromArray() argument
107 return toJLong(Typeface::createFromFamilies(std::move(familyVec), weight, italic)); in Typeface_createFromArray()
DFontFamily.cpp111 jint weight, jint italic) { in addSkTypeface() argument
140 if (italic != RESOLVE_BY_FONT_TABLE) { in addSkTypeface()
141 fontBuilder.setSlant(static_cast<minikin::FontStyle::Slant>(italic != 0)); in addSkTypeface()
/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/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/provider/
DFontsContract.java198 boolean italic, int resultCode) { in FontInfo() argument
203 mItalic = italic; in FontInfo()
849 boolean italic; in getFontFromProvider()
852 italic = cursor.getInt(italicColumnIndex) == 1; in getFontFromProvider()
855 italic = false; in getFontFromProvider()
859 result.add(new FontInfo(fileUri, ttcIndex, axes, weight, italic, resultCode)); in getFontFromProvider()
/frameworks/minikin/tests/util/
DFontTestUtils.cpp77 FontStyle::Slant italic = static_cast<FontStyle::Slant>( in getFontFamilies() local
93 FontStyle style(weight, italic); in getFontFamilies()
/frameworks/native/include/android/
Dfont_matcher.h163 bool italic) __INTRODUCED_IN(29);

12