Home
last modified time | relevance | path

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

123

/frameworks/minikin/include/minikin/
DFont.h31 class Font; variable
58 const Font* font;
63 class Font {
91 Font build();
101 Font(Font&& o) = default;
102 Font& operator=(Font&& o) = default;
104 Font& operator=(const Font& o) {
110 Font(const Font& o) { *this = o; } in Font() function
120 Font(std::shared_ptr<MinikinFont>&& typeface, FontStyle style, HbFontUniquePtr&& baseFont) in Font() function
DFontFamily.h36 explicit FontFamily(std::vector<Font>&& fonts);
37 FontFamily(FamilyVariant variant, std::vector<Font>&& fonts);
38 FontFamily(uint32_t localeListId, FamilyVariant variant, std::vector<Font>&& fonts,
48 const Font* getFont(size_t index) const { return &mFonts[index]; } in getFont()
74 std::vector<Font> mFonts;
/frameworks/base/rs/java/android/renderscript/
DFont.java47 public class Font extends BaseObj { class
152 Font(long id, RenderScript rs) { in Font() method in Font
161 … static public Font createFromFile(RenderScript rs, Resources res, String path, float pointSize) { in createFromFile()
169 Font rsFont = new Font(fontId, rs); in createFromFile()
177 static public Font createFromFile(RenderScript rs, Resources res, File path, float pointSize) { in createFromFile()
184 … static public Font createFromAsset(RenderScript rs, Resources res, String path, float pointSize) { in createFromAsset()
193 Font rsFont = new Font(fontId, rs); in createFromAsset()
200 static public Font createFromResource(RenderScript rs, Resources res, int id, float pointSize) { in createFromResource()
224 Font rsFont = new Font(fontId, rs); in createFromResource()
241 …static public Font create(RenderScript rs, Resources res, String familyName, Style fontStyle, floa… in create()
/frameworks/minikin/libs/minikin/
DFontFamily.cpp40 Font Font::Builder::build() { in build()
43 return Font(std::move(mTypeface), FontStyle(mWeight, mSlant), prepareFont(mTypeface)); in build()
54 return Font(std::move(mTypeface), FontStyle(mWeight, mSlant), std::move(font)); in build()
58 HbFontUniquePtr Font::prepareFont(const std::shared_ptr<MinikinFont>& typeface) { in prepareFont()
82 FontStyle Font::analyzeStyle(const HbFontUniquePtr& font) { in analyzeStyle()
97 std::unordered_set<AxisTag> Font::getSupportedAxes() const { in getSupportedAxes()
107 FontFamily::FontFamily(std::vector<Font>&& fonts) in FontFamily()
110 FontFamily::FontFamily(FamilyVariant variant, std::vector<Font>&& fonts) in FontFamily()
114 FontFamily::FontFamily(uint32_t localeListId, FamilyVariant variant, std::vector<Font>&& fonts, in FontFamily()
147 const Font* bestFont = &mFonts[0]; in getClosestMatch()
[all …]
/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 …]
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/graphics/java/android/graphics/fonts/
DSystemFonts.java56 private static final List<Font> sAvailableFonts;
63 public static @NonNull Set<Font> getAvailableFonts() { in getAvailableFonts()
64 HashSet<Font> set = new HashSet<>(); in getAvailableFonts()
116 @NonNull ArrayList<Font> availableFonts) { in pushFamilyToFallback()
121 final ArrayList<FontConfig.Font> defaultFonts = new ArrayList<>(); in pushFamilyToFallback()
122 final ArrayMap<String, ArrayList<FontConfig.Font>> specificFallbackFonts = new ArrayMap<>(); in pushFamilyToFallback()
125 for (final FontConfig.Font font : xmlFamily.getFonts()) { in pushFamilyToFallback()
130 ArrayList<FontConfig.Font> fallback = specificFallbackFonts.get(fallbackName); in pushFamilyToFallback()
144 final ArrayList<FontConfig.Font> fallback = in pushFamilyToFallback()
166 @NonNull List<FontConfig.Font> fonts, in createFontFamily()
[all …]
DFontFamily.java69 private final ArrayList<Font> mFonts = new ArrayList<>();
77 public Builder(@NonNull Font font) { in Builder()
97 public @NonNull Builder addFont(@NonNull Font font) { in addFont()
127 private static int makeStyleIdentifier(@NonNull Font font) { in makeStyleIdentifier()
140 private final ArrayList<Font> mFonts;
144 private FontFamily(@NonNull ArrayList<Font> fonts, long ptr) { in FontFamily()
155 public @NonNull Font getFont(@IntRange(from = 0) int index) { in getFont()
DFont.java46 public final class Font { class
62 NativeAllocationRegistry.createMalloced(Font.class.getClassLoader(),
359 public @NonNull Font build() throws IOException { in build()
392 final Font font = new Font(ptr, readonlyBuffer, mFile, in build()
431 private Font(long nativePtr, @NonNull ByteBuffer buffer, @Nullable File file, in Font() method in Font
517 if (o == null || !(o instanceof Font)) { in equals()
520 Font f = (Font) o; in equals()
/frameworks/layoutlib/bridge/src/android/graphics/
DBidiRenderer.java29 import java.awt.Font;
54 private final Font font;
56 private ScriptRun(int start, int limit, @NonNull Font font) { in ScriptRun()
137 int flag = Font.LAYOUT_NO_LIMIT_CONTEXT | Font.LAYOUT_NO_START_CONTEXT; in renderText()
138 flag |= isRtl ? Font.LAYOUT_RIGHT_TO_LEFT : Font.LAYOUT_LEFT_TO_RIGHT; in renderText()
150 private void renderScript(int start, int limit, Font preferredFont, int flag, in renderScript()
172 Font bestFont = null; in renderScript()
176 Font font = fontInfos.get(i).mFont; in renderScript()
233 private void render(int start, int limit, Font font, int flag, float[] advances, in render()
335 private static Font getScriptFont(char[] text, int start, int limit, List<FontInfo> fonts) { in getScriptFont()
[all …]
DFontFamily_Delegate.java31 import java.awt.Font;
101 public Font mFont;
144 private Map<FontInfo, Font> mFonts = new LinkedHashMap<>();
208 public Font getFont(int desiredWeight, boolean isItalic) { in getFont()
213 Font cachedFont = mFonts.get(desiredStyle); in getFont()
263 private static Font loadFont(String path) { in loadFont()
269 return Font.createFont(Font.TRUETYPE_FONT, f); in loadFont()
413 Font font = Font.createFont(Font.TRUETYPE_FONT, fontStream);
423 (FontUtilities.getFont2D(font).getStyle() & Font.ITALIC) != 0;
498 Font font = loadFont(path);
[all …]
DTypeface_Delegate.java40 import java.awt.Font;
329 public Iterable<Font> getFonts(final FontVariant variant) { in getFonts()
335 private static class FontsIterator implements Iterator<Font>, Iterable<Font> {
349 ((style & Font.BOLD) == 0 ? 0 : FontFamily_Delegate.BOLD_FONT_WEIGHT_DELTA); in FontsIterator()
351 this.isItalic = (style & Font.ITALIC) != 0; in FontsIterator()
364 public Font next() { in next()
365 Font font; in next()
415 public Iterator<Font> iterator() {
420 public Spliterator<Font> spliterator() {
/frameworks/layoutlib/bridge/src/android/graphics/fonts/
DFontFamily_Builder_Delegate.java30 import java.awt.Font;
61 private Map<FontInfo, Font> mFonts = new LinkedHashMap<>();
115 public Font getFont(int desiredWeight, boolean isItalic) {
120 Font cachedFont = mFonts.get(desiredStyle);
168 Font font = loadFont(buffer);
183 private static Font loadFont(@NonNull ByteBuffer buffer) {
188 return Font.createFont(Font.TRUETYPE_FONT, new ByteArrayInputStream(byteArray));
/frameworks/minikin/tests/unittest/
DFontTest.cpp29 Font font = Font::Builder(minikinFont).build(); in TEST()
31 Font copied(font); in TEST()
37 Font copied = font; in TEST()
/frameworks/minikin/tests/util/
DFontTestUtils.cpp70 std::vector<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()
127 std::vector<Font> fonts; in buildFontFamily()
128 fonts.push_back(Font::Builder(font).build()); in buildFontFamily()
135 std::vector<Font> fonts; in buildFontFamily()
136 fonts.push_back(Font::Builder(font).build()); in buildFontFamily()
/frameworks/base/core/java/android/text/
DFontConfig.java62 public static final class Font { class in FontConfig
74 public Font(@NonNull String fontName, int ttcIndex, @NonNull FontVariationAxis[] axes, in Font() method in FontConfig.Font
183 private final @NonNull Font[] mFonts;
223 public Family(@NonNull String name, @NonNull Font[] fonts, @NonNull String languages, in Family()
243 public @Nullable Font[] getFonts() { in getFonts()
/frameworks/base/cmds/bootanimation/
DBootAnimation.h51 struct Font { struct
96 Font clockFont;
150 status_t initFont(Font* font, const char* fallback);
153 void drawText(const char* str, const Font& font, bool bold, int* x, int* y);
154 void drawClock(const Font& font, const int xPos, const int yPos);
/frameworks/base/graphics/java/android/graphics/
DFontListParser.java90 final List<FontConfig.Font> fonts = new ArrayList<FontConfig.Font>(); in readFamily()
108 return new FontConfig.Family(name, fonts.toArray(new FontConfig.Font[fonts.size()]), lang, in readFamily()
116 private static FontConfig.Font readFont(XmlPullParser parser, String fontDir) in readFont()
139 return new FontConfig.Font(fontDir + sanitizedName, index, axes.toArray( in readFont()
DTypeface.java30 import android.graphics.fonts.Font;
252 final Font.Builder fontBuilder = new Font.Builder(mgr, fontFile.getFileName(), in createFromResources()
276 Font bestFont = family.getFont(0); in createFromResources()
279 final Font candidate = family.getFont(i); in createFromResources()
366 private final @Nullable Font.Builder mFontBuilder;
379 mFontBuilder = new Font.Builder(path); in Builder()
393 Font.Builder builder; in Builder()
395 builder = new Font.Builder(ParcelFileDescriptor.dup(fd)); in Builder()
413 mFontBuilder = new Font.Builder(new File(path)); in Builder()
438 mFontBuilder = new Font.Builder(assetManager, path, isAsset, cookie); in Builder()
[all …]
/frameworks/base/core/jni/android/graphics/
DFontUtils.h37 FontWrapper(minikin::Font&& font) : font(std::move(font)) {} in FontWrapper()
38 minikin::Font font;
/frameworks/base/media/java/android/media/
DTimedText.java103 private List<Font> mFontList = null;
246 public static final class Font { class in TimedText
262 public Font(int id, String name) { in Font() method in TimedText.Font
616 Font font = new Font(id, name); in readFont()
619 mFontList = new ArrayList<Font>(); in readFont()
/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()
/frameworks/minikin/tests/stresstest/
DFontFamilyTest.cpp39 std::vector<Font> fonts; in TEST_P()
40 fonts.push_back(Font::Builder(font).build()); in TEST_P()

123