[cairo] Re: Drawing text with Windows bitmap fonts
Jan Slupski
jslupski at juljas.net
Wed Apr 4 10:21:30 PDT 2007
Another issue that got stucked with open question:
http://lists.freedesktop.org/archives/cairo/2007-January/009282.html
(...ignore WIN32_FONT_LOGICAL_SCALE disussion in between...)
http://lists.freedesktop.org/archives/cairo/2007-January/009293.html
Related bug: https://bugs.freedesktop.org/show_bug.cgi?id=9740
In short: there are Windows that fonts that are picked up by engine
but are not TrueType. Later on win32 font handling functions fail
because they are not-appropriate for non-TrueType fonts.
In effect text labels are not shown at all.
Myself I'm using following workaround to guarantee that win32 logic
picks only TrueType fonts:
diff -ruw test-old/src/cairo-win32-font.c test-new/src/cairo-win32-font.c
--- test-old/src/cairo-win32-font.c 2006-11-02 23:53:40.000000000 +0100
+++ test-new/src/cairo-win32-font.c 2007-01-23 03:55:15.000000000 +0100
@@ -359,6 +361,7 @@
logfont.lfEscapement = 0;
logfont.lfOrientation = 0;
logfont.lfQuality = scaled_font->quality;
+ logfont.lfOutPrecision = OUT_TT_ONLY_PRECIS;
scaled_font->scaled_hfont = CreateFontIndirectW (&logfont);
if (!scaled_font->scaled_hfont) {
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/fontext_4rw4.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/fontext_1wmq.asp
Thanks,
Jan
_ _ _ _ _____________________________________________
| |_| |\ | S L U P S K I jslupski at juljas.net
|_| | | | \| http://juljas.net/
More information about the cairo
mailing list