Supporting complex text layout with OpenType fonts in Android

后端 未结 2 1075
野性不改
野性不改 2020-12-06 16:01

What I would like

I would like to put an OpenType font in my assets folder and use Typeface.createFromAsset to render Unicode text in my Android appli

相关标签:
2条回答
  • 2020-12-06 16:15

    I have no experience with Mongolian in particular, but Lollipop finally introduced Paint.setFontFeatureSettings() which takes a string that follows the CSS format, providing "low-level control over OpenType font features"!

    0 讨论(0)
  • 2020-12-06 16:25

    If you want to use Harfbuzz to do this, I have written a simple guide to implementing a text shaper using Harfbuzz: http://www.simon-cozens.org/content/duffers-guide-fontconfig-and-harfbuzz

    That should get you from font selection to knowing which glyphs should be used and where to put them in the output.

    0 讨论(0)
提交回复
热议问题