Change font rendering (non-antialiased) with pango

会有一股神秘感。 提交于 2020-01-03 04:49:12

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!