Home
last modified time | relevance | path

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

123

/frameworks/support/compat/tests/java/android/support/v4/provider/
DMockFontProvider.java63 static class Font { class in MockFontProvider
64 Font(int id, int fileId, int ttcIndex, String varSettings, int weight, int italic, in Font() method in MockFontProvider.Font
118 private static final Map<String, Font[]> QUERY_MAP;
120 HashMap<String, Font[]> map = new HashMap<>();
123 map.put(SINGLE_FONT_FAMILY_QUERY, new Font[] { in map.put()
124 new Font(id++, SAMPLE_FONT_FILE_0_ID, 0, "'wght' 100", 400, 0, in map.put()
128 map.put(SINGLE_FONT_FAMILY2_QUERY, new Font[] { in map.put()
129 new Font(id++, SAMPLE_FONT_FILE_0_ID, 0, "'wght' 100", 700, 1, in map.put()
133 map.put(NOT_FOUND_QUERY, new Font[] { in map.put()
134 new Font(0, 0, 0, null, 400, 0, Columns.RESULT_CODE_FONT_NOT_FOUND, true), in map.put()
[all …]
/frameworks/base/libs/hwui/font/
DFont.h50 class Font {
84 ~Font();
92 const Font::FontDescription& getDescription() const { in getDescription()
99 static Font* create(FontRenderer* state, const SkPaint* paint, const SkMatrix& matrix);
104 Font(FontRenderer* state, const Font::FontDescription& desc);
106 typedef void (Font::*RenderGlyph)(CachedGlyphInfo*, int, int, uint8_t*,
157 inline int strictly_order_type(const Font::FontDescription& lhs, in strictly_order_type()
158 const Font::FontDescription& rhs) { in strictly_order_type()
159 return Font::FontDescription::compare(lhs, rhs) < 0; in strictly_order_type()
162 inline int compare_type(const Font::FontDescription& lhs, const Font::FontDescription& rhs) { in compare_type()
[all …]
DFont.cpp41 Font::Font(FontRenderer* state, const Font::FontDescription& desc) : in Font() function in android::uirenderer::Font
44 Font::FontDescription::FontDescription(const SkPaint* paint, const SkMatrix& rasterMatrix) in FontDescription()
50 mFlags |= Font::kFakeBold; in FontDescription()
63 Font::~Font() { in ~Font()
69 hash_t Font::FontDescription::hash() const { in hash()
84 int Font::FontDescription::compare(const Font::FontDescription& lhs, in compare()
85 const Font::FontDescription& rhs) { in compare()
126 void Font::invalidateTextureCache(CacheTexture* cacheTexture) { in invalidateTextureCache()
135 void Font::measureCachedGlyph(CachedGlyphInfo *glyph, int x, int y, in measureCachedGlyph()
157 void Font::drawCachedGlyph(CachedGlyphInfo* glyph, int x, int y, in drawCachedGlyph()
[all …]
/frameworks/minikin/libs/minikin/
DFontFamily.cpp68 Font::Font(const std::shared_ptr<MinikinFont>& typeface, FontStyle style) in Font() function in minikin::Font
72 Font::Font(std::shared_ptr<MinikinFont>&& typeface, FontStyle style) in Font() function in minikin::Font
76 std::unordered_set<AxisTag> Font::getSupportedAxesLocked() const { in getSupportedAxesLocked()
88 Font::Font(Font&& o) { in Font() function in minikin::Font
94 Font::Font(const Font& o) { in Font() function in minikin::Font
100 FontFamily::FontFamily(std::vector<Font>&& fonts) : FontFamily(0 /* variant */, std::move(fonts)) { in FontFamily()
103 FontFamily::FontFamily(int variant, std::vector<Font>&& fonts) in FontFamily()
107 FontFamily::FontFamily(uint32_t langId, int variant, std::vector<Font>&& fonts) in FontFamily()
142 const Font* bestFont = nullptr; in getClosestMatch()
145 const Font& font = mFonts[i]; in getClosestMatch()
[all …]
/frameworks/base/rs/java/android/renderscript/
DFont.java47 public class Font extends BaseObj { class
151 Font(long id, RenderScript rs) { in Font() method in Font
160 … static public Font createFromFile(RenderScript rs, Resources res, String path, float pointSize) { in createFromFile()
168 Font rsFont = new Font(fontId, rs); in createFromFile()
176 static public Font createFromFile(RenderScript rs, Resources res, File path, float pointSize) { in createFromFile()
183 … static public Font createFromAsset(RenderScript rs, Resources res, String path, float pointSize) { in createFromAsset()
192 Font rsFont = new Font(fontId, rs); in createFromAsset()
199 static public Font createFromResource(RenderScript rs, Resources res, int id, float pointSize) { in createFromResource()
223 Font rsFont = new Font(fontId, rs); in createFromResource()
239 …static public Font create(RenderScript rs, Resources res, String familyName, Style fontStyle, floa… in create()
/frameworks/minikin/include/minikin/
DFontFamily.h105 struct Font { struct
106 Font(const std::shared_ptr<MinikinFont>& typeface, FontStyle style);
107 Font(std::shared_ptr<MinikinFont>&& typeface, FontStyle style);
108 Font(Font&& o);
109 Font(const Font& o);
125 explicit FontFamily(std::vector<Font>&& fonts);
126 FontFamily(int variant, std::vector<Font>&& fonts);
127 FontFamily(uint32_t langId, int variant, std::vector<Font>&& fonts);
166 std::vector<Font> mFonts;
/frameworks/base/core/tests/coretests/src/android/provider/
DMockFontProvider.java100 static class Font { class in MockFontProvider
101 public Font(int id, int fileId, int ttcIndex, String varSettings, int weight, int italic, in Font() method in MockFontProvider.Font
152 private static Map<String, Font[]> QUERY_MAP;
154 HashMap<String, Font[]> map = new HashMap<>();
157 map.put("singleFontFamily", new Font[] {
158 new Font(id++, SAMPLE_FONT_FILE_0_ID, 0, null, 400, 0, Columns.RESULT_CODE_OK),
161 map.put("singleFontFamily2", new Font[] {
162 new Font(id++, SAMPLE_FONT_FILE_0_ID, 0, null, 700, 0, Columns.RESULT_CODE_OK),
165 map.put(BLOCKING_QUERY, new Font[] { in map.put()
166 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 …]
DrsContext.h105 ObjectBaseRef<Font> mFont;
134 void setFont(Font *);
142 Font * getFont() {return mFont.get();} in getFont()
179 Font* getDefaultFont() const { in getDefaultFont()
327 ObjectBaseRef<Font> mFont;
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/
DBidiRenderer.java28 import java.awt.Font;
52 Font font;
67 private List<Font> mFonts;
82 mFonts = new ArrayList<Font>(paint.getFonts().size()); in BidiRenderer()
144 int flag = Font.LAYOUT_NO_LIMIT_CONTEXT | Font.LAYOUT_NO_START_CONTEXT; in renderText()
145 flag |= isRtl ? Font.LAYOUT_RIGHT_TO_LEFT : Font.LAYOUT_LEFT_TO_RIGHT; in renderText()
157 private void renderScript(int start, int limit, Font preferredFont, int flag, in renderScript()
181 for (Font font : mFonts) { in renderScript()
218 private void render(int start, int limit, Font font, int flag, float[] advances, in render()
275 boolean isRtl, List<Font> fonts) { in getScriptRuns()
[all …]
DTypeface_Delegate.java29 import java.awt.Font;
89 public List<Font> getFonts(FontVariant variant) { in getFonts()
93 …int weight = mWeight + ((mStyle & Font.BOLD) == 0 ? 0 : FontFamily_Delegate.BOLD_FONT_WEIGHT_DELTA… in getFonts()
97 final boolean isItalic = (mStyle & Font.ITALIC) != 0; in getFonts()
98 List<Font> fonts = new ArrayList<Font>(mFontFamilies.length); in getFonts()
102 Font font = ffd.getFont(weight, isItalic); in getFonts()
116 Font font2 = ffd2.getFont(weight, isItalic); in getFonts()
236 for (FontConfig.Font font : family.getFonts()) {
DFontFamily_Delegate.java32 import java.awt.Font;
97 Font mFont;
178 public Font getFont(int desiredWeight, boolean isItalic) { in getFont()
219 private static Font loadFont(String path) { in loadFont()
225 return Font.createFont(Font.TRUETYPE_FONT, f); in loadFont()
365 Font font = Font.createFont(Font.TRUETYPE_FONT, fontStream);
443 Font font = loadFont(path);
496 Font derivedFont = srcFont.mFont;
499 derivedFont = derivedFont.deriveFont(Font.BOLD);
504 derivedFont = derivedFont.deriveFont(Font.ITALIC);
/frameworks/base/core/java/android/text/
DFontConfig.java60 public static final class Font { class in FontConfig
71 public Font(@NonNull String fontName, int ttcIndex, @NonNull FontVariationAxis[] axes, in Font() method in FontConfig.Font
171 private final @NonNull Font[] mFonts;
206 public Family(@NonNull String name, @NonNull Font[] fonts, @NonNull String language, in Family()
224 public @Nullable Font[] getFonts() { in getFonts()
/frameworks/base/cmds/bootanimation/
DBootAnimation.h86 struct Font { struct
131 Font clockFont;
136 status_t initFont(Font* font, const char* fallback);
139 void drawText(const char* str, const Font& font, bool bold, int* x, int* y);
140 void drawClock(const Font& font, const int xPos, const int yPos);
/frameworks/minikin/tests/unittest/
DFontCollectionTest.cpp62 std::vector<Font>({ Font(font, FontStyle()) }))); in TEST()
134 std::vector<Font>({ Font(multiAxisFont, FontStyle()) }))); in TEST()
140 std::vector<Font>({ Font(noAxisFont, FontStyle()) }))); in TEST()
DFontCollectionItemizeTest.cpp675 std::vector<Font>{ Font(font, FontStyle()) })); in TEST_F()
680 std::vector<Font>{ Font(font2, FontStyle()) })); in TEST_F()
817 std::vector<Font>({ Font(firstFamilyMinikinFont, FontStyle()) }))); in TEST_F()
829 std::vector<Font>({ Font(minikin_font, FontStyle()) }))); in TEST_F()
1416 std::vector<Font>({ Font(dummyFont, FontStyle()) }))); in TEST_F()
1418 std::vector<Font>({ Font(fontA, FontStyle()) }))); in TEST_F()
1420 std::vector<Font>({ Font(fontB, FontStyle()) }))); in TEST_F()
1451 std::vector<Font>({ Font(dummyFont, FontStyle()) }))); in TEST_F()
1453 std::vector<Font>({ Font(hasCmapFormat14Font, FontStyle()) }))); in TEST_F()
1455 std::vector<Font>({ Font(noCmapFormat14Font, FontStyle()) }))); in TEST_F()
/frameworks/minikin/tests/perftests/
DFontFamily.cpp29 std::vector<Font>({Font(minikinFont, FontStyle())})); in BM_FontFamily_create()
/frameworks/base/graphics/java/android/graphics/
DFontListParser.java80 List<FontConfig.Font> fonts = new ArrayList<FontConfig.Font>(); in readFamily()
98 return new FontConfig.Family(name, fonts.toArray(new FontConfig.Font[fonts.size()]), lang, in readFamily()
106 private static FontConfig.Font readFont(XmlPullParser parser) in readFont()
128 return new FontConfig.Font(sanitizedName, index, in readFont()
/frameworks/minikin/tests/util/
DFontTestUtils.cpp51 std::vector<Font> fonts; in getFontFamilies()
74 fonts.push_back(Font(minikinFont, FontStyle(weight, italic))); in getFontFamilies()
78 fonts.push_back(Font(minikinFont, FontStyle(weight, italic))); in getFontFamilies()
/frameworks/base/media/java/android/media/
DTimedText.java101 private List<Font> mFontList = null;
244 public static final class Font { class in TimedText
260 public Font(int id, String name) { in Font() method in TimedText.Font
604 Font font = new Font(id, name); in readFont()
607 mFontList = new ArrayList<Font>(); in readFont()
/frameworks/base/libs/hwui/
DFontRenderer.h130 friend class Font;
182 Font* mCurrentFont;
183 LruCache<Font::FontDescription, Font*> mActiveFonts;
DFontRenderer.cpp88 , mActiveFonts(LruCache<Font::FontDescription, Font*>::kUnlimitedCapacity) in FontRenderer()
141 LruCache<Font::FontDescription, Font*>::Iterator it(mActiveFonts); in ~FontRenderer()
151 LruCache<Font::FontDescription, Font*>::Iterator it(mActiveFonts); in flushAllAndInvalidate()
183 LruCache<Font::FontDescription, Font*>::Iterator it(mActiveFonts); in flushLargeCaches()
557 mCurrentFont = Font::create(this, paint, matrix); in setFont()
608 Font::BITMAP, dataBuffer, paddedWidth, paddedHeight, nullptr, positions); in renderDropShadow()
643 Font* font = Font::create(this, paint, matrix); in precache()
/frameworks/minikin/tests/stresstest/
DFontFamilyTest.cpp38 std::make_shared<FontFamily>(std::vector<Font>({Font(font, FontStyle())})); in TEST_P()
/frameworks/rs/tests/java_api/RsTest_11/src/com/android/rs/test/
DRSTestCore.java41 private Font mFont;
99 mFont = Font.create(mRS, mRes, "serif", Font.Style.BOLD, 8); in init()

123