[cairo] HUGE Pango-cairo fonts on Win32 (under wine)

Peter Clifton pcjc2 at cam.ac.uk
Sat Dec 29 20:58:18 PST 2007


Apologies Tor if you don't want to be CC'd directly. I thought you might
be interested, but if not, let me know, and I'll drop the CC in future.


How convoluted..

I'm trying to test a port of win32 applications under wine, and font
rendering is wrecked... (with GTK versions which use cairo /
pango-cairo).

The glyphs are being drawn at enormous sizes, near (about 100 times as
an order of magnitude guess).

The workaround I've got to alter this temporarily:

pangocairo-win32font.c-  }
pangocairo-win32font.c-
pangocairo-win32font.c-  if (!
pango_font_description_get_size_is_absolute (desc))
pangocairo-win32font.c:    size *= dpi / 72. / 100.;
pangocairo-win32font.c-
pangocairo-win32font.c-#ifdef USE_FACE_CACHED_FONTS
pangocairo-win32font.c-  win32fontmap = PANGO_WIN32_FONT_MAP
(cwfontmap);

pangowin32-fontmap.c-    }
pangowin32-fontmap.c-  g_slist_free (helper.list);
pangowin32-fontmap.c-
pangowin32-fontmap.c:  win32fontmap->resolution = (PANGO_SCALE /
(double) GetDeviceCaps (_pango_win32_hdc, LOGPIXELSY)) * 72.0 * 100;
pangowin32-fontmap.c-}
pangowin32-fontmap.c-
pangowin32-fontmap.c-static void


(Notice the * 100 and / 100 here which I added for a test).

I've not got easy access to a win32 box to test this on (let alone to
build code on), so am not really sure what to do next.

I've verified that my dpi is being returned about right from wine. (120
DPI).

Can anyone suggest what I'm doing wrong? I _assume_ it must work right
on Windows, as otherwise more people would have complained! Wine bug?
Wine vs. pango / cairo bug?

I've been testing with both gtk-demo, and pango-view from pango 1.18.13
(I hacked it back together to do a little testing.)


Best wishes,


Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)



More information about the cairo mailing list