使用pango更改字体渲染(非抗锯齿) [英] Change font rendering (non-antialiased) with pango
问题描述
如何使用自定义抗锯齿和提示设置使用pango渲染字符串?
How do I render a string with pango using custom antialiasing and hinting settings?
我尝试了PangoCairo.set_antialias(cairo.ANTIALIAS_NONE)
(在pygtk中),但是没有效果.我希望能够更改freetype的呈现参数,就像我可以通过fontconfig/fonts.conf
一样,但是要在运行时进行. (这是在Linux上.)有什么想法吗?
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?
推荐答案
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.
这篇关于使用pango更改字体渲染(非抗锯齿)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!