Home
last modified time | relevance | path

Searched refs:minikin (Results 1 – 25 of 171) sorted by relevance

1234567

/frameworks/base/libs/hwui/hwui/
DMinikinUtils.cpp31 minikin::MinikinPaint MinikinUtils::prepareMinikinPaint(const Paint* paint, in prepareMinikinPaint()
36 minikin::MinikinPaint minikinPaint(resolvedFace->fFontCollection); in prepareMinikinPaint()
52 minikin::Layout MinikinUtils::doLayout(const Paint* paint, minikin::Bidi bidiFlags, in doLayout()
56 minikin::MeasuredText* mt) { in doLayout()
57 minikin::MinikinPaint minikinPaint = prepareMinikinPaint(paint, typeface); in doLayout()
59 const minikin::U16StringPiece textBuf(buf, bufSize); in doLayout()
60 const minikin::Range range(start, start + count); in doLayout()
61 const minikin::Range contextRange(contextStart, contextStart + contextCount); in doLayout()
62 const minikin::StartHyphenEdit startHyphen = paint->getStartHyphenEdit(); in doLayout()
63 const minikin::EndHyphenEdit endHyphen = paint->getEndHyphenEdit(); in doLayout()
[all …]
DMinikinSkia.h31 class ANDROID_API MinikinFontSkia : public minikin::MinikinFont {
35 const std::vector<minikin::FontVariation>& axes);
37 float GetHorizontalAdvance(uint32_t glyph_id, const minikin::MinikinPaint& paint,
38 const minikin::FontFakery& fakery) const override;
41 const minikin::MinikinPaint& paint,
42 const minikin::FontFakery& fakery,
45 void GetBounds(minikin::MinikinRect* bounds, uint32_t glyph_id,
46 const minikin::MinikinPaint& paint,
47 const minikin::FontFakery& fakery) const override;
49 void GetFontExtent(minikin::MinikinExtent* extent, const minikin::MinikinPaint& paint,
[all …]
DMinikinSkia.cpp38 const std::vector<minikin::FontVariation>& axes) in MinikinFontSkia()
47 static void MinikinFontSkia_SetSkiaFont(const minikin::MinikinFont* font, SkFont* skFont, in MinikinFontSkia_SetSkiaFont()
48 const minikin::MinikinPaint& paint, in MinikinFontSkia_SetSkiaFont()
49 const minikin::FontFakery& fakery) { in MinikinFontSkia_SetSkiaFont()
58 float MinikinFontSkia::GetHorizontalAdvance(uint32_t glyph_id, const minikin::MinikinPaint& paint, in GetHorizontalAdvance()
59 const minikin::FontFakery& fakery) const { in GetHorizontalAdvance()
72 const minikin::MinikinPaint& paint, in GetHorizontalAdvances()
73 const minikin::FontFakery& fakery, in GetHorizontalAdvances()
80 void MinikinFontSkia::GetBounds(minikin::MinikinRect* bounds, uint32_t glyph_id, in GetBounds()
81 const minikin::MinikinPaint& paint, in GetBounds()
[all …]
DMinikinUtils.h34 namespace minikin {
42 static minikin::MinikinPaint prepareMinikinPaint(const Paint* paint,
45 static minikin::Layout doLayout(const Paint* paint, minikin::Bidi bidiFlags,
49 minikin::MeasuredText* mt);
51 static void getBounds(const Paint* paint, minikin::Bidi bidiFlags, const Typeface* typeface,
52 const uint16_t* buf, size_t bufSize, minikin::MinikinRect* out);
54 static float measureText(const Paint* paint, minikin::Bidi bidiFlags,
59 static minikin::MinikinExtent getFontExtent(const Paint* paint, minikin::Bidi bidiFlags,
66 static float xOffsetForTextAlign(Paint* paint, const minikin::Layout& layout);
68 static float hOffsetForTextAlign(Paint* paint, const minikin::Layout& layout,
[all …]
DPaint.h97 void setFamilyVariant(minikin::FamilyVariant variant) { mFamilyVariant = variant; } in setFamilyVariant()
99 minikin::FamilyVariant getFamilyVariant() const { return mFamilyVariant; } in getFamilyVariant()
102 mHyphenEdit = minikin::packHyphenEdit( in setStartHyphenEdit()
103 static_cast<minikin::StartHyphenEdit>(startHyphen), in setStartHyphenEdit()
104 minikin::endHyphenEdit(mHyphenEdit)); in setStartHyphenEdit()
108 mHyphenEdit = minikin::packHyphenEdit( in setEndHyphenEdit()
109 minikin::startHyphenEdit(mHyphenEdit), in setEndHyphenEdit()
110 static_cast<minikin::EndHyphenEdit>(endHyphen)); in setEndHyphenEdit()
113 minikin::StartHyphenEdit getStartHyphenEdit() const { in getStartHyphenEdit()
114 return minikin::startHyphenEdit(mHyphenEdit); in getStartHyphenEdit()
[all …]
DTypeface.cpp48 static minikin::FontStyle computeMinikinStyle(int weight, bool italic) { in computeMinikinStyle()
49 return minikin::FontStyle(uirenderer::MathUtils::clamp(weight, 1, 1000), in computeMinikinStyle()
50 static_cast<minikin::FontStyle::Slant>(italic)); in computeMinikinStyle()
54 static minikin::FontStyle computeRelativeStyle(int baseWeight, Typeface::Style relativeStyle) { in computeRelativeStyle()
95 Typeface* src, const std::vector<minikin::FontVariation>& variations) { in createFromTypefaceWithVariation()
127 Typeface* Typeface::createFromFamilies(std::vector<std::shared_ptr<minikin::FontFamily>>&& families, in createFromFamilies()
131 result->fFontCollection = minikin::FontCollection::create(std::move(families)); in createFromFamilies()
141 const minikin::FontStyle defaultStyle; in createFromFamilies()
142 const minikin::MinikinFont* mf = in createFromFamilies()
193 std::shared_ptr<minikin::MinikinFont> font = in setRobotoTypefaceForTest()
[all …]
DTypeface.h35 std::shared_ptr<minikin::FontCollection> fFontCollection;
38 minikin::FontStyle fStyle;
78 Typeface* src, const std::vector<minikin::FontVariation>& variations);
81 std::vector<std::shared_ptr<minikin::FontFamily>>&& families, int weight, int italic,
DCanvas.cpp87 DrawTextFunctor(const minikin::Layout& layout, Canvas* canvas, const Paint& paint, float x, in DrawTextFunctor()
134 const minikin::Layout& layout;
142 void Canvas::drawGlyphs(const minikin::Font& font, const int* glyphIds, const float* positions, in drawGlyphs()
154 const minikin::MinikinFont* minikinFont = font.typeface().get(); in drawGlyphs()
156 MinikinFontSkia::populateSkFont(skfont, minikinFont, minikin::FontFakery()); in drawGlyphs()
163 int contextCount, float x, float y, minikin::Bidi bidiFlags, in drawText()
164 const Paint& origPaint, const Typeface* typeface, minikin::MeasuredText* mt) { in drawText()
173 minikin::Layout layout = MinikinUtils::doLayout(&paint, bidiFlags, typeface, text, textSize, in drawText()
224 DrawTextOnPathFunctor(const minikin::Layout& layout, Canvas* canvas, float hOffset, in DrawTextOnPathFunctor()
238 const minikin::Layout& layout;
[all …]
DCanvas.h39 namespace minikin {
252 void drawGlyphs(const minikin::Font& font, const int* glyphIds, const float* positions,
260 int contextCount, float x, float y, minikin::Bidi bidiFlags,
261 const Paint& origPaint, const Typeface* typeface, minikin::MeasuredText* mt);
263 void drawTextOnPath(const uint16_t* text, int count, minikin::Bidi bidiFlags,
289 virtual void drawLayoutOnPath(const minikin::Layout& layout, float hOffset, float vOffset,
/frameworks/base/libs/hwui/jni/text/
DLineBreaker.cpp51 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 …]
DTextShaper.cpp38 LayoutWrapper(minikin::Layout&& layout, float ascent, float descent) in LayoutWrapper()
40 minikin::Layout layout;
50 int contextStart, int contextCount, minikin::Bidi bidiFlags, in shapeTextRun()
53 minikin::MinikinPaint minikinPaint = MinikinUtils::prepareMinikinPaint(&paint, typeface); in shapeTextRun()
55 minikin::Layout layout = MinikinUtils::doLayout(&paint, bidiFlags, typeface, in shapeTextRun()
58 std::set<const minikin::Font*> seenFonts; in shapeTextRun()
62 const minikin::Font* font = layout.getFont(i); in shapeTextRun()
64 minikin::MinikinExtent extent = {}; in shapeTextRun()
83 const minikin::Bidi bidiFlags = isRtl ? minikin::Bidi::FORCE_RTL : minikin::Bidi::FORCE_LTR; in TextShaper_shapeTextRunChars()
99 const minikin::Bidi bidiFlags = isRtl ? minikin::Bidi::FORCE_RTL : minikin::Bidi::FORCE_LTR; in TextShaper_shapeTextRunString()
[all …]
DMeasuredText.cpp41 static inline minikin::MeasuredTextBuilder* toBuilder(jlong ptr) { in toBuilder()
42 return reinterpret_cast<minikin::MeasuredTextBuilder*>(ptr); in toBuilder()
49 static inline minikin::MeasuredText* toMeasuredParagraph(jlong ptr) { in toMeasuredParagraph()
50 return reinterpret_cast<minikin::MeasuredText*>(ptr); in toMeasuredParagraph()
63 return toJLong(new minikin::MeasuredTextBuilder()); in nInitBuilder()
72 minikin::MinikinPaint minikinPaint = MinikinUtils::prepareMinikinPaint(paint, typeface); in nAddStyleRun()
89 const minikin::U16StringPiece textBuffer(text.get(), text.size()); in nBuildMeasuredText()
105 minikin::MeasuredText* mt = toMeasuredParagraph(ptr); in nGetWidth()
121 const minikin::U16StringPiece textBuffer(text.get(), text.size()); in nGetBounds()
122 const minikin::Range range(start, end); in nGetBounds()
[all …]
/frameworks/base/libs/hwui/tests/unit/
DTypefaceTests.cpp50 std::shared_ptr<minikin::FontFamily> buildFamily(const char* fileName) { in buildFamily()
62 std::shared_ptr<minikin::MinikinFont> font = in buildFamily()
64 std::vector<minikin::FontVariation>()); in buildFamily()
65 std::vector<std::shared_ptr<minikin::Font>> fonts; in buildFamily()
66 fonts.push_back(minikin::Font::Builder(font).build()); in buildFamily()
67 return minikin::FontFamily::create(std::move(fonts)); in buildFamily()
70 std::vector<std::shared_ptr<minikin::FontFamily>> makeSingleFamlyVector(const char* fileName) { in makeSingleFamlyVector()
71 return std::vector<std::shared_ptr<minikin::FontFamily>>({buildFamily(fileName)}); in makeSingleFamlyVector()
93 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, bold->fStyle.slant()); in TEST()
98 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, light->fStyle.slant()); in TEST()
[all …]
/frameworks/base/libs/hwui/jni/
DTypeface.cpp73 std::vector<minikin::FontVariation> variations; in Typeface_createFromTypefaceWithVariation()
81 variations.push_back(minikin::FontVariation(axis.getTag(), axis.getStyleValue())); in Typeface_createFromTypefaceWithVariation()
113 std::vector<std::shared_ptr<minikin::FontFamily>> familyVec; in Typeface_createFromArray()
125 minikin::SystemFonts::registerDefault(toTypeface(faceHandle)->fFontCollection); in Typeface_setDefault()
146 minikin::SystemFonts::registerFallback(familyNameChars.c_str(), in Typeface_registerGenericFamily()
195 class MinikinFontSkiaFactory : minikin::MinikinFontFactory {
201 void skip(minikin::BufferReader* reader) const override;
202 std::shared_ptr<minikin::MinikinFont> create(minikin::BufferReader reader) const override;
203 void write(minikin::BufferWriter* writer, const minikin::MinikinFont* typeface) const override;
206 void MinikinFontSkiaFactory::skip(minikin::BufferReader* reader) const { in skip()
[all …]
DFontUtils.h26 namespace minikin {
33 explicit FontFamilyWrapper(std::shared_ptr<minikin::FontFamily>&& family) : family(family) {} in FontFamilyWrapper()
34 std::shared_ptr<minikin::FontFamily> family;
38 explicit FontWrapper(std::shared_ptr<minikin::Font>&& font) : font(font) {} in FontWrapper()
39 std::shared_ptr<minikin::Font> font;
DFontFamily.cpp50 : langId(langId), variant(static_cast<minikin::FamilyVariant>(variant)) {} in NativeFamilyBuilder()
52 minikin::FamilyVariant variant;
53 std::vector<std::shared_ptr<minikin::Font>> fonts;
54 std::vector<minikin::FontVariation> axes;
73 builder = new NativeFamilyBuilder(minikin::registerLocaleList(str.c_str()), variant); in FontFamily_initBuilder()
75 builder = new NativeFamilyBuilder(minikin::registerLocaleList(""), variant); in FontFamily_initBuilder()
88 std::shared_ptr<minikin::FontFamily> family = minikin::FontFamily::create( in FontFamily_create()
135 std::shared_ptr<minikin::MinikinFont> minikinFont = in addSkTypeface()
138 minikin::Font::Builder fontBuilder(minikinFont); in addSkTypeface()
144 fontBuilder.setSlant(static_cast<minikin::FontStyle::Slant>(italic != 0)); in addSkTypeface()
[all …]
DPaint.cpp108 MinikinUtils::measureText(&paint, static_cast<minikin::Bidi>(bidiFlags), typeface, text, in breakText()
200 static_cast<minikin::Bidi>(bidiFlags), typeface, text, start, count, contextCount, in doTextAdvances()
235 minikin::GraphemeBreak::MoveOpt moveOpt = minikin::GraphemeBreak::MoveOpt(opt); in doTextRunCursor()
236 minikin::Bidi bidiFlags = dir == 1 ? minikin::Bidi::FORCE_RTL : minikin::Bidi::FORCE_LTR; in doTextRunCursor()
240 size_t result = minikin::GraphemeBreak::getTextRunCursor(advancesArray.get(), text, in doTextRunCursor()
270 GetTextFunctor(const minikin::Layout& layout, SkPath* path, jfloat x, jfloat y, in GetTextFunctor()
290 const minikin::Layout& layout;
302 minikin::Layout layout = MinikinUtils::doLayout( in getTextPath()
303 paint, static_cast<minikin::Bidi>(bidiFlags), typeface, in getTextPath()
347 minikin::MinikinRect rect; in doTextBounds()
[all …]
/frameworks/base/libs/hwui/jni/fonts/
DFont.cpp49 std::vector<minikin::FontVariation> axes;
82 toBuilder(builderPtr)->axes.emplace_back(static_cast<minikin::AxisTag>(tag), value); in Font_Builder_addAxis()
107 std::shared_ptr<minikin::MinikinFont> minikinFont = fonts::createMinikinFontSkia( in Font_Builder_build()
116 uint32_t localeListId = minikin::registerLocaleList(langTagStr.c_str()); in Font_Builder_build()
117 std::shared_ptr<minikin::Font> font = in Font_Builder_build()
118 minikin::Font::Builder(minikinFont) in Font_Builder_build()
120 .setSlant(static_cast<minikin::FontStyle::Slant>(italic)) in Font_Builder_build()
144 std::shared_ptr<minikin::MinikinFont> newMinikinFont = std::make_shared<MinikinFontSkia>( in Font_Builder_clone()
148 std::shared_ptr<minikin::Font> newFont = minikin::Font::Builder(newMinikinFont) in Font_Builder_clone()
150 .setSlant(static_cast<minikin::FontStyle::Slant>(italic)) in Font_Builder_clone()
[all …]
DFontFamily.cpp33 std::vector<std::shared_ptr<minikin::Font>> fonts;
65 localeId = minikin::registerLocaleList(""); in FontFamily_Builder_build()
68 localeId = minikin::registerLocaleList(str.c_str()); in FontFamily_Builder_build()
70 std::shared_ptr<minikin::FontFamily> family = minikin::FontFamily::create( in FontFamily_Builder_build()
71 localeId, static_cast<minikin::FamilyVariant>(variant), std::move(builder->fonts), in FontFamily_Builder_build()
94 std::string langTags = minikin::getLocaleString(localeListId); in FontFamily_getLangTags()
113 std::shared_ptr<minikin::Font> font = family->family->getFontRef(index); in FontFamily_getFont()
DFont.h32 std::shared_ptr<minikin::MinikinFont> createMinikinFontSkia(
34 int ttcIndex, const std::vector<minikin::FontVariation>& axes);
/frameworks/base/native/android/
Dsystem_fonts.cpp102 minikin::FontStyle mFontStyle;
108 static_cast<uint32_t>(minikin::FamilyVariant::DEFAULT));
110 static_cast<uint32_t>(minikin::FamilyVariant::COMPACT));
112 static_cast<uint32_t>(minikin::FamilyVariant::ELEGANT));
245 minikin::SystemFonts::getFontSet( in ASystemFontIterator_open()
246 [&fonts](const std::vector<std::shared_ptr<minikin::Font>>& fontSet) { in ASystemFontIterator_open()
250 if (localeId != minikin::kEmptyLocaleListId) { in ASystemFontIterator_open()
251 locale.emplace(minikin::getLocaleString(localeId)); in ASystemFontIterator_open()
260 font->style().slant() == minikin::FontStyle::Slant::ITALIC, in ASystemFontIterator_open()
292 matcher->mFontStyle = minikin::FontStyle( in AFontMatcher_setStyle()
[all …]
/frameworks/minikin/doc/
Dminikin_style.md23 #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/
Dandroid_text_Hyphenator.cpp62 minikin::addHyphenator(locale, minikin::Hyphenator::loadBinary( in addHyphenatorWithoutPatternFile()
72 minikin::addHyphenator(locale, minikin::Hyphenator::loadBinary( in addHyphenator()
77 minikin::addHyphenatorAlias(from, to); in addHyphenatorAlias()
/frameworks/minikin/tests/util/
DFreeTypeMinikinFontForTest.h32 namespace minikin {
53 const std::vector<minikin::FontVariation>& GetAxes() const { return mAxes; } in GetAxes()
60 std::vector<minikin::FontVariation> mAxes;
/frameworks/minikin/include/minikin/
DMinikinFont.h26 namespace minikin {
72 virtual const std::vector<minikin::FontVariation>& GetAxes() const = 0;

1234567