Developer finds Chinese text renders larger than English at equal font sizes
A developer audited 62 places in an app where English and Chinese lines are stacked, finding that a simple rule of making the Chinese line one notch smaller produced visually larger Chinese text in most cases. The developer attributes this to a difference in glyph metrics: Han characters fill a taller ink box than Latin cap heights or x-heights at the same font size. Canvas measurements at 14px showed Han ink about 17% taller than capital H and about 56% taller than lowercase x. Applying this to the codebase, the median pair rendered Chinese larger than the English line it was meant to subordinate. The developer's earlier font-metric check missed the problem because it measured the primary font's bounding box rather than the rendered ink of each script.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in