Home
last modified time | relevance | path

Searched refs:FontFamily (Results 1 – 25 of 67) sorted by relevance

123

/frameworks/minikin/include/minikin/
DFontFamily.h40 class FontFamily {
42 static std::shared_ptr<FontFamily> create(std::vector<std::shared_ptr<Font>>&& fonts);
43 static std::shared_ptr<FontFamily> create(FamilyVariant variant,
45 static std::shared_ptr<FontFamily> create(uint32_t localeListId, FamilyVariant variant,
51 static std::shared_ptr<FontFamily> create(const std::shared_ptr<FontFamily>& parent,
54 FontFamily(FontFamily&&) = default;
55 FontFamily& operator=(FontFamily&&) = default;
57 static std::vector<std::shared_ptr<FontFamily>> readVector(BufferReader* reader);
59 const std::vector<std::shared_ptr<FontFamily>>& families);
95 const std::shared_ptr<FontFamily>& getParent() const { return mParent; } in getParent()
[all …]
DFontCollection.h60 const std::vector<std::shared_ptr<FontFamily>>& typefaces);
61 static std::shared_ptr<FontCollection> create(std::shared_ptr<FontFamily>&& typeface);
187 std::vector<std::shared_ptr<FontFamily>>&& families) const;
196 const std::shared_ptr<FontFamily>& getFamilyAt(size_t index) const { in getFamilyAt()
206 explicit FontCollection(const std::vector<std::shared_ptr<FontFamily>>& typefaces);
209 const std::shared_ptr<std::vector<std::shared_ptr<FontFamily>>>& allFontFamilies);
213 const std::unordered_map<std::shared_ptr<FontFamily>, uint32_t>&
217 std::vector<std::shared_ptr<FontFamily>>* outAllFontFamilies,
218 std::unordered_map<std::shared_ptr<FontFamily>, uint32_t>* outFontFamilyToIndexMap);
235 void init(const std::vector<std::shared_ptr<FontFamily>>& typefaces);
[all …]
/frameworks/minikin/libs/minikin/
DFontFamily.cpp40 const std::shared_ptr<FontFamily>& getAncestor(const std::shared_ptr<FontFamily>& family) { in getAncestor()
46 std::shared_ptr<FontFamily> FontFamily::create(std::vector<std::shared_ptr<Font>>&& fonts) { in create()
51 std::shared_ptr<FontFamily> FontFamily::create(FamilyVariant variant, in create()
58 std::shared_ptr<FontFamily> FontFamily::create(uint32_t localeListId, FamilyVariant variant, in create()
63 return std::shared_ptr<FontFamily>(new FontFamily(localeListId, variant, std::move(fonts), in create()
68 std::shared_ptr<FontFamily> FontFamily::create(const std::shared_ptr<FontFamily>& parent, in create()
88 return std::shared_ptr<FontFamily>(new FontFamily(parent, axes)); in create()
91 FontFamily::FontFamily(const std::shared_ptr<FontFamily>& parent, in FontFamily() function in minikin::FontFamily
133 FontFamily::FontFamily(uint32_t localeListId, FamilyVariant variant, in FontFamily() function in minikin::FontFamily
162 FontFamily::FontFamily(BufferReader* reader, const std::shared_ptr<std::vector<Font>>& allFonts) in FontFamily() function in minikin::FontFamily
[all …]
DFontCollection.cpp129 std::shared_ptr<FontCollection> FontCollection::create(std::shared_ptr<FontFamily>&& typeface) { in create()
130 std::vector<std::shared_ptr<FontFamily>> typefaces; in create()
137 const vector<std::shared_ptr<FontFamily>>& typefaces) { in create()
142 FontCollection::FontCollection(const vector<std::shared_ptr<FontFamily>>& typefaces) in FontCollection()
147 void FontCollection::init(const vector<std::shared_ptr<FontFamily>>& typefaces) { in init()
152 auto families = std::make_shared<vector<std::shared_ptr<FontFamily>>>(); in init()
155 const std::shared_ptr<FontFamily>& family = typefaces[i]; in init()
197 const std::shared_ptr<FontFamily>& family = getFamilyAt(j); in init()
214 const std::shared_ptr<std::vector<std::shared_ptr<FontFamily>>>& families) in FontCollection()
237 const std::unordered_map<std::shared_ptr<FontFamily>, uint32_t>& in writeTo() argument
[all …]
/frameworks/base/core/tests/coretests/src/android/graphics/
DFontListParserTest.java22 import static android.text.FontConfig.FontFamily.VARIANT_COMPACT;
23 import static android.text.FontConfig.FontFamily.VARIANT_DEFAULT;
24 import static android.text.FontConfig.FontFamily.VARIANT_ELEGANT;
25 import static android.graphics.fonts.FontFamily.Builder.VARIABLE_FONT_FAMILY_TYPE_NONE;
26 import static android.graphics.fonts.FontFamily.Builder.VARIABLE_FONT_FAMILY_TYPE_SINGLE_FONT_WGHT_…
27 import static android.graphics.fonts.FontFamily.Builder.VARIABLE_FONT_FAMILY_TYPE_SINGLE_FONT_WGHT_…
28 import static android.graphics.fonts.FontFamily.Builder.VARIABLE_FONT_FAMILY_TYPE_TWO_FONTS_WGHT;
69 Collections.singletonList(new FontConfig.FontFamily( in named()
85 FontConfig.FontFamily expected = new FontConfig.FontFamily( in fallback()
95 FontConfig.FontFamily family = readFamily(xml); in fallback()
[all …]
DTypefaceSystemFallbackTest.java31 import android.graphics.fonts.FontFamily;
161 @NonNull ArrayMap<String, FontFamily[]> outFallbackMap) { in buildSystemFallback()
197 Map<String, FontFamily[]> fallbackMap = SystemFonts.buildSystemFallback(fontConfig); in buildSystemFallback()
227 Map<String, FontFamily[]> fallbackMap = SystemFonts.buildSystemFallback(fontConfig); in testBuildSystemFallback()
251 final ArrayMap<String, FontFamily[]> fallbackMap = new ArrayMap<>(); in testBuildSystemFallback_NonExistentFontShouldBeIgnored()
279 final ArrayMap<String, FontFamily[]> fallbackMap = new ArrayMap<>(); in testBuildSystemFallback_NamedFamily()
325 final ArrayMap<String, FontFamily[]> fallbackMap = new ArrayMap<>(); in testBuildSystemFallback_defaultFallback()
370 final ArrayMap<String, FontFamily[]> fallbackMap = new ArrayMap<>(); in testBuildSystemFallback_namedFallbackFamily()
420 final ArrayMap<String, FontFamily[]> fallbackMap = new ArrayMap<>(); in testBuildSystemFallback_namedFallbackFamily2()
466 final ArrayMap<String, FontFamily[]> fallbackMap = new ArrayMap<>(); in testBuildSystemFallback_ImplicitSansSerifFallback()
[all …]
/frameworks/base/rs/java/android/renderscript/
DFont.java65 private static class FontFamily { class in Font
73 private static Map<String, FontFamily> sFontFamilyMap;
98 private static void addFamilyToMap(FontFamily family) { in addFamilyToMap()
105 sFontFamilyMap = new HashMap<String, FontFamily>(); in initFontFamilyMap()
107 FontFamily sansFamily = new FontFamily(); in initFontFamilyMap()
115 FontFamily serifFamily = new FontFamily(); in initFontFamilyMap()
123 FontFamily monoFamily = new FontFamily(); in initFontFamilyMap()
137 FontFamily family = sFontFamilyMap.get(familyName); in getFontFileName()
/frameworks/base/graphics/java/android/graphics/fonts/
DSystemFonts.java105 public static @FontFamily.Builder.VariableFontFamilyType int resolveVarFamilyType( in resolveVarFamilyType()
106 @NonNull FontConfig.FontFamily xmlFamily, in resolveVarFamilyType()
130 return FontFamily.Builder.VARIABLE_FONT_FAMILY_TYPE_NONE; in resolveVarFamilyType()
151 return FontFamily.Builder.VARIABLE_FONT_FAMILY_TYPE_SINGLE_FONT_WGHT_ONLY; in resolveVarFamilyType()
156 return FontFamily.Builder.VARIABLE_FONT_FAMILY_TYPE_TWO_FONTS_WGHT; in resolveVarFamilyType()
161 return FontFamily.Builder.VARIABLE_FONT_FAMILY_TYPE_SINGLE_FONT_WGHT_ITAL; in resolveVarFamilyType()
165 return FontFamily.Builder.VARIABLE_FONT_FAMILY_TYPE_NONE; in resolveVarFamilyType()
168 private static void pushFamilyToFallback(@NonNull FontConfig.FontFamily xmlFamily, in pushFamilyToFallback()
193 final FontFamily defaultFamily = defaultFonts.isEmpty() ? null : createFontFamily( in pushFamilyToFallback()
212 final FontFamily family = createFontFamily(fallback, languageTags, variant, in pushFamilyToFallback()
[all …]
DFontFamily.java69 public final class FontFamily { class
79 NativeAllocationRegistry.createMalloced(FontFamily.class.getClassLoader(),
157 public @Nullable FontFamily buildVariableFamily() { in buildVariableFamily()
162 return build("", FontConfig.FontFamily.VARIANT_DEFAULT, in buildVariableFamily()
172 public @NonNull FontFamily build() { in build()
173 return build("", FontConfig.FontFamily.VARIANT_DEFAULT, in build()
180 public @NonNull FontFamily build(@NonNull String langTags, int variant, in build()
189 final FontFamily family = new FontFamily(ptr); in build()
323 public FontFamily(long ptr) { in FontFamily() method in FontFamily
/frameworks/base/core/java/android/text/
DFontConfig.java59 private final @NonNull List<FontFamily> mFamilies;
74 public FontConfig(@NonNull List<FontFamily> families, @NonNull List<Alias> aliases, in FontConfig()
89 public FontConfig(@NonNull List<FontFamily> families, @NonNull List<Alias> aliases, in FontConfig()
102 public @NonNull List<FontFamily> getFontFamilies() { in getFontFamilies()
160 public @NonNull FontFamily[] getFamilies() { in getFamilies()
161 return mFamilies.toArray(new FontFamily[0]); in getFamilies()
181 final List<FontFamily> families = new ArrayList<>();
182 source.readTypedList(families, FontFamily.CREATOR);
579 public static final class FontFamily implements Parcelable { class in FontConfig
621 public FontFamily(@NonNull List<Font> fonts, @NonNull LocaleList localeList, in FontFamily() method in FontConfig.FontFamily
[all …]
/frameworks/base/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/theme/
DSettingsFontFamily.kt27 import androidx.compose.ui.text.font.FontFamily
32 val brand: FontFamily,
33 val plain: FontFamily,
52 ): FontFamily { in Context()
55 if (fontFamilyNormal.isEmpty() || fontFamilyMedium.isEmpty()) return FontFamily.Default in Context()
56 return FontFamily( in Context()
/frameworks/minikin/tests/unittest/
DFontFamilyTest.cpp564 void expectVSGlyphs(FontFamily* family, uint32_t codepoint, const std::set<uint32_t>& vs) { in expectVSGlyphs()
580 void expectVSGlyphsForVsTestFont(FontFamily* family) { in expectVSGlyphsForVsTestFont()
611 std::shared_ptr<FontFamily> family = buildFontFamily(kVsTestFont); in TEST_F()
630 std::shared_ptr<FontFamily> family = buildFontFamily(testCase.fontPath); in TEST_F()
640 std::shared_ptr<FontFamily> multiAxisFamily = buildFontFamily(kMultiAxisFont); in TEST_F()
641 std::shared_ptr<FontFamily> noAxisFamily = buildFontFamily(kNoAxisFont); in TEST_F()
645 EXPECT_EQ(nullptr, FontFamily::create(multiAxisFamily, std::vector<FontVariation>())); in TEST_F()
646 EXPECT_EQ(nullptr, FontFamily::create(noAxisFamily, std::vector<FontVariation>())); in TEST_F()
651 std::shared_ptr<FontFamily> newFamily = FontFamily::create(multiAxisFamily, variations); in TEST_F()
654 EXPECT_EQ(nullptr, FontFamily::create(noAxisFamily, variations)); in TEST_F()
[all …]
/frameworks/base/core/java/android/graphics/fonts/
DFontFamilyUpdateRequest.java76 public static final class FontFamily { class in FontFamilyUpdateRequest
111 public @NonNull FontFamily build() { in build()
112 return new FontFamily(mName, mFonts); in build()
134 private FontFamily(@NonNull String name, @NonNull List<Font> fonts) { in FontFamily() method in FontFamilyUpdateRequest.FontFamily
289 private final List<FontFamily> mFontFamilies = new ArrayList<>();
319 public Builder addFontFamily(@NonNull FontFamily fontFamily) { in addFontFamily()
338 private final List<FontFamily> mFontFamilies;
341 @NonNull List<FontFamily> fontFamilies) { in FontFamilyUpdateRequest()
359 public List<FontFamily> getFontFamilies() { in getFontFamilies()
/frameworks/minikin/tests/util/
DFontTestUtils.cpp49 std::vector<std::shared_ptr<FontFamily>> getFontFamilies(const std::string& fontDir, in getFontFamilies()
54 std::vector<std::shared_ptr<FontFamily>> families; in getFontFamilies()
107 std::shared_ptr<FontFamily> family; in getFontFamilies()
109 family = FontFamily::create(variant, std::move(fonts)); in getFontFamilies()
112 family = FontFamily::create(langId, variant, std::move(fonts), in getFontFamilies()
126 std::shared_ptr<FontFamily> buildFontFamily(const std::string& filePath) { in buildFontFamily()
130 return FontFamily::create(std::move(fonts)); in buildFontFamily()
133 std::shared_ptr<FontFamily> buildFontFamily(const std::string& filePath, const std::string& lang, in buildFontFamily()
138 return FontFamily::create(LocaleListCache::getId(lang), FamilyVariant::DEFAULT, in buildFontFamily()
DFontTestUtils.h32 std::vector<std::shared_ptr<FontFamily>> getFontFamilies(const std::string& fontDir,
55 std::shared_ptr<FontFamily> buildFontFamily(const std::string& filePath);
60 std::shared_ptr<FontFamily> buildFontFamily(const std::string& filePath, const std::string& lang,
66 inline std::shared_ptr<FontFamily> buildFontFamily(const std::string& filePath, in buildFontFamily()
/frameworks/base/services/core/java/com/android/server/graphics/fonts/
DFontManagerShellCommand.java25 import android.graphics.fonts.FontFamily;
164 List<FontConfig.FontFamily> families = fontConfig.getFontFamilies(); in dumpFontConfig()
174 final List<FontConfig.FontFamily> namedFamilies = namedFamilyList.getFamilies(); in dumpFontConfig()
176 final FontConfig.FontFamily family = namedFamilies.get(j); in dumpFontConfig()
195 final FontConfig.FontFamily family = families.get(i); in dumpFontConfig()
205 if (family.getVariant() != FontConfig.FontFamily.VARIANT_DEFAULT) { in dumpFontConfig()
208 case FontConfig.FontFamily.VARIANT_COMPACT: in dumpFontConfig()
211 case FontConfig.FontFamily.VARIANT_ELEGANT: in dumpFontConfig()
243 @NonNull FontFamily[] families) { in dumpFallback()
244 for (FontFamily family : families) { in dumpFallback()
[all …]
DOtfFontFileParser.java23 import android.graphics.fonts.FontFamily;
89 FontFamily family = new FontFamily.Builder(font).build(); in tryToCreateTypeface()
/frameworks/base/libs/hwui/jni/
DFontUtils.h27 class FontFamily; variable
33 explicit FontFamilyWrapper(std::shared_ptr<minikin::FontFamily>&& family) : family(family) {} in FontFamilyWrapper()
34 std::shared_ptr<minikin::FontFamily> family;
/frameworks/base/graphics/java/android/graphics/
DFontFamily.java44 public class FontFamily { class
53 FontFamily.class.getClassLoader(), nGetBuilderReleaseFunc());
57 FontFamily.class.getClassLoader(), nGetFamilyReleaseFunc());
77 public FontFamily() { in FontFamily() method in FontFamily
88 public FontFamily(@Nullable String[] langs, int variant) { in FontFamily() method in FontFamily
DFontListParser.java159 List<FontConfig.FontFamily> families = new ArrayList<>(); in readFamilies()
174 FontConfig.FontFamily family = readFamily(parser, fontDir, updatableFontMap, in readFamilies()
260 public static @Nullable FontConfig.FontFamily readFamily(XmlPullParser parser, String fontDir, in readFamily()
280 int intVariant = FontConfig.FontFamily.VARIANT_DEFAULT; in readFamily()
283 intVariant = FontConfig.FontFamily.VARIANT_COMPACT; in readFamily()
285 intVariant = FontConfig.FontFamily.VARIANT_ELEGANT; in readFamily()
293 return new FontConfig.FontFamily(fonts, LocaleList.forLanguageTags(lang), intVariant); in readFamily()
315 final FontConfig.FontFamily family = readFamily(parser, fontDir, updatableFontMap, in readNamedFamily()
331 final List<FontConfig.FontFamily> familyList = new ArrayList<>(); in readNamedFamilyList()
341 final FontConfig.FontFamily family = readFamily(parser, fontDir, updatableFontMap, in readNamedFamilyList()
DTypeface.java33 import android.graphics.fonts.FontFamily;
174 static final Map<String, android.graphics.FontFamily[]> sSystemFallbackMap =
341 FontFamily.Builder familyBuilder = null; in createFromResources()
356 familyBuilder = new FontFamily.Builder(fontBuilder.build()); in createFromResources()
364 final FontFamily family = familyBuilder.build(); in createFromResources()
701 final FontFamily family = new FontFamily.Builder(font).build(); in build()
790 private final ArrayList<FontFamily> mFamilies = new ArrayList<>();
811 public CustomFallbackBuilder(@NonNull FontFamily family) { in CustomFallbackBuilder()
859 public @NonNull CustomFallbackBuilder addCustomFallback(@NonNull FontFamily family) { in addCustomFallback()
1119 private static Typeface createFromFamilies(android.graphics.FontFamily[] families) {
[all …]
/frameworks/base/packages/SystemUI/compose/core/src/com/android/compose/theme/typography/
DTypefaceTokens.kt25 import androidx.compose.ui.text.font.FontFamily
38 FontFamily(
43 FontFamily(
/frameworks/native/libs/bufferstreams/examples/app/java/com/android/graphics/bufferstreamsdemoapp/ui/
DType.kt5 import androidx.compose.ui.text.font.FontFamily
12 fontFamily = FontFamily.Default,
/frameworks/base/packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/framework/theme/
DSettingsThemeTest.kt26 import androidx.compose.ui.text.font.FontFamily
65 assertThat(fontFamily.headlineLarge.fontFamily).isSameInstanceAs(FontFamily.Default) in noFontFamilyConfig_useDefaultFontFamily()
66 assertThat(fontFamily.bodyLarge.fontFamily).isSameInstanceAs(FontFamily.Default) in noFontFamilyConfig_useDefaultFontFamily()
/frameworks/minikin/tests/stresstest/
DFontFamilyTest.cpp41 std::shared_ptr<FontFamily> family = FontFamily::create(std::move(fonts)); in TEST_P()

123