# HG changeset patch # User Aidan Kehoe # Date 1232282518 0 # Node ID 68f74b080e9421c23fc2b7d36809d46a1ff02a40 # Parent 49e17f7182f51df9b27d02a74b5433b1654aa3a1 Accept msprinter and mswindows, mswindows_font_spec_matches_charset_stage_2 src/ChangeLog addition: 2009-01-10 Aidan Kehoe * objects-msw.c (mswindows_font_spec_matches_charset_stage_2): Accept msprinter as well as mswindows devices here. diff -r 49e17f7182f5 -r 68f74b080e94 src/ChangeLog --- a/src/ChangeLog Sun Jan 18 12:14:19 2009 +0200 +++ b/src/ChangeLog Sun Jan 18 12:41:58 2009 +0000 @@ -1,3 +1,8 @@ +2009-01-10 Aidan Kehoe + + * objects-msw.c (mswindows_font_spec_matches_charset_stage_2): + Accept msprinter as well as mswindows devices here. + 2008-12-30 Aidan Kehoe * device-x.c (Fx_get_font_path): diff -r 49e17f7182f5 -r 68f74b080e94 src/objects-msw.c --- a/src/objects-msw.c Sun Jan 18 12:14:19 2009 +0200 +++ b/src/objects-msw.c Sun Jan 18 12:41:58 2009 +0000 @@ -2064,8 +2064,21 @@ else { HDC hdc = CreateCompatibleDC (NULL); - Lisp_Object font_list = DEVICE_MSWINDOWS_FONTLIST (d); - Lisp_Object truename; + Lisp_Object font_list = Qnil, truename; + + if (DEVICE_TYPE_P (d, mswindows)) + { + font_list = DEVICE_MSWINDOWS_FONTLIST (d); + } + else if (DEVICE_TYPE_P (d, msprinter)) + { + font_list = DEVICE_MSPRINTER_FONTLIST (d); + } + else + { + assert(0); + } + HFONT hfont = create_hfont_from_font_spec (the_nonreloc, hdc, Qnil, font_list, ERROR_ME_DEBUG_WARN,