[cairo] cairo pango font hinting

Gerdus van Zyl gerdusvanzyl at gmail.com
Tue Jan 8 03:00:38 PST 2008


How does setting font options in cairo effect pango rendering? The
below snippet does not influence rendering as expected.
This is in python and using the binaries from Tor Lillqvist's web page
(http://www.gimp.org/~tml/gimp/win32/downloads.html) - pango-1.18.3

fo = cairo.FontOptions()
fo.set_hint_metrics(cairo.HINT_METRICS_ON)
fo.set_hint_style(cairo.HINT_STYLE_FULL)
fo.set_antialias(cairo.ANTIALIAS_NONE)
ctx.set_font_options(fo)

cr = pangocairo.CairoContext(ctx)

The problem I have is that with font "Arial" and sizes below 11 the
number 1 is very hard to see.  See the attached screenshot. It is the
only character I know of that has the problem.
Switching to another font (eg.Tahoma) is possible but if there is an
easy fix for the problem that would be good since Arial is very
prevalent on Windows

Thanks,
Gerdus van Zyl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: one.png
Type: image/png
Size: 6262 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20080108/2892c3b7/attachment.png 


More information about the cairo mailing list