Skip to content

Units: decouple grid unit from font metrics

Janet Blackquill requested to merge work/jblackquill/nastaliq into master

Many non-Latin writing systems don't have a consistent baseline and capline (or equivalent) that result in sensical sizes for UI elements.

Many non-Latin fonts do not anticipate their metrics being used for the UI this way, and do not set meaningful metrics beyond what is required for line leading to look adequately spaced and what the font software generates by default.

Font implementations aside, some writing systems are considerably taller than they are wide, and using text height in a unit that often determins UI width will result in the UI being comically or dysfunctionally wide with these writing systems. Arabic's Nastaliq hand is one of the most affected by this, and the layouts are often straight-up broken: overlapping elements, exceeding the screen size, and other issues.

Before After
Screenshot_٢٠٢٤٠٥٢٠_11٣٧٥٥ Screenshot_٢٠٢٤٠٥٢٠_11٣٨١٨
Screenshot_٢٠٢٤٠٥٢٠_11٤٣٢٩ Screenshot_٢٠٢٤٠٥٢٠_11٤٢٥٠

Merge request reports

Loading