|
From: Bastian M. <bma...@we...> - 2011-03-30 19:08:46
|
Am 18.01.2011 15:29, schrieb Allin Cottrell: > On Mon, 17 Jan 2011, sfeam (Ethan Merritt) wrote: > >> On Monday, January 17, 2011, Allin Cottrell wrote: >>> On Mon, 17 Jan 2011, Allin Cottrell wrote: >>> >>>> On Tue, 18 Jan 2011, Mojca Miklavec wrote: >>>>> >>>>> My bet is that fc-cache runs in the background to regenerate font >>>>> index "every now and then", so that one can use any given font on the >>>>> system. >>> >>> (and this can take a looong time). >>> >>> I notice that in gnuplot's cp_cairo.c there's a comment (around >>> line 690) about "working around a bug in the cairo/win32 backend >>> for font rendering": the work-around involves gp_cairo on Windows >>> using the freetype + fontconfig backend by preference to the win32 >>> backend. Following Mojca's lead, this could explain the initial >>> long wait for gnuplot output. >>> >>> I'm wondering, is the cairo bug in question still there? >>> Unfortunately the comment is not specific (no bugzille ID). But if >>> the issue is fixed in current cairo it could be worth making a >>> change. Cairo's win32 backend doesn't have the problem of a long >>> wait on first use. >> >> Here's a link to the original thread reporting the problem >> in cairo's win32 backend: >> >> http://groups.google.com/group/comp.graphics.apps.gnuplot/browse_thread/thread/5742a3d915085f7b/d075063d7da423e9?hl=en&ie=UTF-8&oe=utf-8&q=missing+pixels+for+Windows+PNG+driver&pli=1 > > Thanks! I had a vague memory of that discussion but had forgotten > the details. There have been a fair number of commits in the > cairo-font-win32 area since then (14 months ago) so this is > probably worth revisiting. I'll try some testing with cairo 1.10.2 > on Windows. > > Allin Cottrell I have tried to reproduce the original bug report of the font problem in cairopng with pango 1.28.3 and cairo 1.10.2 on Windows. The result using current CVS (freetype + fontconfig) looks like this: http://www.physi.uni-heidelberg.de/~bmaerk/tmp/gretl_bug.png And here's the result using the win32 backend: http://www.physi.uni-heidelberg.de/~bmaerk/tmp/gretl_bug-win32.png Both versions look fine to me. Should we apply the revised test you proposed? > #if CAIRO_VERSION_MAJOR < 2 && CAIRO_VERSION_MINOR < 10 Or should we test for the pango version here? There's another reason why I would prefer that the cairo/pango terminals use the win32 backend: In my experience, these terminals (read: cairo/pango/fontconfig) fail to find a sensible default font ("Sans") on 4 out of 5 Windows machines. For me, it fails on three different XP machines and on a Win 7 (x64) machine. It only works on a Vista machine. This is the result of 'enhancedtext.dem' using the pngcairo terminal with no font specified: http://www.physi.uni-heidelberg.de/~bmaerk/tmp/fontconfig-bug.png Bastian |