diff options
Diffstat (limited to 'src/w32uniscribe.c')
-rw-r--r-- | src/w32uniscribe.c | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c index 28050d6ac76..72b524f2eab 100644 --- a/src/w32uniscribe.c +++ b/src/w32uniscribe.c @@ -36,6 +36,8 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ #include "composite.h" #include "font.h" #include "w32font.h" +#include "pdumper.h" +#include "w32common.h" struct uniscribe_font_info { @@ -466,21 +468,21 @@ uniscribe_shape (Lisp_Object lgstring) the direction, the Hebrew point HOLAM is drawn above the right edge of the base consonant, instead of above the left edge. */ - ASET (vec, 0, make_number (-offsets[j].du + ASET (vec, 0, make_fixnum (-offsets[j].du + adj_offset)); /* Update the adjustment value for the width advance of the glyph we just emitted. */ adj_offset -= 2 * advances[j]; } else - ASET (vec, 0, make_number (offsets[j].du + adj_offset)); + ASET (vec, 0, make_fixnum (offsets[j].du + adj_offset)); /* In the font definition coordinate system, the Y coordinate points up, while in our screen coordinates Y grows downwards. So we need to reverse the sign of Y-OFFSET here. */ - ASET (vec, 1, make_number (-offsets[j].dv)); + ASET (vec, 1, make_fixnum (-offsets[j].dv)); /* Based on what ftfont.c does... */ - ASET (vec, 2, make_number (advances[j])); + ASET (vec, 2, make_fixnum (advances[j])); LGLYPH_SET_ADJUSTMENT (lglyph, vec); } else @@ -508,7 +510,7 @@ uniscribe_shape (Lisp_Object lgstring) if (NILP (lgstring)) return Qnil; else - return make_number (done_glyphs); + return make_fixnum (done_glyphs); } /* Uniscribe implementation of encode_char for font backend. @@ -885,7 +887,7 @@ uniscribe_check_otf (LOGFONT *font, Lisp_Object otf_spec) int i, retval = 0; /* Check the spec is in the right format. */ - if (!CONSP (otf_spec) || XINT (Flength (otf_spec)) < 3) + if (!CONSP (otf_spec) || XFIXNUM (Flength (otf_spec)) < 3) return 0; /* Break otf_spec into its components. */ @@ -1181,9 +1183,17 @@ struct font_driver uniscribe_font_driver = as it needs to test for the existence of the Uniscribe library. */ void syms_of_w32uniscribe (void); +static void syms_of_w32uniscribe_for_pdumper (void); + void syms_of_w32uniscribe (void) { + pdumper_do_now_and_after_load (syms_of_w32uniscribe_for_pdumper); +} + +static void +syms_of_w32uniscribe_for_pdumper (void) +{ HMODULE uniscribe; /* Don't init uniscribe when dumping */ @@ -1200,11 +1210,11 @@ syms_of_w32uniscribe (void) register_font_driver (&uniscribe_font_driver, NULL); script_get_font_scripts_fn = (ScriptGetFontScriptTags_Proc) - GetProcAddress (uniscribe, "ScriptGetFontScriptTags"); + get_proc_addr (uniscribe, "ScriptGetFontScriptTags"); script_get_font_languages_fn = (ScriptGetFontLanguageTags_Proc) - GetProcAddress (uniscribe, "ScriptGetFontLanguageTags"); + get_proc_addr (uniscribe, "ScriptGetFontLanguageTags"); script_get_font_features_fn = (ScriptGetFontFeatureTags_Proc) - GetProcAddress (uniscribe, "ScriptGetFontFeatureTags"); + get_proc_addr (uniscribe, "ScriptGetFontFeatureTags"); if (script_get_font_scripts_fn && script_get_font_languages_fn && script_get_font_features_fn) |