Thanks for your insights, Eli! Some follow-up thoughts & questions. Eli Zaretskii writes: >> On my system, I happen to have >> >> - one font (KpMath) that provides U+1D49C–U+1D4B5 (the "capital" chars), >> but not U+1D4B6–U+1D4CF (the "small" chars), >> >> - another font (DejaVu Math TeX Gyre) that provides both sub-ranges[1]. >> >> As luck would have it, when trying to display a char in this range, >> Emacs stumbles on KpMath first > > It's not Emacs that stumbles on that font, it's your font backend > (probably fontconfig?). Emacs just verifies that the candidate fonts > returned by the backend satisfy the requirements, and uses the first > font that does. So this might mean a bug report for fontconfig and/or > the font designers is in order. Right; "as luck would have it", fontconfig returns KpMath rather than DejaVu Math TeX Gyre; that's because Emacs only asks for U+1D49C, if I'm reading ftfont.c's use of Vscript_representative_chars correctly? So I'm not sure there's a bug on fontconfig's end? FWIW the CLI tools seem to provide accurate information[1]. >> E.g. in fontset.el, would it be overkill to break down the 52-char >> ranges in the math-subgroup loop into 2 26-char ranges in order to >> always add the "SMALL A" codepoints to script-representative-chars? > > What would be the purpose of breaking that range? > script-representative-chars can specify multiple characters per > script, see its doc string. Right now script-representative-chars contains this: > (mathematical-script 119964) With this patch: