问题
How do I render a string with pango using custom antialiasing and hinting settings?
I tried PangoCairo.set_antialias(cairo.ANTIALIAS_NONE)
(in pygtk), but it had no effect. I'd like to be able to change freetype's rendering parameters, like I can do via fontconfig/fonts.conf
, but at runtime. (This is on Linux.) Any ideas?
回答1:
Well, I'm not sure if understood you right, but I usually use cairo_set_antialias () in my C-code, though I don't know an equivalent in PyGTK. As far as I understand it's Cairos' rendering settings that you should change to change an anti-aliasing and hinting of an output. At least I do this way.
来源:https://stackoverflow.com/questions/16106659/change-font-rendering-non-antialiased-with-pango