I am cleaning up the redisplay code to implement printing in Windows.
This patch uses system-provided underline and strike out fonts.
Struck out and underlined fonts are now supported on widgets, for no
reason, because nobody wants them to look like that anyway! :)
The idea is that each font instance has up to four HFONTs associated
with it, called variants, for all under/struck combinations. Only one
is created initially, with the rest being created and cached in
instance data as they are needed, during redisplay.
This patch accumulates Windows specific changes, winsys-independent
part is under way.
An RFC. There are now 2 ways to create an underlined face. One is to
specify font modifier 'underline', like "Courier
New:Regular:9:underline".
The other way is to create a non-underlined font, and set underline-p
property of the *face* to t. These faces won't be the same. Even worse,
the first face line height will be 1 greater than the second!
(Although, with 10pt size, they are same. Thanks Bill!).
Should the modifiers 'underline' and 'strikethru' go away from the
fonts?
Big K
2000-01-17 Kirill 'Big K' Katsnelson <kkm(a)dtmx.com>
* faces.h (FACE_STRIKETHRU_P): Added.
* glyphs-msw.c (mswindows_widget_hfont): Implemented, to take care
of font variants.
* redisplay-msw.c (mswindows_apply_face_effects): Deleted.
(mswindows_set_dc_font): New function, aware of font variants,
separated from mswindows_update_dc.
* objects-msw.h (struct mswindows_font_instance_data): Added
definition.
* objects-msw.c (mswindows_finalize_font_instance): Delete all
cached fonts and the data structure.
(mswindows_initialize_font_instance): Added creation of font data
structure.
(mswindows_print_font_instance): Print at least something.
(mswindows_create_font_variant): Implemented.
(mswindows_get_hfont): Implemented.