Open litherum opened 5 years ago
Also: I wonder if we're making the same mistake with font-family:emoji
.
Agree this provides non-ideal experience today.
Just to add history, CJK fonts used to provide two variants, one of which has fixed ASCII and all CJK characters have double-widths of the ASCII characters. MS Mincho/Gothic on Windows, or Osaka Mono on Mac had such characteristics and authors assumed that monospace
pick such fonts.
Today, neither Windows nor Mac provides such fonts, or only poor quality fonts. Renewing the definition by investigating what authors want, including i18n, might benefits authors.
When authors think "I want my text to be monospaced," they apply
font-family:monospace
. However, there's a problem when applying this to internationalized text.For example, consider
<span lang="zh-Hans" style="font-family: monospace;">我在学习程序语言Python。</span>
. If you consider thelang
attribute, and pick a Simplified Chinese font, that font (likely) supports Latin characters, and they (likely) aren't monospaced. If you don't consider thelang
attribute, you end up with bad choices of fonts in the first place.If you require that any font that
monospace
maps to have theisFixedPitch
bit set in thepost
table, you've just disqualified many fonts that you shouldn't have, because fonts may be monospaced for their primary script but not for their other supported scripts. Also that bit can just be set incorrectly.It seems like the choice to handle monospace at the font selection level, rather than as a distinct setting, was unfortunate. However, it's probably too late to fix this; I'm just filing this issue for posterity.