Mercurial > hg > xemacs-beta
diff src/objects-msw.c @ 4579:68f74b080e94
Accept msprinter and mswindows, mswindows_font_spec_matches_charset_stage_2
src/ChangeLog addition:
2009-01-10 Aidan Kehoe <kehoea@parhasard.net>
* objects-msw.c (mswindows_font_spec_matches_charset_stage_2):
Accept msprinter as well as mswindows devices here.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 18 Jan 2009 12:41:58 +0000 |
parents | 4143b78d0df0 |
children | 8b63e21b0436 |
line wrap: on
line diff
--- 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,