/frameworks/base/libs/hwui/hwui/ |
D | MinikinSkia.h | 29 class ANDROID_API MinikinFontSkia : public minikin::MinikinFont { 33 const std::vector<minikin::FontVariation>& axes); 35 float GetHorizontalAdvance(uint32_t glyph_id, const minikin::MinikinPaint& paint, 36 const minikin::FontFakery& fakery) const override; 39 const minikin::MinikinPaint& paint, 40 const minikin::FontFakery& fakery, 43 void GetBounds(minikin::MinikinRect* bounds, uint32_t glyph_id, 44 const minikin::MinikinPaint& paint, 45 const minikin::FontFakery& fakery) const override; 47 void GetFontExtent(minikin::MinikinExtent* extent, const minikin::MinikinPaint& paint, [all …]
|
D | MinikinSkia.cpp | 35 const std::vector<minikin::FontVariation>& axes) in MinikinFontSkia() 36 : minikin::MinikinFont(typeface->uniqueID()) in MinikinFontSkia() 44 static void MinikinFontSkia_SetSkiaFont(const minikin::MinikinFont* font, SkFont* skFont, in MinikinFontSkia_SetSkiaFont() 45 const minikin::MinikinPaint& paint, in MinikinFontSkia_SetSkiaFont() 46 const minikin::FontFakery& fakery) { in MinikinFontSkia_SetSkiaFont() 55 float MinikinFontSkia::GetHorizontalAdvance(uint32_t glyph_id, const minikin::MinikinPaint& paint, in GetHorizontalAdvance() 56 const minikin::FontFakery& fakery) const { in GetHorizontalAdvance() 69 const minikin::MinikinPaint& paint, in GetHorizontalAdvances() 70 const minikin::FontFakery& fakery, in GetHorizontalAdvances() 77 void MinikinFontSkia::GetBounds(minikin::MinikinRect* bounds, uint32_t glyph_id, in GetBounds() [all …]
|
D | MinikinUtils.cpp | 30 minikin::MinikinPaint MinikinUtils::prepareMinikinPaint(const Paint* paint, in prepareMinikinPaint() 35 minikin::MinikinPaint minikinPaint(resolvedFace->fFontCollection); in prepareMinikinPaint() 51 minikin::Layout MinikinUtils::doLayout(const Paint* paint, minikin::Bidi bidiFlags, in doLayout() 55 minikin::MeasuredText* mt) { in doLayout() 56 minikin::MinikinPaint minikinPaint = prepareMinikinPaint(paint, typeface); in doLayout() 58 const minikin::U16StringPiece textBuf(buf, bufSize); in doLayout() 59 const minikin::Range range(start, start + count); in doLayout() 60 const minikin::Range contextRange(contextStart, contextStart + contextCount); in doLayout() 61 const minikin::StartHyphenEdit startHyphen = paint->getStartHyphenEdit(); in doLayout() 62 const minikin::EndHyphenEdit endHyphen = paint->getEndHyphenEdit(); in doLayout() [all …]
|
D | Paint.h | 89 void setFamilyVariant(minikin::FamilyVariant variant) { mFamilyVariant = variant; } in setFamilyVariant() 91 minikin::FamilyVariant getFamilyVariant() const { return mFamilyVariant; } in getFamilyVariant() 94 mHyphenEdit = minikin::packHyphenEdit( in setStartHyphenEdit() 95 static_cast<minikin::StartHyphenEdit>(startHyphen), in setStartHyphenEdit() 96 minikin::endHyphenEdit(mHyphenEdit)); in setStartHyphenEdit() 100 mHyphenEdit = minikin::packHyphenEdit( in setEndHyphenEdit() 101 minikin::startHyphenEdit(mHyphenEdit), in setEndHyphenEdit() 102 static_cast<minikin::EndHyphenEdit>(endHyphen)); in setEndHyphenEdit() 105 minikin::StartHyphenEdit getStartHyphenEdit() const { in getStartHyphenEdit() 106 return minikin::startHyphenEdit(mHyphenEdit); in getStartHyphenEdit() [all …]
|
D | MinikinUtils.h | 34 namespace minikin { 42 ANDROID_API static minikin::MinikinPaint prepareMinikinPaint(const Paint* paint, 45 ANDROID_API static minikin::Layout doLayout(const Paint* paint, minikin::Bidi bidiFlags, 49 minikin::MeasuredText* mt); 51 ANDROID_API static float measureText(const Paint* paint, minikin::Bidi bidiFlags, 59 ANDROID_API static float xOffsetForTextAlign(Paint* paint, const minikin::Layout& layout); 61 ANDROID_API static float hOffsetForTextAlign(Paint* paint, const minikin::Layout& layout, 65 ANDROID_API static void forFontRun(const minikin::Layout& layout, Paint* paint, F& f) { in forFontRun() 68 const minikin::MinikinFont* curFont = nullptr; in forFontRun() 72 const minikin::MinikinFont* nextFont = layout.getFont(i); in forFontRun()
|
D | Typeface.cpp | 46 static minikin::FontStyle computeMinikinStyle(int weight, bool italic) { in computeMinikinStyle() 47 return minikin::FontStyle(uirenderer::MathUtils::clamp(weight, 1, 1000), in computeMinikinStyle() 48 static_cast<minikin::FontStyle::Slant>(italic)); in computeMinikinStyle() 52 static minikin::FontStyle computeRelativeStyle(int baseWeight, Typeface::Style relativeStyle) { in computeRelativeStyle() 93 Typeface* src, const std::vector<minikin::FontVariation>& variations) { in createFromTypefaceWithVariation() 125 Typeface* Typeface::createFromFamilies(std::vector<std::shared_ptr<minikin::FontFamily>>&& families, in createFromFamilies() 128 result->fFontCollection.reset(new minikin::FontCollection(families)); in createFromFamilies() 134 const minikin::FontStyle defaultStyle; in createFromFamilies() 135 const minikin::MinikinFont* mf = in createFromFamilies() 185 std::shared_ptr<minikin::MinikinFont> font = std::make_shared<MinikinFontSkia>( in setRobotoTypefaceForTest() [all …]
|
D | Canvas.cpp | 86 DrawTextFunctor(const minikin::Layout& layout, Canvas* canvas, const Paint& paint, float x, in DrawTextFunctor() 87 float y, minikin::MinikinRect& bounds, float totalAdvance) in DrawTextFunctor() 142 const minikin::Layout& layout; 147 minikin::MinikinRect& bounds; 152 int contextCount, float x, float y, minikin::Bidi bidiFlags, in drawText() 153 const Paint& origPaint, const Typeface* typeface, minikin::MeasuredText* mt) { in drawText() 157 minikin::Layout layout = MinikinUtils::doLayout(&paint, bidiFlags, typeface, text, textSize, in drawText() 162 minikin::MinikinRect bounds; in drawText() 214 DrawTextOnPathFunctor(const minikin::Layout& layout, Canvas* canvas, float hOffset, in DrawTextOnPathFunctor() 228 const minikin::Layout& layout; [all …]
|
D | Typeface.h | 35 std::shared_ptr<minikin::FontCollection> fFontCollection; 38 minikin::FontStyle fStyle; 75 Typeface* src, const std::vector<minikin::FontVariation>& variations); 78 std::vector<std::shared_ptr<minikin::FontFamily>>&& families, int weight, int italic);
|
D | Canvas.h | 35 namespace minikin { 287 int contextCount, float x, float y, minikin::Bidi bidiFlags, 288 const Paint& origPaint, const Typeface* typeface, minikin::MeasuredText* mt); 290 void drawTextOnPath(const uint16_t* text, int count, minikin::Bidi bidiFlags, 317 virtual void drawLayoutOnPath(const minikin::Layout& layout, float hOffset, float vOffset,
|
/frameworks/base/core/jni/android/graphics/text/ |
D | LineBreaker.cpp | 51 static inline minikin::android::StaticLayoutNative* toNative(jlong ptr) { in toNative() 52 return reinterpret_cast<minikin::android::StaticLayoutNative*>(ptr); in toNative() 59 return reinterpret_cast<jlong>(new minikin::android::StaticLayoutNative( in nInit() 60 static_cast<minikin::BreakStrategy>(breakStrategy), in nInit() 61 static_cast<minikin::HyphenationFrequency>(hyphenationFrequency), in nInit() 86 minikin::android::StaticLayoutNative* builder = toNative(nativePtr); in nComputeLineBreaks() 91 minikin::U16StringPiece u16Text(text.get(), length); in nComputeLineBreaks() 92 minikin::MeasuredText* measuredText = reinterpret_cast<minikin::MeasuredText*>(measuredTextPtr); in nComputeLineBreaks() 94 std::unique_ptr<minikin::LineBreakResult> result = in nComputeLineBreaks() 95 std::make_unique<minikin::LineBreakResult>(builder->computeBreaks( in nComputeLineBreaks() [all …]
|
D | MeasuredText.cpp | 42 static inline minikin::MeasuredTextBuilder* toBuilder(jlong ptr) { in toBuilder() 43 return reinterpret_cast<minikin::MeasuredTextBuilder*>(ptr); in toBuilder() 50 static inline minikin::MeasuredText* toMeasuredParagraph(jlong ptr) { in toMeasuredParagraph() 51 return reinterpret_cast<minikin::MeasuredText*>(ptr); in toMeasuredParagraph() 64 return toJLong(new minikin::MeasuredTextBuilder()); in nInitBuilder() 72 minikin::MinikinPaint minikinPaint = MinikinUtils::prepareMinikinPaint(paint, typeface); in nAddStyleRun() 88 const minikin::U16StringPiece textBuffer(text.get(), text.size()); in nBuildMeasuredText() 102 minikin::MeasuredText* mt = toMeasuredParagraph(ptr); in nGetWidth() 118 const minikin::U16StringPiece textBuffer(text.get(), text.size()); in nGetBounds() 119 const minikin::Range range(start, end); in nGetBounds() [all …]
|
/frameworks/base/libs/hwui/tests/unit/ |
D | TypefaceTests.cpp | 45 std::shared_ptr<minikin::FontFamily> buildFamily(const char* fileName) { in buildFamily() 57 std::shared_ptr<minikin::MinikinFont> font = in buildFamily() 59 std::vector<minikin::FontVariation>()); in buildFamily() 60 std::vector<minikin::Font> fonts; in buildFamily() 61 fonts.push_back(minikin::Font::Builder(font).build()); in buildFamily() 62 return std::make_shared<minikin::FontFamily>(std::move(fonts)); in buildFamily() 65 std::vector<std::shared_ptr<minikin::FontFamily>> makeSingleFamlyVector(const char* fileName) { in makeSingleFamlyVector() 66 return std::vector<std::shared_ptr<minikin::FontFamily>>({buildFamily(fileName)}); in makeSingleFamlyVector() 87 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, bold->fStyle.slant()); in TEST() 92 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, light->fStyle.slant()); in TEST() [all …]
|
/frameworks/base/core/jni/android/graphics/fonts/ |
D | FontFamily.cpp | 33 std::vector<minikin::Font> fonts; 64 localeId = minikin::registerLocaleList(""); in FontFamily_Builder_build() 67 localeId = minikin::registerLocaleList(str.c_str()); in FontFamily_Builder_build() 69 std::shared_ptr<minikin::FontFamily> family = std::make_shared<minikin::FontFamily>( in FontFamily_Builder_build() 70 localeId, static_cast<minikin::FamilyVariant>(variant), std::move(builder->fonts), in FontFamily_Builder_build()
|
D | Font.cpp | 44 std::vector<minikin::FontVariation> axes; 132 toBuilder(builderPtr)->axes.emplace_back(static_cast<minikin::AxisTag>(tag), value); in Font_Builder_addAxis() 174 std::shared_ptr<minikin::MinikinFont> minikinFont = in Font_Builder_build() 178 minikin::Font font = minikin::Font::Builder(minikinFont).setWeight(weight) in Font_Builder_build() 179 .setSlant(static_cast<minikin::FontStyle::Slant>(italic)).build(); in Font_Builder_build()
|
/frameworks/base/core/jni/android/graphics/ |
D | FontUtils.h | 25 namespace minikin { 32 explicit FontFamilyWrapper(std::shared_ptr<minikin::FontFamily>&& family) : family(family) {} in FontFamilyWrapper() 33 std::shared_ptr<minikin::FontFamily> family; 37 FontWrapper(minikin::Font&& font) : font(std::move(font)) {} in FontWrapper() 38 minikin::Font font;
|
D | FontFamily.cpp | 47 : langId(langId), variant(static_cast<minikin::FamilyVariant>(variant)) {} in NativeFamilyBuilder() 49 minikin::FamilyVariant variant; 50 std::vector<minikin::Font> fonts; 51 std::vector<minikin::FontVariation> axes; 70 builder = new NativeFamilyBuilder(minikin::registerLocaleList(str.c_str()), variant); in FontFamily_initBuilder() 72 builder = new NativeFamilyBuilder(minikin::registerLocaleList(""), variant); in FontFamily_initBuilder() 85 std::shared_ptr<minikin::FontFamily> family = std::make_shared<minikin::FontFamily>( in FontFamily_create() 132 std::shared_ptr<minikin::MinikinFont> minikinFont = in addSkTypeface() 135 minikin::Font::Builder fontBuilder(minikinFont); in addSkTypeface() 141 fontBuilder.setSlant(static_cast<minikin::FontStyle::Slant>(italic != 0)); in addSkTypeface() [all …]
|
D | Paint.cpp | 122 MinikinUtils::measureText(&paint, static_cast<minikin::Bidi>(bidiFlags), typeface, text, in breakText() 214 static_cast<minikin::Bidi>(bidiFlags), typeface, text, start, count, contextCount, in doTextAdvances() 249 minikin::GraphemeBreak::MoveOpt moveOpt = minikin::GraphemeBreak::MoveOpt(opt); in doTextRunCursor() 250 minikin::Bidi bidiFlags = dir == 1 ? minikin::Bidi::FORCE_RTL : minikin::Bidi::FORCE_LTR; in doTextRunCursor() 254 size_t result = minikin::GraphemeBreak::getTextRunCursor(advancesArray.get(), text, in doTextRunCursor() 284 GetTextFunctor(const minikin::Layout& layout, SkPath* path, jfloat x, jfloat y, in GetTextFunctor() 304 const minikin::Layout& layout; 316 minikin::Layout layout = MinikinUtils::doLayout( in getTextPath() 317 paint, static_cast<minikin::Bidi>(bidiFlags), typeface, in getTextPath() 361 minikin::Layout layout = MinikinUtils::doLayout(&paint, in doTextBounds() [all …]
|
D | Typeface.cpp | 62 std::vector<minikin::FontVariation> variations; in Typeface_createFromTypefaceWithVariation() 70 variations.push_back(minikin::FontVariation(axis.getTag(), axis.getStyleValue())); in Typeface_createFromTypefaceWithVariation() 101 std::vector<std::shared_ptr<minikin::FontFamily>> familyVec; in Typeface_createFromArray() 113 minikin::SystemFonts::registerDefault(toTypeface(faceHandle)->fFontCollection); in Typeface_setDefault() 118 const std::unordered_set<minikin::AxisTag>& tagSet = face->fFontCollection->getSupportedTags(); in Typeface_getSupportedAxes() 136 minikin::SystemFonts::registerFallback(familyNameChars.c_str(), in Typeface_registerGenericFamily()
|
/frameworks/base/native/android/ |
D | system_fonts.cpp | 68 minikin::FontStyle mFontStyle; 74 static_cast<uint32_t>(minikin::FamilyVariant::DEFAULT)); 76 static_cast<uint32_t>(minikin::FamilyVariant::COMPACT)); 78 static_cast<uint32_t>(minikin::FamilyVariant::ELEGANT)); 227 matcher->mFontStyle = minikin::FontStyle( in AFontMatcher_setStyle() 228 weight, static_cast<minikin::FontStyle::Slant>(italic)); in AFontMatcher_setStyle() 234 matcher->mLocaleListId = minikin::registerLocaleList(languageTags); in AFontMatcher_setLocales() 247 std::shared_ptr<minikin::FontCollection> fc = in AFontMatcher_match() 248 minikin::SystemFonts::findFontCollection(familyName); in AFontMatcher_match() 249 std::vector<minikin::FontCollection::Run> runs = fc->itemize( in AFontMatcher_match() [all …]
|
/frameworks/minikin/doc/ |
D | minikin_style.md | 23 #include "minikin/Layout.h" // The corresponding header file. 32 #include "minikin/Emoji.h" // The minikin public header file. 33 #include "HbFontCache.h" // The minikin private header file. 39 * `#include "..."` should be used for minikin header files.
|
/frameworks/base/core/jni/ |
D | android_text_Hyphenator.cpp | 62 minikin::addHyphenator(locale, minikin::Hyphenator::loadBinary( in addHyphenatorWithoutPatternFile() 72 minikin::addHyphenator(locale, minikin::Hyphenator::loadBinary( in addHyphenator() 77 minikin::addHyphenatorAlias(from, to); in addHyphenatorAlias()
|
D | android_graphics_Canvas.cpp | 36 namespace minikin { namespace 553 static_cast<minikin::Bidi>(bidiFlags), *paint, typeface, nullptr /* measured text */); in drawTextChars() 569 static_cast<minikin::Bidi>(bidiFlags), *paint, typeface, nullptr /* measured text */); in drawTextString() 576 minikin::MeasuredText* mt = reinterpret_cast<minikin::MeasuredText*>(mtHandle); in drawTextRunChars() 577 const minikin::Bidi bidiFlags = isRtl ? minikin::Bidi::FORCE_RTL : minikin::Bidi::FORCE_LTR; in drawTextRunChars() 593 const minikin::Bidi bidiFlags = isRtl ? minikin::Bidi::FORCE_RTL : minikin::Bidi::FORCE_LTR; in drawTextRunString() 616 static_cast<minikin::Bidi>(bidiFlags), *path, hOffset, vOffset, *paint, typeface); in drawTextOnPathChars() 631 get_canvas(canvasHandle)->drawTextOnPath(jchars, count, static_cast<minikin::Bidi>(bidiFlags), in drawTextOnPathString() 647 minikin::Layout::purgeCaches(); in freeTextLayoutCaches()
|
/frameworks/minikin/tests/util/ |
D | FreeTypeMinikinFontForTest.h | 29 namespace minikin { 51 const std::vector<minikin::FontVariation>& GetAxes() const { return mAxes; } in GetAxes() 58 std::vector<minikin::FontVariation> mAxes;
|
/frameworks/minikin/include/minikin/ |
D | MinikinFont.h | 26 namespace minikin { 67 virtual const std::vector<minikin::FontVariation>& GetAxes() const = 0;
|
/frameworks/minikin/app/ |
D | HyphTool.cpp | 10 using minikin::HyphenationType; 11 using minikin::Hyphenator;
|