summaryrefslogtreecommitdiff
path: root/src/w32font.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/w32font.c')
-rw-r--r--src/w32font.c274
1 files changed, 202 insertions, 72 deletions
diff --git a/src/w32font.c b/src/w32font.c
index d6bd7d6a2b3..611a0c89658 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -1,5 +1,5 @@
/* Font backend for the Microsoft Windows API.
- Copyright (C) 2007-2017 Free Software Foundation, Inc.
+ Copyright (C) 2007-2022 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -29,9 +29,12 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
#include "coding.h" /* for ENCODE_SYSTEM, DECODE_SYSTEM */
#include "w32font.h"
#ifdef WINDOWSNT
+#include "w32common.h"
#include "w32.h"
#endif
+#include "pdumper.h"
+
/* Cleartype available on Windows XP, cleartype_natural from XP SP1.
The latter does not try to fit cleartype smoothed fonts into the
same bounding box as the non-antialiased version of the font.
@@ -87,6 +90,8 @@ struct font_callback_data
Lisp_Object orig_font_spec;
/* The frame the font is being loaded on. */
Lisp_Object frame;
+ /* Fonts known to support the font spec, or nil if none. */
+ Lisp_Object known_fonts;
/* The list to add matches to. */
Lisp_Object list;
/* Whether to match only opentype fonts. */
@@ -153,7 +158,7 @@ get_outline_metrics_w(HDC hdc, UINT cbData, LPOUTLINETEXTMETRICW lpotmw)
hm_unicows = w32_load_unicows_or_gdi32 ();
if (hm_unicows)
s_pfn_Get_Outline_Text_MetricsW = (GetOutlineTextMetricsW_Proc)
- GetProcAddress (hm_unicows, "GetOutlineTextMetricsW");
+ get_proc_addr (hm_unicows, "GetOutlineTextMetricsW");
}
eassert (s_pfn_Get_Outline_Text_MetricsW != NULL);
return s_pfn_Get_Outline_Text_MetricsW (hdc, cbData, lpotmw);
@@ -170,7 +175,7 @@ get_text_metrics_w(HDC hdc, LPTEXTMETRICW lptmw)
hm_unicows = w32_load_unicows_or_gdi32 ();
if (hm_unicows)
s_pfn_Get_Text_MetricsW = (GetTextMetricsW_Proc)
- GetProcAddress (hm_unicows, "GetTextMetricsW");
+ get_proc_addr (hm_unicows, "GetTextMetricsW");
}
eassert (s_pfn_Get_Text_MetricsW != NULL);
return s_pfn_Get_Text_MetricsW (hdc, lptmw);
@@ -188,7 +193,7 @@ get_glyph_outline_w (HDC hdc, UINT uChar, UINT uFormat, LPGLYPHMETRICS lpgm,
hm_unicows = w32_load_unicows_or_gdi32 ();
if (hm_unicows)
s_pfn_Get_Glyph_OutlineW = (GetGlyphOutlineW_Proc)
- GetProcAddress (hm_unicows, "GetGlyphOutlineW");
+ get_proc_addr (hm_unicows, "GetGlyphOutlineW");
}
eassert (s_pfn_Get_Glyph_OutlineW != NULL);
return s_pfn_Get_Glyph_OutlineW (hdc, uChar, uFormat, lpgm, cbBuffer,
@@ -206,7 +211,7 @@ get_char_width_32_w (HDC hdc, UINT uFirstChar, UINT uLastChar, LPINT lpBuffer)
hm_unicows = w32_load_unicows_or_gdi32 ();
if (hm_unicows)
s_pfn_Get_Char_Width_32W = (GetCharWidth32W_Proc)
- GetProcAddress (hm_unicows, "GetCharWidth32W");
+ get_proc_addr (hm_unicows, "GetCharWidth32W");
}
eassert (s_pfn_Get_Char_Width_32W != NULL);
return s_pfn_Get_Char_Width_32W (hdc, uFirstChar, uLastChar, lpBuffer);
@@ -430,7 +435,7 @@ w32font_encode_char (struct font *font, int c)
CODE (length NGLYPHS). Apparently metrics can be NULL, in this
case just return the overall width. */
void
-w32font_text_extents (struct font *font, unsigned *code,
+w32font_text_extents (struct font *font, const unsigned *code,
int nglyphs, struct font_metrics *metrics)
{
int i;
@@ -675,7 +680,7 @@ w32font_draw (struct glyph_string *s, int from, int to,
characters, because drawing background with font dimensions
in those cases makes the display illegible. There's only one
more call to the draw method with with_background set to
- true, and that's in x_draw_glyph_string_foreground, when
+ true, and that's in w32_draw_glyph_string_foreground, when
drawing the cursor, where we have no such heuristics
available. FIXME. */
if (s->first_glyph->type == GLYPHLESS_GLYPH
@@ -701,11 +706,23 @@ w32font_draw (struct glyph_string *s, int from, int to,
int i;
for (i = 0; i < len; i++)
- ExtTextOutW (s->hdc, x + i, y, options, NULL,
- s->char2b + from + i, 1, NULL);
+ {
+ WCHAR c = s->char2b[from + i] & 0xFFFF;
+ ExtTextOutW (s->hdc, x + i, y, options, NULL, &c, 1, NULL);
+ }
}
else
- ExtTextOutW (s->hdc, x, y, options, NULL, s->char2b + from, len, NULL);
+ {
+ /* The number of glyphs in a glyph_string cannot be larger than
+ the maximum value of the 'used' member of a glyph_row, so we
+ are OK using alloca here. */
+ eassert (len <= SHRT_MAX);
+ WCHAR *chars = alloca (len * sizeof (WCHAR));
+ int j;
+ for (j = 0; j < len; j++)
+ chars[j] = s->char2b[from + j] & 0xFFFF;
+ ExtTextOutW (s->hdc, x, y, options, NULL, chars, len, NULL);
+ }
/* Restore clip region. */
if (s->num_clips > 0)
@@ -718,7 +735,7 @@ w32font_draw (struct glyph_string *s, int from, int to,
}
/* w32 implementation of free_entity for font backend.
- Optional (if FONT_EXTRA_INDEX is not Lisp_Save_Value).
+ Optional.
Free FONT_EXTRA_INDEX field of FONT_ENTITY.
static void
w32font_free_entity (Lisp_Object entity);
@@ -826,6 +843,25 @@ w32font_list_internal (struct frame *f, Lisp_Object font_spec,
match_data.opentype_only = opentype_only;
if (opentype_only)
match_data.pattern.lfOutPrecision = OUT_OUTLINE_PRECIS;
+ match_data.known_fonts = Qnil;
+ Lisp_Object vw32_non_USB_fonts = Fsymbol_value (Qw32_non_USB_fonts), val;
+ if (CONSP (vw32_non_USB_fonts))
+ {
+ Lisp_Object extra;
+ for (extra = AREF (font_spec, FONT_EXTRA_INDEX);
+ CONSP (extra); extra = XCDR (extra))
+ {
+ Lisp_Object tem = XCAR (extra);
+ if (CONSP (tem)
+ && EQ (XCAR (tem), QCscript)
+ && SYMBOLP (XCDR (tem))
+ && !NILP (val = assq_no_quit (XCDR (tem), vw32_non_USB_fonts)))
+ {
+ match_data.known_fonts = XCDR (val);
+ break;
+ }
+ }
+ }
if (match_data.pattern.lfFaceName[0] == '\0')
{
@@ -875,6 +911,26 @@ w32font_match_internal (struct frame *f, Lisp_Object font_spec,
if (opentype_only)
match_data.pattern.lfOutPrecision = OUT_OUTLINE_PRECIS;
+ match_data.known_fonts = Qnil;
+ Lisp_Object vw32_non_USB_fonts = Fsymbol_value (Qw32_non_USB_fonts), val;
+ if (CONSP (vw32_non_USB_fonts))
+ {
+ Lisp_Object extra;
+ for (extra = AREF (font_spec, FONT_EXTRA_INDEX);
+ CONSP (extra); extra = XCDR (extra))
+ {
+ Lisp_Object tem = XCAR (extra);
+ if (CONSP (tem)
+ && EQ (XCAR (tem), QCscript)
+ && SYMBOLP (XCDR (tem))
+ && !NILP (val = assq_no_quit (XCDR (tem), vw32_non_USB_fonts)))
+ {
+ match_data.known_fonts = XCDR (val);
+ break;
+ }
+ }
+ }
+
/* Prevent quitting while EnumFontFamiliesEx runs and conses the
list it will return. That's because get_frame_dc acquires the
critical section, so we cannot quit before we release it in
@@ -920,7 +976,7 @@ w32font_open_internal (struct frame *f, Lisp_Object font_entity,
if (!EQ (val, Qraster))
logfont.lfOutPrecision = OUT_TT_PRECIS;
- size = XINT (AREF (font_entity, FONT_SIZE_INDEX));
+ size = XFIXNUM (AREF (font_entity, FONT_SIZE_INDEX));
if (!size)
size = pixel_size;
@@ -1096,9 +1152,9 @@ w32_enumfont_pattern_entity (Lisp_Object frame,
ASET (entity, FONT_ADSTYLE_INDEX, tem);
if (physical_font->ntmTm.tmPitchAndFamily & 0x01)
- ASET (entity, FONT_SPACING_INDEX, make_number (FONT_SPACING_PROPORTIONAL));
+ ASET (entity, FONT_SPACING_INDEX, make_fixnum (FONT_SPACING_PROPORTIONAL));
else
- ASET (entity, FONT_SPACING_INDEX, make_number (FONT_SPACING_CHARCELL));
+ ASET (entity, FONT_SPACING_INDEX, make_fixnum (FONT_SPACING_CHARCELL));
if (requested_font->lfQuality != DEFAULT_QUALITY)
{
@@ -1109,19 +1165,19 @@ w32_enumfont_pattern_entity (Lisp_Object frame,
intern_font_name (lf->lfFaceName));
FONT_SET_STYLE (entity, FONT_WEIGHT_INDEX,
- make_number (w32_decode_weight (lf->lfWeight)));
+ make_fixnum (w32_decode_weight (lf->lfWeight)));
FONT_SET_STYLE (entity, FONT_SLANT_INDEX,
- make_number (lf->lfItalic ? 200 : 100));
+ make_fixnum (lf->lfItalic ? 200 : 100));
/* TODO: PANOSE struct has this info, but need to call GetOutlineTextMetrics
to get it. */
- FONT_SET_STYLE (entity, FONT_WIDTH_INDEX, make_number (100));
+ FONT_SET_STYLE (entity, FONT_WIDTH_INDEX, make_fixnum (100));
if (font_type & RASTER_FONTTYPE)
ASET (entity, FONT_SIZE_INDEX,
- make_number (physical_font->ntmTm.tmHeight
+ make_fixnum (physical_font->ntmTm.tmHeight
+ physical_font->ntmTm.tmExternalLeading));
else
- ASET (entity, FONT_SIZE_INDEX, make_number (0));
+ ASET (entity, FONT_SIZE_INDEX, make_fixnum (0));
/* Cache Unicode codepoints covered by this font, as there is no other way
of getting this information easily. */
@@ -1229,9 +1285,9 @@ font_matches_spec (DWORD type, NEWTEXTMETRICEX *font,
/* Check spacing */
val = AREF (spec, FONT_SPACING_INDEX);
- if (INTEGERP (val))
+ if (FIXNUMP (val))
{
- int spacing = XINT (val);
+ int spacing = XFIXNUM (val);
int proportional = (spacing < FONT_SPACING_MONO);
if ((proportional && !(font->ntmTm.tmPitchAndFamily & 0x01))
@@ -1484,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
@@ -1496,9 +1565,13 @@ add_font_entity_to_list (ENUMLOGFONTEX *logical_font,
/* Ensure a match. */
if (!logfonts_match (&logical_font->elfLogFont, &match_data->pattern)
- || !font_matches_spec (font_type, physical_font,
- match_data->orig_font_spec, backend,
- &logical_font->elfLogFont)
+ || !(font_matches_spec (font_type, physical_font,
+ match_data->orig_font_spec, backend,
+ &logical_font->elfLogFont)
+ || (!NILP (match_data->known_fonts)
+ && memq_no_quit
+ (intern_font_name (logical_font->elfLogFont.lfFaceName),
+ match_data->known_fonts)))
|| !w32font_coverage_ok (&physical_font->ntmFontSig,
match_data->pattern.lfCharSet))
return 1;
@@ -1822,8 +1895,8 @@ w32_to_x_charset (int fncharset, char *matching)
/* Look for Same charset and a valid codepage (or non-int
which means ignore). */
if (EQ (w32_charset, charset_type)
- && (!INTEGERP (codepage) || XINT (codepage) == CP_DEFAULT
- || IsValidCodePage (XINT (codepage))))
+ && (!FIXNUMP (codepage) || XFIXNUM (codepage) == CP_DEFAULT
+ || IsValidCodePage (XFIXNUM (codepage))))
{
/* If we don't have a match already, then this is the
best. */
@@ -1914,10 +1987,11 @@ w32_decode_weight (int fnweight)
if (fnweight >= FW_EXTRABOLD) return 205;
if (fnweight >= FW_BOLD) return 200;
if (fnweight >= FW_SEMIBOLD) return 180;
- if (fnweight >= FW_NORMAL) return 100;
- if (fnweight >= FW_LIGHT) return 50;
- if (fnweight >= FW_EXTRALIGHT) return 40;
- if (fnweight > FW_THIN) return 20;
+ if (fnweight >= FW_MEDIUM) return 100;
+ if (fnweight >= FW_NORMAL) return 80;
+ if (fnweight >= FW_LIGHT) return 50;
+ if (fnweight >= FW_EXTRALIGHT) return 40;
+ if (fnweight >= FW_THIN) return 20;
return 0;
}
@@ -1928,10 +2002,11 @@ w32_encode_weight (int n)
if (n >= 205) return FW_EXTRABOLD;
if (n >= 200) return FW_BOLD;
if (n >= 180) return FW_SEMIBOLD;
- if (n >= 100) return FW_NORMAL;
- if (n >= 50) return FW_LIGHT;
- if (n >= 40) return FW_EXTRALIGHT;
- if (n >= 20) return FW_THIN;
+ if (n >= 100) return FW_MEDIUM;
+ if (n >= 80) return FW_NORMAL;
+ if (n >= 50) return FW_LIGHT;
+ if (n >= 40) return FW_EXTRALIGHT;
+ if (n >= 20) return FW_THIN;
return 0;
}
@@ -1940,11 +2015,15 @@ w32_encode_weight (int n)
static Lisp_Object
w32_to_fc_weight (int n)
{
- if (n >= FW_EXTRABOLD) return intern ("black");
- if (n >= FW_BOLD) return Qbold;
- if (n >= FW_SEMIBOLD) return intern ("demibold");
- if (n >= FW_NORMAL) return intern ("medium");
- return Qlight;
+ if (n >= FW_HEAVY) return Qblack;
+ if (n >= FW_EXTRABOLD) return Qextra_bold;
+ if (n >= FW_BOLD) return Qbold;
+ if (n >= FW_SEMIBOLD) return Qsemi_bold;
+ if (n >= FW_MEDIUM) return Qmedium;
+ if (n >= FW_NORMAL) return Qnormal;
+ if (n >= FW_LIGHT) return Qlight;
+ if (n >= FW_EXTRALIGHT) return Qextra_light;
+ return Qthin;
}
/* Fill in all the available details of LOGFONT from FONT_SPEC. */
@@ -1955,19 +2034,15 @@ fill_in_logfont (struct frame *f, LOGFONT *logfont, Lisp_Object font_spec)
int dpi = FRAME_RES_Y (f);
tmp = AREF (font_spec, FONT_DPI_INDEX);
- if (INTEGERP (tmp))
- {
- dpi = XINT (tmp);
- }
+ if (FIXNUMP (tmp))
+ dpi = XFIXNUM (tmp);
else if (FLOATP (tmp))
- {
- dpi = (int) (XFLOAT_DATA (tmp) + 0.5);
- }
+ dpi = (int) (XFLOAT_DATA (tmp) + 0.5);
/* Height */
tmp = AREF (font_spec, FONT_SIZE_INDEX);
- if (INTEGERP (tmp))
- logfont->lfHeight = -1 * XINT (tmp);
+ if (FIXNUMP (tmp))
+ logfont->lfHeight = -1 * XFIXNUM (tmp);
else if (FLOATP (tmp))
logfont->lfHeight = (int) (-1.0 * dpi * XFLOAT_DATA (tmp) / 72.27 + 0.5);
@@ -1977,12 +2052,12 @@ fill_in_logfont (struct frame *f, LOGFONT *logfont, Lisp_Object font_spec)
/* Weight */
tmp = AREF (font_spec, FONT_WEIGHT_INDEX);
- if (INTEGERP (tmp))
+ if (FIXNUMP (tmp))
logfont->lfWeight = w32_encode_weight (FONT_WEIGHT_NUMERIC (font_spec));
/* Italic */
tmp = AREF (font_spec, FONT_SLANT_INDEX);
- if (INTEGERP (tmp))
+ if (FIXNUMP (tmp))
{
int slant = FONT_SLANT_NUMERIC (font_spec);
logfont->lfItalic = slant > 150 ? 1 : 0;
@@ -2036,9 +2111,9 @@ fill_in_logfont (struct frame *f, LOGFONT *logfont, Lisp_Object font_spec)
/* Set pitch based on the spacing property. */
tmp = AREF (font_spec, FONT_SPACING_INDEX);
- if (INTEGERP (tmp))
+ if (FIXNUMP (tmp))
{
- int spacing = XINT (tmp);
+ int spacing = XFIXNUM (tmp);
if (spacing < FONT_SPACING_MONO)
logfont->lfPitchAndFamily
= (logfont->lfPitchAndFamily & 0xF0) | VARIABLE_PITCH;
@@ -2199,8 +2274,9 @@ font_supported_scripts (FONTSIGNATURE * sig)
|| (subranges[2] & (mask2)) || (subranges[3] & (mask3))) \
supported = Fcons ((sym), supported)
- SUBRANGE (0, Qlatin);
- /* 1: Latin-1 supplement, 2: Latin Extended A, 3: Latin Extended B. */
+ /* 0: ASCII (a.k.a. "Basic Latin"),
+ 1: Latin-1 supplement, 2: Latin Extended A, 3: Latin Extended B,
+ 29: Latin Extended Additional. */
/* Most fonts that support Latin will have good coverage of the
Extended blocks, so in practice marking them below is not really
needed, or useful: if a font claims support for, say, Latin
@@ -2209,12 +2285,11 @@ font_supported_scripts (FONTSIGNATURE * sig)
fontset to display those few characters. But we mark these
subranges here anyway, for the marginal use cases where they
might make a difference. */
- SUBRANGE (1, Qlatin);
- SUBRANGE (2, Qlatin);
- SUBRANGE (3, Qlatin);
+ MASK_ANY (0x2000000F, 0, 0, 0, Qlatin);
SUBRANGE (4, Qphonetic);
/* 5: Spacing and tone modifiers, 6: Combining Diacritical Marks. */
- SUBRANGE (7, Qgreek);
+ /* 7: Greek and Coptic, 30: Greek Extended. */
+ MASK_ANY (0x40000080, 0, 0, 0, Qgreek);
SUBRANGE (8, Qcoptic);
SUBRANGE (9, Qcyrillic);
SUBRANGE (10, Qarmenian);
@@ -2231,7 +2306,7 @@ font_supported_scripts (FONTSIGNATURE * sig)
SUBRANGE (16, Qbengali);
SUBRANGE (17, Qgurmukhi);
SUBRANGE (18, Qgujarati);
- SUBRANGE (19, Qoriya);
+ SUBRANGE (19, Qoriya); /* a.k.a. "Odia" */
SUBRANGE (20, Qtamil);
SUBRANGE (21, Qtelugu);
SUBRANGE (22, Qkannada);
@@ -2244,8 +2319,7 @@ font_supported_scripts (FONTSIGNATURE * sig)
/* 29: Latin Extended, 30: Greek Extended -- covered above. */
/* 31: Supplemental Punctuation -- most probably be masked by
Courier New, so fontset customization is needed. */
- SUBRANGE (31, Qsymbol);
- /* 32-47: Symbols (defined below). */
+ /* 31-47: Symbols (defined below). */
SUBRANGE (48, Qcjk_misc);
/* Match either 49: katakana or 50: hiragana for kana. */
MASK_ANY (0, 0x00060000, 0, 0, Qkana);
@@ -2271,7 +2345,7 @@ font_supported_scripts (FONTSIGNATURE * sig)
SUBRANGE (71, Qsyriac);
SUBRANGE (72, Qthaana);
SUBRANGE (73, Qsinhala);
- SUBRANGE (74, Qmyanmar);
+ SUBRANGE (74, Qburmese); /* a.k.a. "Myanmar" */
SUBRANGE (75, Qethiopic);
SUBRANGE (76, Qcherokee);
SUBRANGE (77, Qcanadian_aboriginal);
@@ -2314,6 +2388,7 @@ font_supported_scripts (FONTSIGNATURE * sig)
SUBRANGE (99, Qhan);
SUBRANGE (100, Qsyloti_nagri);
SUBRANGE (101, Qlinear_b);
+ SUBRANGE (101, Qaegean_number);
SUBRANGE (102, Qancient_greek_number);
SUBRANGE (103, Qugaritic);
SUBRANGE (104, Qold_persian);
@@ -2342,9 +2417,52 @@ font_supported_scripts (FONTSIGNATURE * sig)
/* There isn't really a main symbol range, so include symbol if any
relevant range is set. */
- MASK_ANY (0x8000000, 0x0000FFFF, 0, 0, Qsymbol);
-
- /* Missing: Tai Viet (U+AA80-U+AADF). */
+ MASK_ANY (0x80000000, 0x0000FFFF, 0, 0, Qsymbol);
+
+ /* Missing:
+ Tai Viet
+ Old Permic
+ Palmyrene
+ Nabatean
+ Manichean
+ Hanifi Rohingya
+ Sogdian
+ Elymaic
+ Mahajani
+ Khojki
+ Khudawadi
+ Grantha
+ Newa
+ Tirhuta
+ Siddham
+ Modi
+ Takri
+ Dogra
+ Warang Citi
+ Nandinagari
+ Zanabazar Square
+ Soyombo
+ Pau Cin Hau
+ Bhaiksuki
+ Marchen
+ Masaram Gondi
+ Makasar
+ Egyptian
+ Mro
+ Bassa-Vah
+ Pahawh Hmong
+ Medefaidrin
+ Tangut
+ Tangut Components
+ Nushu
+ Duployan Shorthand
+ Ancient Greek Musical Notation
+ Nyiakeng Puachue Hmong
+ Wancho
+ Mende Kikakui
+ Adlam
+ Indic Siyaq Number
+ Ottoman Siyaq Number. */
#undef SUBRANGE
#undef MASK_ANY
@@ -2555,7 +2673,7 @@ in the font selection dialog. */)
ReleaseDC (FRAME_W32_WINDOW (f), hdc);
{
- int count = SPECPDL_INDEX ();
+ specpdl_ref count = SPECPDL_INDEX ();
Lisp_Object value = Qnil;
w32_dialog_in_progress (Qt);
@@ -2623,11 +2741,15 @@ struct font_driver w32font_driver =
/* Initialize state that does not change between invocations. This is only
called when Emacs is dumped. */
+
+static void syms_of_w32font_for_pdumper (void);
+
void
syms_of_w32font (void)
{
DEFSYM (Qgdi, "gdi");
DEFSYM (Quniscribe, "uniscribe");
+ DEFSYM (Qharfbuzz, "harfbuzz");
DEFSYM (QCformat, ":format");
/* Generic font families. */
@@ -2679,7 +2801,7 @@ syms_of_w32font (void)
DEFSYM (Qthai, "thai");
DEFSYM (Qlao, "lao");
DEFSYM (Qtibetan, "tibetan");
- DEFSYM (Qmyanmar, "myanmar");
+ DEFSYM (Qburmese, "burmese");
DEFSYM (Qgeorgian, "georgian");
DEFSYM (Qhangul, "hangul");
DEFSYM (Qethiopic, "ethiopic");
@@ -2725,17 +2847,18 @@ syms_of_w32font (void)
DEFSYM (Qhanunoo, "hanunoo");
DEFSYM (Qkharoshthi, "kharoshthi");
DEFSYM (Qlimbu, "limbu");
- DEFSYM (Qlinear_b, "linear_b");
- DEFSYM (Qold_italic, "old_italic");
- DEFSYM (Qold_persian, "old_persian");
+ DEFSYM (Qlinear_b, "linear-b");
+ DEFSYM (Qaegean_number, "aegean-number");
+ DEFSYM (Qold_italic, "old-italic");
+ DEFSYM (Qold_persian, "old-persian");
DEFSYM (Qosmanya, "osmanya");
DEFSYM (Qphags_pa, "phags-pa");
DEFSYM (Qphoenician, "phoenician");
DEFSYM (Qshavian, "shavian");
- DEFSYM (Qsyloti_nagri, "syloti_nagri");
+ DEFSYM (Qsyloti_nagri, "syloti-nagri");
DEFSYM (Qtagalog, "tagalog");
DEFSYM (Qtagbanwa, "tagbanwa");
- DEFSYM (Qtai_le, "tai_le");
+ DEFSYM (Qtai_le, "tai-le");
DEFSYM (Qtifinagh, "tifinagh");
DEFSYM (Qugaritic, "ugaritic");
DEFSYM (Qlycian, "lycian");
@@ -2799,9 +2922,16 @@ versions of Windows) characters. */);
DEFSYM (Qw32_charset_vietnamese, "w32-charset-vietnamese");
DEFSYM (Qw32_charset_thai, "w32-charset-thai");
DEFSYM (Qw32_charset_mac, "w32-charset-mac");
+ DEFSYM (Qw32_non_USB_fonts, "w32-non-USB-fonts");
defsubr (&Sx_select_font);
+ pdumper_do_now_and_after_load (syms_of_w32font_for_pdumper);
+}
+
+static void
+syms_of_w32font_for_pdumper (void)
+{
register_font_driver (&w32font_driver, NULL);
}