Home
last modified time | relevance | path

Searched refs:Font (Results 1 – 25 of 93) sorted by relevance

1234

/frameworks/minikin/tests/unittest/
DFontTest.cpp39 std::shared_ptr<Font> original = Font::Builder(minikinFont).build(); in TEST()
40 std::vector<uint8_t> buffer = writeToBuffer<Font>(*original); in TEST()
43 Font font(&reader); in TEST()
55 std::vector<uint8_t> newBuffer = writeToBuffer<Font>(font); in TEST()
63 std::shared_ptr<Font> original = Font::Builder(minikinFont).build(); in TEST()
64 std::vector<uint8_t> buffer = writeToBuffer<Font>(*original); in TEST()
69 Font moveFrom(&reader); in TEST()
70 Font moveTo(std::move(moveFrom)); in TEST()
77 Font moveFrom(&reader); in TEST()
79 Font moveTo(std::move(moveFrom)); in TEST()
[all …]
/frameworks/minikin/libs/minikin/
DFont.cpp59 std::shared_ptr<Font> Font::Builder::build() { in build()
62 return std::shared_ptr<Font>(new Font(std::move(mTypeface), FontStyle(mWeight, mSlant), in build()
74 return std::shared_ptr<Font>(new Font(std::move(mTypeface), FontStyle(mWeight, mSlant), in build()
78 Font::Font(BufferReader* reader) in Font() function in minikin::Font
98 Font::Font(const std::shared_ptr<Font>& parent, const std::vector<FontVariation>& axes) in Font() function in minikin::Font
127 void Font::writeTo(BufferWriter* writer) const { in writeTo()
134 Font::Font(Font&& o) noexcept in Font() function in minikin::Font
143 Font& Font::operator=(Font&& o) noexcept { in operator =()
153 bool Font::isAxisSupported(uint32_t tag) const { in isAxisSupported()
161 Font::~Font() { in ~Font()
[all …]
DFontFamily.cpp46 std::shared_ptr<FontFamily> FontFamily::create(std::vector<std::shared_ptr<Font>>&& fonts) { in create()
52 std::vector<std::shared_ptr<Font>>&& fonts) { in create()
59 std::vector<std::shared_ptr<Font>>&& fonts, in create()
109 std::vector<std::shared_ptr<Font>> overriddenFonts; in FontFamily()
120 overriddenFonts.emplace_back(std::make_shared<Font>(font, axesOverride)); in FontFamily()
123 mFonts = std::make_unique<std::shared_ptr<Font>[]>(overriddenFonts.size()); in FontFamily()
134 std::vector<std::shared_ptr<Font>>&& fonts, bool isCustomFallback, in FontFamily()
136 : mFonts(std::make_unique<std::shared_ptr<Font>[]>(fonts.size())), in FontFamily()
162 FontFamily::FontFamily(BufferReader* reader, const std::shared_ptr<std::vector<Font>>& allFonts) in FontFamily()
166 mFonts = std::make_unique<std::shared_ptr<Font>[]>(mFontsCount); in FontFamily()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/animation/
DFontInterpolatorTest.kt20 import android.graphics.fonts.Font in <lambda>()
37 private fun assertSameAxes(expect: Font, actual: Font) { in <lambda>()
43 private fun assertSameAxes(expectVarSettings: String, actual: Font) { in <lambda>()
54 val startFont = Font.Builder(sFont) in <lambda>()
57 val endFont = Font.Builder(sFont) in <lambda>()
69 val startFont = Font.Builder(sFont) in <lambda>()
72 val endFont = Font.Builder(sFont) in <lambda>()
82 val startFont = Font.Builder(sFont) in <lambda>()
85 val endFont = Font.Builder(sFont) in <lambda>()
97 val startFont = Font.Builder(sFont) in <lambda>()
[all …]
/frameworks/base/core/tests/coretests/src/android/graphics/
DTypefaceEqualsTest.java23 import android.graphics.fonts.Font;
43 Font masterFont = new Font.Builder(am, "fonts/a3em.ttf").build(); in testFontEqualWithLocale()
45 Font jaFont = new Font.Builder(masterFont.getBuffer(), new File("fonts/a3em.ttf"), "ja") in testFontEqualWithLocale()
47 Font jaFont2 = new Font.Builder(masterFont.getBuffer(), new File("fonts/a3em.ttf"), "ja") in testFontEqualWithLocale()
49 Font koFont = new Font.Builder(masterFont.getBuffer(), new File("fonts/a3em.ttf"), "ko") in testFontEqualWithLocale()
DFontListParserTest.java70 Arrays.asList(new FontConfig.Font(new File("test.ttf"), null, "test", in named()
72 FontConfig.Font.VAR_TYPE_AXES_NONE)), in named()
87 new FontConfig.Font(new File("test.ttf"), null, "test", in fallback()
89 0, "", null, FontConfig.Font.VAR_TYPE_AXES_NONE), in fallback()
90 new FontConfig.Font(new File("test.ttf"), null, "test", in fallback()
92 0, "", "serif", FontConfig.Font.VAR_TYPE_AXES_NONE)), in fallback()
107 new FontConfig.Font(new File("test.ttf"), null, "test", in compact()
109 0, "", null, FontConfig.Font.VAR_TYPE_AXES_NONE)), in compact()
124 new FontConfig.Font(new File("test.ttf"), null, "test", in elegant()
126 0, "", null, FontConfig.Font.VAR_TYPE_AXES_NONE)), in elegant()
[all …]
/frameworks/base/core/java/android/graphics/fonts/
DFontUpdateRequest.java72 public static final class Font implements Parcelable { class in FontUpdateRequest
84 public Font(@NonNull String postScriptName, @NonNull FontStyle fontStyle, in Font() method in FontUpdateRequest.Font
106 public static final @NonNull Creator<Font> CREATOR = new Creator<Font>() {
108 public Font createFromParcel(Parcel source) {
114 return new Font(fontName, new FontStyle(weight, slant), index, varSettings);
118 public Font[] newArray(int size) {
119 return new Font[size];
131 public static void writeToXml(TypedXmlSerializer out, Font font) throws IOException { in writeToXml()
148 public static Font readFromXml(XmlPullParser parser) throws IOException { in readFromXml()
160 return new Font(psName, new FontStyle(weight, slant), index, varSettings); in readFromXml()
[all …]
DFontFamilyUpdateRequest.java83 @NonNull private final List<Font> mFonts;
88 public Builder(@NonNull String name, @NonNull List<Font> fonts) { in Builder()
103 public @NonNull Builder addFont(@NonNull Font font) { in addFont()
119 private final List<Font> mFonts;
134 private FontFamily(@NonNull String name, @NonNull List<Font> fonts) { in FontFamily()
151 public List<Font> getFonts() { in getFonts()
159 public static final class Font { class in FontFamilyUpdateRequest
211 public @NonNull Font build() { in build()
212 return new Font(mPostScriptName, mStyle, mIndex, mAxes); in build()
241 private Font(@NonNull String postScriptName, @NonNull FontStyle style, in Font() method in FontFamilyUpdateRequest.Font
/frameworks/minikin/include/minikin/
DFont.h39 class Font; variable
106 class Font {
139 std::shared_ptr<Font> build();
150 explicit Font(BufferReader* reader);
154 Font(const std::shared_ptr<Font>& parent, const std::vector<FontVariation>& axes);
156 Font(Font&& o) noexcept;
157 Font& operator=(Font&& o) noexcept;
158 ~Font();
199 Font(std::shared_ptr<MinikinFont>&& typeface, FontStyle style, HbFontUniquePtr&& baseFont, in Font() function
231 Font(const Font& o) = delete;
[all …]
DFontFamily.h42 static std::shared_ptr<FontFamily> create(std::vector<std::shared_ptr<Font>>&& fonts);
44 std::vector<std::shared_ptr<Font>>&& fonts);
46 std::vector<std::shared_ptr<Font>>&& fonts,
69 const Font* getFont(size_t index) const { return mFonts[index].get(); } in getFont()
70 const std::shared_ptr<Font>& getFontRef(size_t index) const { return mFonts[index]; } in getFontRef()
111 std::vector<std::shared_ptr<Font>>&& fonts, bool isCustomFallback,
115 explicit FontFamily(BufferReader* reader, const std::shared_ptr<std::vector<Font>>& fonts);
122 std::unique_ptr<std::shared_ptr<Font>[]> mFonts;
DSystemFonts.h54 static void getFontSet(std::function<void(const std::vector<std::shared_ptr<Font>>&)> func) { in getFontSet()
80 void getFontSetInternal(std::function<void(const std::vector<std::shared_ptr<Font>>&)> func) { in getFontSetInternal()
96 std::optional<std::vector<std::shared_ptr<Font>>> mFonts GUARDED_BY(mMutex);
/frameworks/base/packages/SystemUI/animation/src/com/android/systemui/animation/
DFontInterpolator.kt19 import android.graphics.fonts.Font in <lambda>()
50 private data class InterpKey(var l: Font?, var r: Font?, var progress: Float) { in <lambda>()
51 fun set(l: Font, r: Font, progress: Float) { in <lambda>()
69 font: Font, in <lambda>()
77 fun set(font: Font, axes: List<FontVariationAxis>) { in <lambda>()
90 private val interpCache = LruCache<InterpKey, Font>(cacheMaxEntries) in <lambda>()
91 private val verFontCache = LruCache<VarFontKey, Font>(cacheMaxEntries) in <lambda>()
98 fun lerp(start: Font, end: Font, progress: Float): Font { in <lambda>()
168 val newFont = Font.Builder(start).setFontVariationSettings(newAxes.toTypedArray()).build() in <lambda>()
235 fun canInterpolate(start: Font, end: Font) = in <lambda>()
/frameworks/base/rs/java/android/renderscript/
DFont.java49 public class Font extends BaseObj { class
154 Font(long id, RenderScript rs) { in Font() method in Font
163 … static public Font createFromFile(RenderScript rs, Resources res, String path, float pointSize) { in createFromFile()
171 Font rsFont = new Font(fontId, rs); in createFromFile()
179 static public Font createFromFile(RenderScript rs, Resources res, File path, float pointSize) { in createFromFile()
186 … static public Font createFromAsset(RenderScript rs, Resources res, String path, float pointSize) { in createFromAsset()
195 Font rsFont = new Font(fontId, rs); in createFromAsset()
202 static public Font createFromResource(RenderScript rs, Resources res, int id, float pointSize) { in createFromResource()
226 Font rsFont = new Font(fontId, rs); in createFromResource()
243 …static public Font create(RenderScript rs, Resources res, String familyName, Style fontStyle, floa… in create()
/frameworks/base/core/tests/coretests/src/android/provider/
DMockFontProvider.java96 static class Font { class in MockFontProvider
97 public Font(int id, int fileId, int ttcIndex, String varSettings, int weight, int italic, in Font() method in MockFontProvider.Font
148 private static Map<String, Font[]> QUERY_MAP;
150 HashMap<String, Font[]> map = new HashMap<>();
153 map.put("singleFontFamily", new Font[] {
154 new Font(id++, SAMPLE_FONT_FILE_0_ID, 0, null, 400, 0, Columns.RESULT_CODE_OK),
157 map.put("singleFontFamily2", new Font[] {
158 new Font(id++, SAMPLE_FONT_FILE_0_ID, 0, null, 700, 0, Columns.RESULT_CODE_OK),
161 map.put(BLOCKING_QUERY, new Font[] { in map.put()
162 new Font(id++, SAMPLE_FONT_FILE_0_ID, 0, null, 700, 0, Columns.RESULT_CODE_OK), in map.put()
[all …]
/frameworks/rs/
DrsFont.h44 class Font : public ObjectBase {
65 ~Font();
75 static Font * create(Context *rsc, const char *name, float fontSize, uint32_t dpi,
119 explicit Font(Context *rsc);
146 ObjectBaseRef<Font> mDefault;
150 Font::RenderMode mode = Font::FRAMEBUFFER,
151 Font::Rect *bounds = nullptr,
154 void measureText(const char *text, uint32_t len, Font::Rect *bounds);
164 friend class Font; variable
184 void precacheLatin(Font *font);
[all …]
DrsFont.cpp34 Font::Font(Context *rsc) : ObjectBase(rsc), mCachedGlyphs(NULL) { in Font() function in android::renderscript::Font
40 bool Font::init(const char *name, float fontSize, uint32_t dpi, const void *data, uint32_t dataLen)… in init()
76 void Font::preDestroy() const { in preDestroy()
86 void Font::invalidateTextureCache() { in invalidateTextureCache()
92 void Font::drawCachedGlyph(CachedGlyphInfo *glyph, int32_t x, int32_t y) { in drawCachedGlyph()
112 void Font::drawCachedGlyph(CachedGlyphInfo* glyph, int32_t x, int32_t y, in drawCachedGlyph()
138 void Font::measureCachedGlyph(CachedGlyphInfo *glyph, int32_t x, int32_t y, Rect *bounds) { in measureCachedGlyph()
160 void Font::renderUTF(const char *text, uint32_t len, int32_t x, int32_t y, in renderUTF()
168 if (mode == Font::MEASURE) { in renderUTF()
224 Font::CachedGlyphInfo* Font::getCachedUTFChar(int32_t utfChar) { in getCachedUTFChar()
[all …]
/frameworks/base/graphics/java/android/graphics/fonts/
DFontFamily.java83 private final ArrayList<Font> mFonts = new ArrayList<>();
94 public Builder(@NonNull Font font) { in Builder()
114 public @NonNull Builder addFont(@NonNull Font font) { in addFont()
194 private static int makeStyleIdentifier(@NonNull Font font) { in makeStyleIdentifier()
266 ArrayList<Font> fonts) { in analyzeAndResolveVariableType()
272 Font font = fonts.get(0); in analyzeAndResolveVariableType()
286 Font font = fonts.get(i); in analyzeAndResolveVariableType()
301 Font firstFont = fonts.get(0); in analyzeAndResolveVariableType()
350 public @NonNull Font getFont(@IntRange(from = 0) int index) { in getFont()
354 return new Font(nGetFont(mNativePtr, index)); in getFont()
DFont.java57 public final class Font { class
70 NativeAllocationRegistry.createMalloced(Font.class.getClassLoader(),
82 private @Nullable Font mFont;
241 public Builder(@NonNull Font font) { in Builder()
448 public @NonNull Font build() throws IOException { in build()
481 final Font font; in build()
485 font = new Font(ptr); in build()
488 font = new Font(ptr); in build()
532 public Font(long nativePtr) { in Font() method in Font
776 private boolean isSameSource(@NonNull Font other) { in isSameSource()
[all …]
DSystemFonts.java68 private static @GuardedBy("sLock") Set<Font> sAvailableFonts;
75 public static @NonNull Set<Font> getAvailableFonts() { in getAvailableFonts()
78 sAvailableFonts = Font.getAvailableFonts(); in getAvailableFonts()
113 List<FontConfig.Font> fonts = xmlFamily.getFontList(); in resolveVarFamilyType()
115 FontConfig.Font font = fonts.get(i); in resolveVarFamilyType()
133 if ((varTypeAxes & FontConfig.Font.VAR_TYPE_AXES_WGHT) != 0) { in resolveVarFamilyType()
137 if ((varTypeAxes & FontConfig.Font.VAR_TYPE_AXES_ITAL) != 0) { in resolveVarFamilyType()
174 final ArrayList<FontConfig.Font> defaultFonts = new ArrayList<>(); in pushFamilyToFallback()
175 final ArrayMap<String, ArrayList<FontConfig.Font>> specificFallbackFonts = in pushFamilyToFallback()
179 for (final FontConfig.Font font : xmlFamily.getFonts()) { in pushFamilyToFallback()
[all …]
/frameworks/base/packages/SystemUI/compose/core/src/com/android/compose/theme/typography/
DTypefaceTokens.kt24 import androidx.compose.ui.text.font.Font
39 Font(brandFont, weight = WeightMedium),
40 Font(brandFont, weight = WeightRegular),
44 Font(plainFont, weight = WeightMedium),
45 Font(plainFont, weight = WeightRegular),
/frameworks/minikin/tests/util/
DFontTestUtils.cpp70 std::vector<std::shared_ptr<Font>> fonts; in getFontFamilies()
97 fonts.push_back(Font::Builder(minikinFont).setStyle(style).build()); in getFontFamilies()
102 fonts.push_back(Font::Builder(minikinFont).setStyle(style).build()); in getFontFamilies()
128 std::vector<std::shared_ptr<Font>> fonts; in buildFontFamily()
129 fonts.push_back(Font::Builder(font).build()); in buildFontFamily()
136 std::vector<std::shared_ptr<Font>> fonts; in buildFontFamily()
137 fonts.push_back(Font::Builder(font).build()); in buildFontFamily()
/frameworks/base/core/java/android/text/
DFontConfig.java234 public static final class Font implements Parcelable { class in FontConfig
265 public Font(@NonNull File file, @Nullable File originalFile, @NonNull String postScriptName, in Font() method in FontConfig.Font
297 public static final @NonNull Creator<Font> CREATOR = new Creator<Font>() {
300 public Font createFromParcel(Parcel source) {
312 return new Font(path, originalPath, postScriptName, new FontStyle(weight, slant),
317 public Font[] newArray(int size) {
318 return new Font[size];
434 Font font = (Font) o; in equals()
580 private final @NonNull List<Font> mFonts;
621 public FontFamily(@NonNull List<Font> fonts, @NonNull LocaleList localeList, in FontFamily()
[all …]
/frameworks/base/cmds/bootanimation/
DBootAnimation.h57 struct Font { struct
112 Font clockFont;
113 Font progressFont;
182 status_t initFont(Font* font, const char* fallback);
186 void drawText(const char* str, const Font& font, bool bold, int* x, int* y);
187 void drawClock(const Font& font, const int xPos, const int yPos);
188 void drawProgress(int percent, const Font& font, const int xPos, const int yPos);
/frameworks/base/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/theme/
DSettingsFontFamily.kt26 import androidx.compose.ui.text.font.Font
57 Font(DeviceFontFamilyName(fontFamilyNormal), FontWeight.Normal), in Context()
58 Font(DeviceFontFamilyName(fontFamilyMedium), FontWeight.Medium), in Context()
/frameworks/base/graphics/java/android/graphics/text/
DPositionedGlyphs.java26 import android.graphics.fonts.Font;
58 private final ArrayList<Font> mFonts;
133 public Font getFont(@IntRange(from = 0) int index) { in getFont()
254 Font prevFont = null; in PositionedGlyphs()
259 prevFont = new Font(ptr); in PositionedGlyphs()

1234