Commit 922121e7 authored by Eli Zaretskii's avatar Eli Zaretskii

Fix the handling of font backend supersedence on MS-Windows

* src/w32font.c (syms_of_w32font): Don't make the Uniscribe
font backend "superceded" here, ...
* src/w32uniscribe.c (syms_of_w32uniscribe_for_pdumper):
... make it "superceded" here, only if the HarfBuzz DLL was
successfully loaded.  This is because Emacs compiled with
HarfBuzz support might run on a system without the DLL.
* src/w32fns.c (Fx_create_frame, w32_create_tip_frame):
Register the HarfBuzz font backend only if it is available.
parent 4956e761
Pipeline #2151 failed with stage
in 52 minutes and 22 seconds
......@@ -5845,7 +5845,8 @@ DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame,
}
#ifdef HAVE_HARFBUZZ
register_font_driver (&harfbuzz_font_driver, f);
if (harfbuzz_available)
register_font_driver (&harfbuzz_font_driver, f);
#endif
register_font_driver (&uniscribe_font_driver, f);
register_font_driver (&w32font_driver, f);
......@@ -6900,7 +6901,8 @@ w32_create_tip_frame (struct w32_display_info *dpyinfo, Lisp_Object parms)
}
#ifdef HAVE_HARFBUZZ
register_font_driver (&harfbuzz_font_driver, f);
if (harfbuzz_available)
register_font_driver (&harfbuzz_font_driver, f);
#endif
register_font_driver (&uniscribe_font_driver, f);
register_font_driver (&w32font_driver, f);
......
......@@ -2821,8 +2821,6 @@ versions of Windows) characters. */);
defsubr (&Sx_select_font);
Fput (Quniscribe, Qfont_driver_superseded_by, Qharfbuzz);
pdumper_do_now_and_after_load (syms_of_w32font_for_pdumper);
}
......
......@@ -1533,6 +1533,7 @@ syms_of_w32uniscribe_for_pdumper (void)
if (!load_harfbuzz_funcs (harfbuzz))
return;
Fput (Quniscribe, Qfont_driver_superseded_by, Qharfbuzz);
harfbuzz_available = 1;
harfbuzz_font_driver = uniscribe_font_driver;
harfbuzz_font_driver.type = Qharfbuzz;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment