Home
last modified time | relevance | path

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

123

/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;
60 FontConfig.FontFamily expected = new FontConfig.FontFamily( in named()
67 FontConfig.FontFamily family = readFamily(xml); in named()
78 FontConfig.FontFamily expected = new FontConfig.FontFamily( in fallback()
88 FontConfig.FontFamily family = readFamily(xml); in fallback()
98 FontConfig.FontFamily expected = new FontConfig.FontFamily( in compact()
105 FontConfig.FontFamily family = readFamily(xml); in compact()
115 FontConfig.FontFamily expected = new FontConfig.FontFamily( in elegant()
[all …]
DTypefaceSystemFallbackTest.java29 import android.graphics.fonts.FontFamily;
147 @NonNull ArrayMap<String, FontFamily[]> outFallbackMap) { in buildSystemFallback()
180 Map<String, FontFamily[]> fallbackMap = SystemFonts.buildSystemFallback(fontConfig); in buildSystemFallback()
210 Map<String, FontFamily[]> fallbackMap = SystemFonts.buildSystemFallback(fontConfig); in testBuildSystemFallback()
234 final ArrayMap<String, FontFamily[]> fallbackMap = new ArrayMap<>(); in testBuildSystemFallback_NonExistentFontShouldBeIgnored()
262 final ArrayMap<String, FontFamily[]> fallbackMap = new ArrayMap<>(); in testBuildSystemFallback_NamedFamily()
308 final ArrayMap<String, FontFamily[]> fallbackMap = new ArrayMap<>(); in testBuildSystemFallback_defaultFallback()
353 final ArrayMap<String, FontFamily[]> fallbackMap = new ArrayMap<>(); in testBuildSystemFallback_namedFallbackFamily()
403 final ArrayMap<String, FontFamily[]> fallbackMap = new ArrayMap<>(); in testBuildSystemFallback_namedFallbackFamily2()
449 final ArrayMap<String, FontFamily[]> fallbackMap = new ArrayMap<>(); in testBuildSystemFallback_ImplicitSansSerifFallback()
[all …]
/frameworks/minikin/libs/minikin/
DFontFamily.cpp38 FontFamily::FontFamily(std::vector<std::shared_ptr<Font>>&& fonts) in FontFamily() function in minikin::FontFamily
39 : FontFamily(FamilyVariant::DEFAULT, std::move(fonts)) {} in FontFamily()
41 FontFamily::FontFamily(FamilyVariant variant, std::vector<std::shared_ptr<Font>>&& fonts) in FontFamily() function in minikin::FontFamily
42 : FontFamily(kEmptyLocaleListId, variant, std::move(fonts), false /* isCustomFallback */) {} in FontFamily()
44 FontFamily::FontFamily(uint32_t localeListId, FamilyVariant variant, in FontFamily() function in minikin::FontFamily
56 FontFamily::FontFamily(uint32_t localeListId, FamilyVariant variant, in FontFamily() function in minikin::FontFamily
72 std::shared_ptr<FontFamily> FontFamily::readFromInternal(BufferReader* reader, in readFromInternal()
94 return std::shared_ptr<FontFamily>(new FontFamily( in readFromInternal()
100 uint32_t FontFamily::readLocaleListInternal(BufferReader* reader) { in readLocaleListInternal()
105 void FontFamily::writeToInternal(BufferWriter* writer) const { in writeToInternal()
[all …]
DFontCollection.cpp64 FontCollection::FontCollection(std::shared_ptr<FontFamily>&& typeface) : mMaxChar(0) { in FontCollection()
65 std::vector<std::shared_ptr<FontFamily>> typefaces; in FontCollection()
70 FontCollection::FontCollection(const vector<std::shared_ptr<FontFamily>>& typefaces) : mMaxChar(0) { in FontCollection()
74 void FontCollection::init(const vector<std::shared_ptr<FontFamily>>& typefaces) { in init()
80 const std::shared_ptr<FontFamily>& family = typefaces[i]; in init()
112 const std::shared_ptr<FontFamily>& family = mFamilies[j]; in init()
128 const std::vector<std::shared_ptr<FontFamily>>& families) { in FontCollection()
153 const std::unordered_map<std::shared_ptr<FontFamily>, uint32_t>& in writeTo() argument
157 for (const std::shared_ptr<FontFamily>& fontFamily : mFamilies) { in writeTo()
178 std::vector<std::shared_ptr<FontFamily>>* outAllFontFamilies, in collectAllFontFamilies()
[all …]
/frameworks/base/graphics/java/android/graphics/fonts/
DSystemFonts.java94 private static void pushFamilyToFallback(@NonNull FontConfig.FontFamily xmlFamily, in pushFamilyToFallback()
95 @NonNull ArrayMap<String, ArrayList<FontFamily>> fallbackMap, in pushFamilyToFallback()
120 final FontFamily defaultFamily = defaultFonts.isEmpty() ? null : createFontFamily( in pushFamilyToFallback()
135 final FontFamily family = createFontFamily( in pushFamilyToFallback()
148 private static @Nullable FontFamily createFontFamily(@NonNull String familyName, in createFontFamily()
151 @FontConfig.FontFamily.Variant int variant, in createFontFamily()
157 FontFamily.Builder b = null; in createFontFamily()
186 b = new FontFamily.Builder(font); in createFontFamily()
194 private static void appendNamedFamily(@NonNull FontConfig.FontFamily xmlFamily, in appendNamedFamily()
196 @NonNull ArrayMap<String, ArrayList<FontFamily>> fallbackListMap) { in appendNamedFamily()
[all …]
DFontCustomizationParser.java20 import static android.text.FontConfig.FontFamily;
49 private final Map<String, FontFamily> mAdditionalNamedFamilies;
57 public Result(Map<String, FontFamily> additionalNamedFamilies, in Result()
63 public Map<String, FontFamily> getAdditionalNamedFamilies() { in getAdditionalNamedFamilies()
88 private static Map<String, FontFamily> validateAndTransformToMap(List<FontFamily> families) { in validateAndTransformToMap()
89 HashMap<String, FontFamily> namedFamily = new HashMap<>(); in validateAndTransformToMap()
91 final FontFamily family = families.get(i); in validateAndTransformToMap()
109 List<FontFamily> families = new ArrayList<>(); in readFamilies()
129 @NonNull List<FontFamily> out, in readFamily()
137 FontFamily fontFamily = FontListParser.readFamily( in readFamily()
DFontFamily.java60 public final class FontFamily { class
68 NativeAllocationRegistry.createMalloced(FontFamily.class.getClassLoader(),
116 public @NonNull FontFamily build() { in build()
117 return build("", FontConfig.FontFamily.VARIANT_DEFAULT, true /* isCustomFallback */); in build()
121 public @NonNull FontFamily build(@NonNull String langTags, int variant, in build()
128 final FontFamily family = new FontFamily(ptr); in build()
150 public FontFamily(long ptr) { in FontFamily() method in FontFamily
/frameworks/minikin/include/minikin/
DFontCollection.h40 explicit FontCollection(const std::vector<std::shared_ptr<FontFamily>>& typefaces);
41 explicit FontCollection(std::shared_ptr<FontFamily>&& typeface);
46 std::vector<std::shared_ptr<FontFamily>> allFontFamilies; in readVector()
49 allFontFamilies.push_back(FontFamily::readFrom<typefaceReader>(reader)); in readVector()
63 std::vector<std::shared_ptr<FontFamily>> allFontFamilies; in writeVector()
65 std::unordered_map<std::shared_ptr<FontFamily>, uint32_t> fontFamilyToIndexMap; in writeVector()
198 const std::vector<std::shared_ptr<FontFamily>>& getFamilies() const { return mFamilies; } in getFamilies()
204 const std::vector<std::shared_ptr<FontFamily>>& allFontFamilies);
208 const std::unordered_map<std::shared_ptr<FontFamily>, uint32_t>&
212 std::vector<std::shared_ptr<FontFamily>>* outAllFontFamilies,
[all …]
DFontFamily.h34 class FontFamily {
36 explicit FontFamily(std::vector<std::shared_ptr<Font>>&& fonts);
37 FontFamily(FamilyVariant variant, std::vector<std::shared_ptr<Font>>&& fonts);
38 FontFamily(uint32_t localeListId, FamilyVariant variant,
42 static std::shared_ptr<FontFamily> readFrom(BufferReader* reader) { in readFrom()
89 std::shared_ptr<FontFamily> createFamilyWithVariation(
93 FontFamily(uint32_t localeListId, FamilyVariant variant,
100 static std::shared_ptr<FontFamily> readFromInternal(BufferReader* reader,
118 MINIKIN_PREVENT_COPY_AND_ASSIGN(FontFamily);
/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/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()
DFontManager.java285 List<FontFamilyUpdateRequest.FontFamily> fontFamilies = request.getFontFamilies(); in updateFontFamily()
287 FontFamilyUpdateRequest.FontFamily fontFamily = fontFamilies.get(i); in updateFontFamily()
/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 = std::make_shared<FontFamily>(variant, std::move(fonts)); in getFontFamilies()
112 family = std::make_shared<FontFamily>(langId, variant, std::move(fonts), in getFontFamilies()
125 std::shared_ptr<FontFamily> buildFontFamily(const std::string& filePath) { in buildFontFamily()
129 return std::make_shared<FontFamily>(std::move(fonts)); in buildFontFamily()
132 std::shared_ptr<FontFamily> buildFontFamily(const std::string& filePath, const std::string& lang, in buildFontFamily()
137 return std::make_shared<FontFamily>(LocaleListCache::getId(lang), FamilyVariant::DEFAULT, in buildFontFamily()
DFontTestUtils.h33 std::vector<std::shared_ptr<FontFamily>> getFontFamilies(const std::string& fontDir,
57 std::shared_ptr<FontFamily> buildFontFamily(const std::string& filePath);
62 std::shared_ptr<FontFamily> buildFontFamily(const std::string& filePath, const std::string& lang,
68 inline std::shared_ptr<FontFamily> buildFontFamily(const std::string& filePath, in buildFontFamily()
/frameworks/base/core/java/android/text/
DFontConfig.java56 private final @NonNull List<FontFamily> mFamilies;
69 public FontConfig(@NonNull List<FontFamily> families, @NonNull List<Alias> aliases, in FontConfig()
83 public @NonNull List<FontFamily> getFontFamilies() { in getFontFamilies()
125 public @NonNull FontFamily[] getFamilies() { in getFamilies()
126 return mFamilies.toArray(new FontFamily[0]); in getFamilies()
145 List<FontFamily> families = source.readParcelableList(new ArrayList<>(),
146 FontFamily.class.getClassLoader());
507 public static final class FontFamily implements Parcelable { class in FontConfig
550 public FontFamily(@NonNull List<Font> fonts, @Nullable String name, in FontFamily() method in FontConfig.FontFamily
615 public static final @NonNull Creator<FontFamily> CREATOR = new Creator<FontFamily>() {
[all …]
/frameworks/minikin/tests/unittest/
DFontFamilyTest.cpp537 void expectVSGlyphs(FontFamily* family, uint32_t codepoint, const std::set<uint32_t>& vs) { in expectVSGlyphs()
553 void expectVSGlyphsForVsTestFont(FontFamily* family) { in expectVSGlyphsForVsTestFont()
584 std::shared_ptr<FontFamily> family = buildFontFamily(kVsTestFont); in TEST_F()
603 std::shared_ptr<FontFamily> family = buildFontFamily(testCase.fontPath); in TEST_F()
613 std::shared_ptr<FontFamily> multiAxisFamily = buildFontFamily(kMultiAxisFont); in TEST_F()
614 std::shared_ptr<FontFamily> noAxisFamily = buildFontFamily(kNoAxisFont); in TEST_F()
625 std::shared_ptr<FontFamily> newFamily( in TEST_F()
635 std::shared_ptr<FontFamily> newFamily( in TEST_F()
651 std::shared_ptr<FontFamily> newFamily( in TEST_F()
673 std::shared_ptr<FontFamily> unicodeEnc1Font = buildFontFamily(kUnicodeEncoding1Font); in TEST_F()
[all …]
/frameworks/base/services/core/java/com/android/server/graphics/fonts/
DFontManagerShellCommand.java25 import android.graphics.fonts.FontFamily;
159 List<FontConfig.FontFamily> families = fontConfig.getFontFamilies(); in dumpFontConfig()
164 final FontConfig.FontFamily family = families.get(i); in dumpFontConfig()
184 final FontConfig.FontFamily family = families.get(i); in dumpFontConfig()
194 if (family.getVariant() != FontConfig.FontFamily.VARIANT_DEFAULT) { in dumpFontConfig()
197 case FontConfig.FontFamily.VARIANT_COMPACT: in dumpFontConfig()
200 case FontConfig.FontFamily.VARIANT_ELEGANT: in dumpFontConfig()
232 @NonNull FontFamily[] families) { in dumpFallback()
233 for (FontFamily family : families) { in dumpFallback()
238 private void dumpFamily(@NonNull IndentingPrintWriter writer, @NonNull FontFamily family) { in dumpFamily()
[all …]
DOtfFontFileParser.java23 import android.graphics.fonts.FontFamily;
89 FontFamily family = new FontFamily.Builder(font).build(); in tryToCreateTypeface()
DUpdatableFontDir.java450 FontConfig.FontFamily family = fontConfig.getFontFamilies().get(i); in getPreinstalledFontRevision()
514 private FontConfig.FontFamily resolveFontFiles(FontUpdateRequest.Family fontFamily) { in resolveFontFiles()
527 return new FontConfig.FontFamily(resolvedFonts, fontFamily.getName(), in resolveFontFiles()
528 LocaleList.getEmptyLocaleList(), FontConfig.FontFamily.VARIANT_DEFAULT); in resolveFontFiles()
545 List<FontConfig.FontFamily> mergedFamilies = in getSystemFontConfig()
554 FontConfig.FontFamily family = resolveFontFiles(families.get(i)); in getSystemFontConfig()
595 public Map<String, FontConfig.FontFamily> getFontFamilyMap() { in getFontFamilyMap()
597 Map<String, FontConfig.FontFamily> familyMap = new HashMap<>(); in getFontFamilyMap()
600 FontConfig.FontFamily resolvedFamily = resolveFontFiles(family); in getFontFamilyMap()
/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
50 FontFamily.class.getClassLoader(), nGetBuilderReleaseFunc());
56 FontFamily.class.getClassLoader(), nGetFamilyReleaseFunc());
75 public FontFamily() { in FontFamily() method in FontFamily
85 public FontFamily(@Nullable String[] langs, int variant) { in FontFamily() method in FontFamily
DFontListParser.java132 List<FontConfig.FontFamily> families = new ArrayList<>(); in readFamilies()
135 Map<String, FontConfig.FontFamily> oemNamedFamilies = in readFamilies()
143 FontConfig.FontFamily family = readFamily(parser, fontDir, updatableFontMap, in readFamilies()
180 public static @Nullable FontConfig.FontFamily readFamily(XmlPullParser parser, String fontDir, in readFamily()
200 int intVariant = FontConfig.FontFamily.VARIANT_DEFAULT; in readFamily()
203 intVariant = FontConfig.FontFamily.VARIANT_COMPACT; in readFamily()
205 intVariant = FontConfig.FontFamily.VARIANT_ELEGANT; in readFamily()
211 return new FontConfig.FontFamily(fonts, name, LocaleList.forLanguageTags(lang), intVariant); in readFamily()
DTypeface.java33 import android.graphics.fonts.FontFamily;
172 static final Map<String, android.graphics.FontFamily[]> sSystemFallbackMap =
329 FontFamily.Builder familyBuilder = null; in createFromResources()
344 familyBuilder = new FontFamily.Builder(fontBuilder.build()); in createFromResources()
352 final FontFamily family = familyBuilder.build(); in createFromResources()
689 final FontFamily family = new FontFamily.Builder(font).build(); in build()
778 private final ArrayList<FontFamily> mFamilies = new ArrayList<>();
799 public CustomFallbackBuilder(@NonNull FontFamily family) { in CustomFallbackBuilder()
847 public @NonNull CustomFallbackBuilder addCustomFallback(@NonNull FontFamily family) { in addCustomFallback()
1102 private static Typeface createFromFamilies(android.graphics.FontFamily[] families) {
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/graphics/fonts/
DUpdatableFontDirTest.java214 FontConfig.FontFamily foobar = dir.getFontFamilyMap().get("foobar"); in construct()
303 FontConfig.FontFamily family = new FontConfig.FontFamily( in construct_olderThanPreinstalledFont()
305 FontConfig.FontFamily.VARIANT_DEFAULT); in construct_olderThanPreinstalledFont()
389 FontConfig.FontFamily foobar = dir.getFontFamilyMap().get("foobar"); in construct_afterBatchFailure()
462 FontConfig.FontFamily family = new FontConfig.FontFamily( in installFontFile_systemFontHasPSNameDifferentFromFileName()
464 FontConfig.FontFamily.VARIANT_DEFAULT); in installFontFile_systemFontHasPSNameDifferentFromFileName()
613 FontConfig.FontFamily family = new FontConfig.FontFamily( in installFontFile_preinstalled_downgrade()
615 FontConfig.FontFamily.VARIANT_DEFAULT); in installFontFile_preinstalled_downgrade()
851 FontConfig.FontFamily test = dir.getFontFamilyMap().get("test"); in addFontFamily()
916 FontConfig.FontFamily monospace = getLastFamily(fontConfig, "monospace"); in getSystemFontConfig()
[all …]
/frameworks/minikin/tests/stresstest/
DFontFamilyTest.cpp41 std::shared_ptr<FontFamily> family = std::make_shared<FontFamily>(std::move(fonts)); in TEST_P()

123