/frameworks/minikin/include/minikin/ |
D | Font.h | 34 class Font; variable 64 const std::shared_ptr<Font>& font; 69 class Font { 102 std::shared_ptr<Font> build(); 122 static std::shared_ptr<Font> readFrom(BufferReader* reader, uint32_t localeListId) { in readFrom() 126 return std::shared_ptr<Font>( in readFrom() 127 new Font(style, typefaceMetadataReader, typefaceLoader, localeListId)); in readFrom() 148 Font(std::shared_ptr<MinikinFont>&& typeface, FontStyle style, HbFontUniquePtr&& baseFont, in Font() function 156 Font(FontStyle style, BufferReader typefaceMetadataReader, TypefaceLoader* typefaceLoader, in Font() function 183 Font(Font&& o) = delete; [all …]
|
D | FontFamily.h | 36 explicit FontFamily(std::vector<std::shared_ptr<Font>>&& fonts); 37 FontFamily(FamilyVariant variant, std::vector<std::shared_ptr<Font>>&& fonts); 39 std::vector<std::shared_ptr<Font>>&& fonts, bool isCustomFallback); 41 template <Font::TypefaceReader typefaceReader> 45 std::vector<std::shared_ptr<Font>> fonts; in readFrom() 48 fonts.emplace_back(Font::readFrom<typefaceReader>(reader, localeListId)); in readFrom() 53 template <Font::TypefaceWriter typefaceWriter> 57 for (const std::shared_ptr<Font>& font : mFonts) { in writeTo() 70 const Font* getFont(size_t index) const { return mFonts[index].get(); } in getFont() 71 const std::shared_ptr<Font>& getFontRef(size_t index) const { return mFonts[index]; } in getFontRef() [all …]
|
/frameworks/base/core/tests/coretests/src/android/graphics/ |
D | TypefaceEqualsTest.java | 23 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()
|
D | FontListParserTest.java | 62 new FontConfig.Font(new File("test.ttf"), null, "test", in named() 80 new FontConfig.Font(new File("test.ttf"), null, "test", in fallback() 83 new FontConfig.Font(new File("test.ttf"), null, "test", in fallback() 100 new FontConfig.Font(new File("test.ttf"), null, "test", in compact() 117 new FontConfig.Font(new File("test.ttf"), null, "test", in elegant() 136 new FontConfig.Font(new File("normal.ttf"), null, "test", in styles() 139 new FontConfig.Font(new File("weight.ttf"), null, "test", in styles() 142 new FontConfig.Font(new File("italic.ttf"), null, "test", in styles() 165 new FontConfig.Font(new File("test-VF.ttf"), null, "test", in variable() 168 new FontConfig.Font(new File("test-VF.ttf"), null, "test", in variable() [all …]
|
/frameworks/base/core/java/android/graphics/fonts/ |
D | FontUpdateRequest.java | 71 public static final class Font implements Parcelable { class in FontUpdateRequest 83 public Font(@NonNull String postScriptName, @NonNull FontStyle fontStyle, in Font() method in FontUpdateRequest.Font 105 public static final @NonNull Creator<Font> CREATOR = new Creator<Font>() { 107 public Font createFromParcel(Parcel source) { 113 return new Font(fontName, new FontStyle(weight, slant), index, varSettings); 117 public Font[] newArray(int size) { 118 return new Font[size]; 130 public static void writeToXml(TypedXmlSerializer out, Font font) throws IOException { in writeToXml() 147 public static Font readFromXml(XmlPullParser parser) throws IOException { in readFromXml() 159 return new Font(psName, new FontStyle(weight, slant), index, varSettings); in readFromXml() [all …]
|
D | FontFamilyUpdateRequest.java | 83 @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/base/packages/SystemUI/tests/src/com/android/keyguard/ |
D | FontInterpolatorTest.kt | 20 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/minikin/libs/minikin/ |
D | Font.cpp | 35 std::shared_ptr<Font> Font::Builder::build() { in build() 38 return std::shared_ptr<Font>(new Font(std::move(mTypeface), FontStyle(mWeight, mSlant), in build() 50 return std::shared_ptr<Font>(new Font(std::move(mTypeface), FontStyle(mWeight, mSlant), in build() 54 const std::shared_ptr<MinikinFont>& Font::typeface() const { in typeface() 61 const HbFontUniquePtr& Font::baseFont() const { in baseFont() 69 void Font::initTypefaceLocked() const { in initTypefaceLocked() 76 HbFontUniquePtr Font::prepareFont(const std::shared_ptr<MinikinFont>& typeface) { in prepareFont() 100 FontStyle Font::analyzeStyle(const HbFontUniquePtr& font) { in analyzeStyle() 115 std::unordered_set<AxisTag> Font::getSupportedAxes() const { in getSupportedAxes()
|
D | FontFamily.cpp | 38 FontFamily::FontFamily(std::vector<std::shared_ptr<Font>>&& fonts) in FontFamily() 41 FontFamily::FontFamily(FamilyVariant variant, std::vector<std::shared_ptr<Font>>&& fonts) in FontFamily() 45 std::vector<std::shared_ptr<Font>>&& fonts, bool isCustomFallback) in FontFamily() 57 std::vector<std::shared_ptr<Font>>&& fonts, in FontFamily() 73 std::vector<std::shared_ptr<Font>>&& fonts, in readFromInternal() 155 Font* bestFont = mFonts[bestIndex].get(); in getClosestMatch() 158 Font* font = mFonts[i].get(); in getClosestMatch() 170 const std::shared_ptr<Font>& font = getClosestMatch(FontStyle()).font; in computeCoverage() 228 std::vector<std::shared_ptr<Font>> fonts; in createFamilyWithVariation() 247 fonts.push_back(Font::Builder(minikinFont).setStyle(font->style()).build()); in createFamilyWithVariation()
|
/frameworks/base/packages/SystemUI/src/com/android/keyguard/ |
D | FontInterpolator.kt | 19 import android.graphics.fonts.Font in <lambda>() 46 private data class InterpKey(var l: Font?, var r: Font?, var progress: Float) { in <lambda>() 47 fun set(l: Font, r: Font, progress: Float) { in <lambda>() 64 constructor(font: Font, axes: List<FontVariationAxis>): in <lambda>() 70 fun set(font: Font, axes: List<FontVariationAxis>) { in <lambda>() 82 private val interpCache = hashMapOf<InterpKey, Font>() in <lambda>() 83 private val verFontCache = hashMapOf<VarFontKey, Font>() in <lambda>() 92 fun lerp(start: Font, end: Font, progress: Float): Font { in <lambda>() 152 val newFont = Font.Builder(start) in <lambda>() 219 fun canInterpolate(start: Font, end: Font) = in <lambda>()
|
/frameworks/base/rs/java/android/renderscript/ |
D | Font.java | 49 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/minikin/tests/unittest/ |
D | FontTest.cpp | 29 std::shared_ptr<Font> original = Font::Builder(minikinFont).build(); in TEST() 30 std::vector<uint8_t> buffer = writeToBuffer<Font, writeFreeTypeMinikinFontForTest>(*original); in TEST() 33 std::shared_ptr<Font> font = in TEST() 34 Font::readFrom<readFreeTypeMinikinFontForTest>(&reader, kEmptyLocaleListId); in TEST() 38 std::vector<uint8_t> newBuffer = writeToBuffer<Font, writeFreeTypeMinikinFontForTest>(*font); in TEST()
|
/frameworks/layoutlib/bridge/src/android/graphics/fonts/ |
D | FontFamily_Builder_Delegate.java | 30 import java.awt.Font; 62 private Map<FontInfo, Font> mFonts = new LinkedHashMap<>(); 86 Font font; in nAddFont() 126 public Font getFont(int desiredWeight, boolean isItalic) { 131 Font cachedFont = mFonts.get(desiredStyle); 173 private void addFont(@NonNull Font font, int weight, boolean italic) { 185 private static Font loadFontBuffer(@NonNull ByteBuffer buffer) { 190 return Font.createFont(Font.TRUETYPE_FONT, new ByteArrayInputStream(byteArray)); 199 private static Font loadFontPath(@NonNull String path) { 202 return Font.createFont(Font.TRUETYPE_FONT, file);
|
/frameworks/base/core/tests/coretests/src/android/provider/ |
D | MockFontProvider.java | 96 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/ |
D | rsFont.h | 44 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 …]
|
D | rsFont.cpp | 34 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/layoutlib/bridge/src/android/graphics/ |
D | BidiRenderer.java | 29 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() 234 private void render(int start, int limit, Font font, int flag, float[] advances, in render() 336 private static Font getScriptFont(char[] text, int start, int limit, List<FontInfo> fonts) { in getScriptFont() [all …]
|
D | FontFamily_Delegate.java | 28 import java.awt.Font; 95 public Font mFont; 138 private Map<FontInfo, Font> mFonts = new LinkedHashMap<>(); 202 public Font getFont(int desiredWeight, boolean isItalic) { in getFont() 207 Font cachedFont = mFonts.get(desiredStyle); in getFont() 257 private static Font loadFont(String path) { in loadFont() 263 return Font.createFont(Font.TRUETYPE_FONT, f); in loadFont() 404 Font font = loadFont(path); 443 Font derivedFont = srcFont.mFont; 447 derivedStyle |= Font.BOLD; [all …]
|
D | Typeface_Delegate.java | 40 import java.awt.Font; 330 public Iterable<Font> getFonts(final FontVariant variant) { in getFonts() 336 private static class FontsIterator implements Iterator<Font>, Iterable<Font> { 350 ((style & Font.BOLD) == 0 ? 0 : FontFamily_Delegate.BOLD_FONT_WEIGHT_DELTA); in FontsIterator() 352 this.isItalic = (style & Font.ITALIC) != 0; in FontsIterator() 365 public Font next() { in next() 366 Font font; in next() 416 public Iterator<Font> iterator() { 421 public Spliterator<Font> spliterator() {
|
/frameworks/base/core/java/android/text/ |
D | FontConfig.java | 194 public static final class Font implements Parcelable { class in FontConfig 208 public Font(@NonNull File file, @Nullable File originalFile, @NonNull String postScriptName, in Font() method in FontConfig.Font 237 public static final @NonNull Creator<Font> CREATOR = new Creator<Font>() { 240 public Font createFromParcel(Parcel source) { 251 return new Font(path, originalPath, postScriptName, new FontStyle(weight, slant), 256 public Font[] newArray(int size) { 257 return new Font[size]; 364 Font font = (Font) o; in equals() 508 private final @NonNull List<Font> mFonts; 550 public FontFamily(@NonNull List<Font> fonts, @Nullable String name, in FontFamily() [all …]
|
/frameworks/base/graphics/java/android/graphics/fonts/ |
D | Font.java | 57 public final class Font { class 69 NativeAllocationRegistry.createMalloced(Font.class.getClassLoader(), 80 private @Nullable Font mFont; 239 public Builder(@NonNull Font font) { in Builder() 446 public @NonNull Font build() throws IOException { in build() 479 final Font font; in build() 483 font = new Font(ptr); in build() 486 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 …]
|
D | FontFamily.java | 71 private final ArrayList<Font> mFonts = new ArrayList<>(); 81 public Builder(@NonNull Font font) { in Builder() 101 public @NonNull Builder addFont(@NonNull Font font) { in addFont() 133 private static int makeStyleIdentifier(@NonNull Font font) { in makeStyleIdentifier() 177 public @NonNull Font getFont(@IntRange(from = 0) int index) { in getFont() 181 return new Font(nGetFont(mNativePtr, index)); in getFont()
|
D | SystemFonts.java | 59 private static @GuardedBy("sLock") Set<Font> sAvailableFonts; 66 public static @NonNull Set<Font> getAvailableFonts() { in getAvailableFonts() 69 sAvailableFonts = Font.getAvailableFonts(); in getAvailableFonts() 101 final ArrayList<FontConfig.Font> defaultFonts = new ArrayList<>(); in pushFamilyToFallback() 102 final ArrayMap<String, ArrayList<FontConfig.Font>> specificFallbackFonts = in pushFamilyToFallback() 106 for (final FontConfig.Font font : xmlFamily.getFonts()) { in pushFamilyToFallback() 111 ArrayList<FontConfig.Font> fallback = specificFallbackFonts.get(fallbackName); in pushFamilyToFallback() 126 final ArrayList<FontConfig.Font> fallback = specificFallbackFonts.get(name); in pushFamilyToFallback() 149 @NonNull List<FontConfig.Font> fonts, in createFontFamily() 159 final FontConfig.Font fontConfig = fonts.get(i); in createFontFamily() [all …]
|
/frameworks/minikin/tests/util/ |
D | FontTestUtils.cpp | 70 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() 127 std::vector<std::shared_ptr<Font>> fonts; in buildFontFamily() 128 fonts.push_back(Font::Builder(font).build()); in buildFontFamily() 135 std::vector<std::shared_ptr<Font>> fonts; in buildFontFamily() 136 fonts.push_back(Font::Builder(font).build()); in buildFontFamily()
|
/frameworks/base/cmds/bootanimation/ |
D | BootAnimation.h | 55 struct Font { struct 106 Font clockFont; 107 Font progressFont; 168 status_t initFont(Font* font, const char* fallback); 171 void drawText(const char* str, const Font& font, bool bold, int* x, int* y); 172 void drawClock(const Font& font, const int xPos, const int yPos); 173 void drawProgress(int percent, const Font& font, const int xPos, const int yPos);
|