Improve font selection on MS-Windows
The Arial Unicode MS font claims in its USB (Unicode Subset Bitfields) values support for several scripts for which it doesn't actually have glyphs. This sometimes caused Emacs to decide to use Arial Unicode MS for some script, only to discover later that there are no glyphs for that script's characters. This change fixes the USB values according to actual font coverage, as determined by BabelMap. * src/w32font.c (add_font_entity_to_list): Fix USB values of Arial Unicode MS font according to its actual coverage of scripts.
This commit is contained in:
parent
a83e75b207
commit
8399c6a821
1 changed files with 13 additions and 0 deletions
|
@ -1540,6 +1540,19 @@ add_font_entity_to_list (ENUMLOGFONTEX *logical_font,
|
|||
|| physical_font->ntmFontSig.fsUsb[1]
|
||||
|| physical_font->ntmFontSig.fsUsb[0] & 0x3fffffff;
|
||||
|
||||
/* Kludgey fix for Arial Unicode MS font that claims support for
|
||||
scripts it doesn't actually cover. */
|
||||
if (strncmp (logical_font->elfLogFont.lfFaceName,
|
||||
"Arial Unicode MS", 16) == 0)
|
||||
{
|
||||
/* Reset bits 4 (Phonetic), 12 (Vai), 14 (Nko), 27 (Balinese). */
|
||||
physical_font->ntmFontSig.fsUsb[0] &= 0xf7ffafef;
|
||||
/* Reset bits 53 (Phags-pa) and 58 (Phoenician). */
|
||||
physical_font->ntmFontSig.fsUsb[1] &= 0xfbdfffff;
|
||||
/* Set bit 70 (Tibetan). */
|
||||
physical_font->ntmFontSig.fsUsb[2] |= 0x00000040;
|
||||
}
|
||||
|
||||
/* Skip non matching fonts. */
|
||||
|
||||
/* For uniscribe backend, consider only truetype or opentype fonts
|
||||
|
|
Loading…
Add table
Reference in a new issue