Home
last modified time | relevance | path

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

12345678

/frameworks/base/libs/hwui/hwui/
DMinikinUtils.cpp34 minikin::MinikinPaint MinikinUtils::prepareMinikinPaint(const Paint* paint, in prepareMinikinPaint()
39 minikin::MinikinPaint minikinPaint(resolvedFace->fFontCollection); in prepareMinikinPaint()
52 const std::optional<minikin::FamilyVariant>& familyVariant = paint->getFamilyVariant(); in prepareMinikinPaint()
57 ? minikin::FamilyVariant::ELEGANT in prepareMinikinPaint()
58 : minikin::FamilyVariant::DEFAULT; in prepareMinikinPaint()
63 minikin::Layout MinikinUtils::doLayout(const Paint* paint, minikin::Bidi bidiFlags, in doLayout()
67 minikin::MeasuredText* mt) { in doLayout()
68 minikin::MinikinPaint minikinPaint = prepareMinikinPaint(paint, typeface); in doLayout()
70 const minikin::U16StringPiece textBuf(buf, bufSize); in doLayout()
71 const minikin::Range range(start, start + count); 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.cpp39 const std::vector<minikin::FontVariation>& axes) in MinikinFontSkia()
48 static void MinikinFontSkia_SetSkiaFont(const minikin::MinikinFont* font, SkFont* skFont, in MinikinFontSkia_SetSkiaFont()
49 const minikin::MinikinPaint& paint, in MinikinFontSkia_SetSkiaFont()
50 const minikin::FontFakery& fakery) { in MinikinFontSkia_SetSkiaFont()
59 float MinikinFontSkia::GetHorizontalAdvance(uint32_t glyph_id, const minikin::MinikinPaint& paint, in GetHorizontalAdvance()
60 const minikin::FontFakery& fakery) const { in GetHorizontalAdvance()
73 const minikin::MinikinPaint& paint, in GetHorizontalAdvances()
74 const minikin::FontFakery& fakery, in GetHorizontalAdvances()
81 void MinikinFontSkia::GetBounds(minikin::MinikinRect* bounds, uint32_t glyph_id, in GetBounds()
82 const minikin::MinikinPaint& paint, in GetBounds()
[all …]
DPaint.h87 mFontFeatureSettings = minikin::FontFeature::parse(fontFeatures); in setFontFeatureSettings()
92 const std::vector<minikin::FontFeature>& getFontFeatureSettings() const { in getFontFeatureSettings()
103 void setFamilyVariant(minikin::FamilyVariant variant) { mFamilyVariant = variant; } in setFamilyVariant()
105 std::optional<minikin::FamilyVariant> getFamilyVariant() const { return mFamilyVariant; } in getFamilyVariant()
108 mHyphenEdit = minikin::packHyphenEdit( in setStartHyphenEdit()
109 static_cast<minikin::StartHyphenEdit>(startHyphen), in setStartHyphenEdit()
110 minikin::endHyphenEdit(mHyphenEdit)); in setStartHyphenEdit()
114 mHyphenEdit = minikin::packHyphenEdit( in setEndHyphenEdit()
115 minikin::startHyphenEdit(mHyphenEdit), in setEndHyphenEdit()
116 static_cast<minikin::EndHyphenEdit>(endHyphen)); in setEndHyphenEdit()
[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, const Typeface* typeface,
56 float* advances, minikin::MinikinRect* bounds, uint32_t* clusterCount);
58 static minikin::MinikinExtent getFontExtent(const Paint* paint, minikin::Bidi bidiFlags,
65 static float xOffsetForTextAlign(Paint* paint, const minikin::Layout& layout);
[all …]
DTypeface.cpp49 static minikin::FontStyle computeMinikinStyle(int weight, bool italic) { in computeMinikinStyle()
50 return minikin::FontStyle(uirenderer::MathUtils::clamp(weight, 1, 1000), in computeMinikinStyle()
51 static_cast<minikin::FontStyle::Slant>(italic)); in computeMinikinStyle()
55 static minikin::FontStyle computeRelativeStyle(int baseWeight, Typeface::Style relativeStyle) { in computeRelativeStyle()
96 Typeface* src, const std::vector<minikin::FontVariation>& variations) { in createFromTypefaceWithVariation()
128 Typeface* Typeface::createFromFamilies(std::vector<std::shared_ptr<minikin::FontFamily>>&& families, in createFromFamilies()
132 result->fFontCollection = minikin::FontCollection::create(std::move(families)); in createFromFamilies()
142 const minikin::FontStyle defaultStyle; in createFromFamilies()
143 const minikin::MinikinFont* mf = in createFromFamilies()
195 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.cpp69 void Canvas::drawGlyphs(const minikin::Font& font, const int* glyphIds, const float* positions, in drawGlyphs()
81 const minikin::MinikinFont* minikinFont = font.baseTypeface().get(); in drawGlyphs()
83 MinikinFontSkia::populateSkFont(skfont, minikinFont, minikin::FontFakery()); in drawGlyphs()
90 int contextCount, float x, float y, minikin::Bidi bidiFlags, in drawText()
91 const Paint& origPaint, const Typeface* typeface, minikin::MeasuredText* mt) { in drawText()
100 minikin::Layout layout = MinikinUtils::doLayout(&paint, bidiFlags, typeface, text, textSize, in drawText()
176 DrawTextOnPathFunctor(const minikin::Layout& layout, Canvas* canvas, float hOffset, in DrawTextOnPathFunctor()
190 const minikin::Layout& layout;
198 void Canvas::drawTextOnPath(const uint16_t* text, int count, minikin::Bidi bidiFlags, in drawTextOnPath()
209 minikin::Layout layout = in drawTextOnPath()
DPaintImpl.cpp28 , mFamilyVariant(minikin::FamilyVariant::DEFAULT) { in Paint()
97 mRunFlag = minikin::RunFlag::NONE; in reset()
190 if (mRunFlag & minikin::RunFlag::LEFT_EDGE) { in getJavaFlags()
193 if (mRunFlag & minikin::RunFlag::RIGHT_EDGE) { in getJavaFlags()
207 std::underlying_type<minikin::RunFlag>::type rawFlag = minikin::RunFlag::NONE; in setJavaFlags()
209 rawFlag |= minikin::RunFlag::LEFT_EDGE; in setJavaFlags()
212 rawFlag |= minikin::RunFlag::RIGHT_EDGE; in setJavaFlags()
214 mRunFlag = static_cast<minikin::RunFlag>(rawFlag); in setJavaFlags()
/frameworks/base/libs/hwui/jni/text/
DLineBreaker.cpp48 static inline minikin::android::StaticLayoutNative* toNative(jlong ptr) { in toNative()
49 return reinterpret_cast<minikin::android::StaticLayoutNative*>(ptr); in toNative()
56 return reinterpret_cast<jlong>(new minikin::android::StaticLayoutNative( in nInit()
57 static_cast<minikin::BreakStrategy>(breakStrategy), in nInit()
58 static_cast<minikin::HyphenationFrequency>(hyphenationFrequency), isJustified, in nInit()
82 minikin::android::StaticLayoutNative* builder = toNative(nativePtr); in nComputeLineBreaks()
87 minikin::U16StringPiece u16Text(text.get(), length); in nComputeLineBreaks()
88 minikin::MeasuredText* measuredText = reinterpret_cast<minikin::MeasuredText*>(measuredTextPtr); in nComputeLineBreaks()
90 std::unique_ptr<minikin::LineBreakResult> result = in nComputeLineBreaks()
91 std::make_unique<minikin::LineBreakResult>(builder->computeBreaks( in nComputeLineBreaks()
[all …]
DMeasuredText.cpp38 static inline minikin::MeasuredTextBuilder* toBuilder(jlong ptr) { in toBuilder()
39 return reinterpret_cast<minikin::MeasuredTextBuilder*>(ptr); in toBuilder()
46 static inline minikin::MeasuredText* toMeasuredParagraph(jlong ptr) { in toMeasuredParagraph()
47 return reinterpret_cast<minikin::MeasuredText*>(ptr); in toMeasuredParagraph()
60 return toJLong(new minikin::MeasuredTextBuilder()); in nInitBuilder()
69 minikin::MinikinPaint minikinPaint = MinikinUtils::prepareMinikinPaint(paint, typeface); in nAddStyleRun()
88 const minikin::U16StringPiece textBuffer(text.get(), text.size()); in nBuildMeasuredText()
104 minikin::MeasuredText* mt = toMeasuredParagraph(ptr); in nGetWidth()
120 const minikin::U16StringPiece textBuffer(text.get(), text.size()); in nGetBounds()
121 const minikin::Range range(start, end); in nGetBounds()
[all …]
DTextShaper.cpp35 LayoutWrapper(minikin::Layout&& layout, float ascent, float descent) in LayoutWrapper()
37 minikin::Layout layout;
47 int contextStart, int contextCount, minikin::Bidi bidiFlags, in shapeTextRun()
50 minikin::MinikinPaint minikinPaint = MinikinUtils::prepareMinikinPaint(&paint, typeface); in shapeTextRun()
52 minikin::Layout layout = MinikinUtils::doLayout(&paint, bidiFlags, typeface, in shapeTextRun()
55 std::set<const minikin::Font*> seenFonts; in shapeTextRun()
59 const minikin::Font* font = layout.getFont(i); in shapeTextRun()
61 minikin::MinikinExtent extent = {}; in shapeTextRun()
80 const minikin::Bidi bidiFlags = isRtl ? minikin::Bidi::FORCE_RTL : minikin::Bidi::FORCE_LTR; in TextShaper_shapeTextRunChars()
96 const minikin::Bidi bidiFlags = isRtl ? minikin::Bidi::FORCE_RTL : minikin::Bidi::FORCE_LTR; in TextShaper_shapeTextRunString()
[all …]
/frameworks/base/libs/hwui/tests/unit/
DTypefaceTests.cpp51 std::shared_ptr<minikin::FontFamily> buildFamily(const char* fileName) { in buildFamily()
63 std::shared_ptr<minikin::MinikinFont> font = in buildFamily()
65 std::vector<minikin::FontVariation>()); in buildFamily()
66 std::vector<std::shared_ptr<minikin::Font>> fonts; in buildFamily()
67 fonts.push_back(minikin::Font::Builder(font).build()); in buildFamily()
68 return minikin::FontFamily::create(std::move(fonts)); in buildFamily()
71 std::vector<std::shared_ptr<minikin::FontFamily>> makeSingleFamlyVector(const char* fileName) { in makeSingleFamlyVector()
72 return std::vector<std::shared_ptr<minikin::FontFamily>>({buildFamily(fileName)}); in makeSingleFamlyVector()
94 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, bold->fStyle.slant()); in TEST()
99 EXPECT_EQ(minikin::FontStyle::Slant::UPRIGHT, light->fStyle.slant()); in TEST()
[all …]
DUnderlineTest.cpp61 std::shared_ptr<minikin::FontFamily> buildFamily(const char* fileName) { in buildFamily()
73 std::shared_ptr<minikin::MinikinFont> font = in buildFamily()
75 std::vector<minikin::FontVariation>()); in buildFamily()
76 std::vector<std::shared_ptr<minikin::Font>> fonts; in buildFamily()
77 fonts.push_back(minikin::Font::Builder(font).build()); in buildFamily()
78 return minikin::FontFamily::create(std::move(fonts)); in buildFamily()
84 std::vector<std::shared_ptr<minikin::FontFamily>>( in makeTypeface()
90 minikin::Layout doLayout(const std::vector<uint16_t> text, Paint paint, Typeface* typeface) { in doLayout()
91 return MinikinUtils::doLayout(&paint, minikin::Bidi::LTR, typeface, text.data(), text.size(), in doLayout()
105 minikin::Layout layout = doLayout(text, *paint, typeface.get()); in processFunctor()
/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 …]
DFontFamily.cpp49 : langId(langId), variant(static_cast<minikin::FamilyVariant>(variant)) {} in NativeFamilyBuilder()
51 minikin::FamilyVariant variant;
52 std::vector<std::shared_ptr<minikin::Font>> fonts;
53 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()
91 minikin::VariationFamilyType::None); in FontFamily_create()
136 std::shared_ptr<minikin::MinikinFont> minikinFont = in addSkTypeface()
139 minikin::Font::Builder fontBuilder(minikinFont); in addSkTypeface()
[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;
DPaint.cpp59 void copyMinikinRectToSkRect(const minikin::MinikinRect& minikinRect, SkRect* skRect) { in copyMinikinRectToSkRect()
116 MinikinUtils::measureText(&paint, static_cast<minikin::Bidi>(bidiFlags), typeface, text, 0, in breakText()
208 paint, static_cast<minikin::Bidi>(bidiFlags), typeface, text, start, count, in doTextAdvances()
243 minikin::GraphemeBreak::MoveOpt moveOpt = minikin::GraphemeBreak::MoveOpt(opt); in doTextRunCursor()
244 minikin::Bidi bidiFlags = dir == 1 ? minikin::Bidi::FORCE_RTL : minikin::Bidi::FORCE_LTR; in doTextRunCursor()
248 size_t result = minikin::GraphemeBreak::getTextRunCursor(advancesArray.get(), text, in doTextRunCursor()
278 GetTextFunctor(const minikin::Layout& layout, SkPath* path, jfloat x, jfloat y, in GetTextFunctor()
298 const minikin::Layout& layout;
310 minikin::Layout layout = MinikinUtils::doLayout( in getTextPath()
311 paint, static_cast<minikin::Bidi>(bidiFlags), typeface, in getTextPath()
[all …]
/frameworks/base/libs/hwui/jni/fonts/
DFont.cpp47 std::vector<minikin::FontVariation> axes;
80 toBuilder(builderPtr)->axes.emplace_back(static_cast<minikin::AxisTag>(tag), value); in Font_Builder_addAxis()
105 std::shared_ptr<minikin::MinikinFont> minikinFont = fonts::createMinikinFontSkia( in Font_Builder_build()
114 uint32_t localeListId = minikin::registerLocaleList(langTagStr.c_str()); in Font_Builder_build()
115 std::shared_ptr<minikin::Font> font = in Font_Builder_build()
116 minikin::Font::Builder(minikinFont) in Font_Builder_build()
118 .setSlant(static_cast<minikin::FontStyle::Slant>(italic)) in Font_Builder_build()
142 std::shared_ptr<minikin::MinikinFont> newMinikinFont = std::make_shared<MinikinFontSkia>( in Font_Builder_clone()
146 std::shared_ptr<minikin::Font> newFont = minikin::Font::Builder(newMinikinFont) in Font_Builder_clone()
148 .setSlant(static_cast<minikin::FontStyle::Slant>(italic)) in Font_Builder_clone()
[all …]
DFontFamily.cpp31 std::vector<std::shared_ptr<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 = minikin::FontFamily::create( in FontFamily_Builder_build()
70 localeId, static_cast<minikin::FamilyVariant>(variant), std::move(builder->fonts), in FontFamily_Builder_build()
72 static_cast<minikin::VariationFamilyType>(variationFamilyType)); 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.cpp100 minikin::FontStyle mFontStyle;
106 static_cast<uint32_t>(minikin::FamilyVariant::DEFAULT));
108 static_cast<uint32_t>(minikin::FamilyVariant::COMPACT));
110 static_cast<uint32_t>(minikin::FamilyVariant::ELEGANT));
243 minikin::SystemFonts::getFontSet( in ASystemFontIterator_open()
244 [&fonts](const std::vector<std::shared_ptr<minikin::Font>>& fontSet) { in ASystemFontIterator_open()
248 if (localeId != minikin::kEmptyLocaleListId) { in ASystemFontIterator_open()
249 locale.emplace(minikin::getLocaleString(localeId)); in ASystemFontIterator_open()
258 font->style().slant() == minikin::FontStyle::Slant::ITALIC, in ASystemFontIterator_open()
291 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/minikin/rust/
DAndroid.bp17 crate_name: "minikin",
18 srcs: ["minikin.rs"],
42 srcs: ["minikin.rs"],
50 srcs: ["minikin.rs"],
/frameworks/base/core/jni/
Dandroid_text_Hyphenator.cpp62 minikin::addHyphenator(locale, in addHyphenatorWithoutPatternFile()
63 minikin::Hyphenator::loadBinary(nullptr, 0, minPrefix, minSuffix, in addHyphenatorWithoutPatternFile()
73 minikin::addHyphenator(locale, in addHyphenator()
74 minikin::Hyphenator::loadBinary(r.first, r.second, minPrefix, minSuffix, in addHyphenator()
79 minikin::addHyphenatorAlias(from, to); in addHyphenatorAlias()

12345678