使用pango更改字体渲染(非抗锯齿) [英] Change font rendering (non-antialiased) with pango

查看:353
本文介绍了使用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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆