防止TrueType字体的抗锯齿(或亚像素渲染) [英] Prevent anti-aliasing (or sub-pixel rendering) of a TrueType font

查看:366
本文介绍了防止TrueType字体的抗锯齿(或亚像素渲染)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用FontForge创建了这种仅矢量的TrueType字体. 我想在需要基于矢量的字形的应用程序上使用此字体,并且不支持加载.ttf嵌入式位图(似乎没有此问题).

I have created this vector-only TrueType font using FontForge. I want to use this font on applications which require vector-based glyphs, and do not support loading .ttf embedded bitmaps (which do not seem to have this problem).

在某些颜色方案下,Windows所做的此子像素渲染使字体完全不可读.大多数ttf字体都具有这种效果,但对像我这样具有像素完美边缘的字体来说,这种效果要强得多.

On certain color-schemes this sub-pixel rendering that Windows does makes the font completely unreadable. This effect is present in most ttf fonts, but is much stronger on fonts with pixel-perfect edges like mine.

有人知道任何可编程的提示技巧或字体设置,可以使字体完美地呈现像素,而不用这种红色/蓝色光晕吗?我希望该字体在不进行操作系统修改以禁用ClearType或类似功能的情况下也能正常工作.

Does anybody know any programmable hinting tricks or font-settings that will allow the font to render pixel-perfectly instead of with this red/blue halo? I would like the font to work properly without OS modifications to disable ClearType or similar.

为澄清起见,这是一个关于利用TrueType指令集或更改我可能忽略设置的TrueType字体设置(不是系统/应用程序设置)的问题正确地显示字体(如果可能的话).

To clarify, this is a question about leveraging the TrueType Instruction Set, or changing a TrueType font-setting (not a System/Application setting) that I have may have neglected to set properly, to make the font render legibly (if possible).

推荐答案

工作解决方案

贷方到 Brian Nixon 来发布解决方案URL,并转到 Erik Olofsson 来研究解决方案并将其发布到他的博客中.

Working Solution

Credit goes to Brian Nixon for posting the solution URL, and to Erik Olofsson for researching and posting the solution on his blog.

Erik Olofsson提供了一种解决方案,强制Windows字体API优先使用.ttf嵌入式位图进行渲染时优先使用字形.

Erik Olofsson provides a solution that forces Windows font API to prioritize .ttf embedded bitmaps to be used with priority over glyphs when rendering.

该解决方案可以在中找到详细信息. http://www.electronicdissonance.com/2010/01/raster-fonts-in-visual-studio-2010.html

  1. 将繁体中文"代码页添加到OS/2 Panpose表中.
  2. 使用"ISO 106046-1"(Unicode,UCS-2)编码.
  3. 为下列看似随机的平假名字符添加字形:
    • い-U + 3044
    • う-U + 3046
    • か-U + 304B
    • ひ-U + 3057
    • の-U + 306E
    • ん-U + 3093
  1. Add 'Traditional Chinese' code page to the OS/2 Panpose table.
  2. Use the 'ISO 106046-1' (Unicode, UCS-2) encoding.
  3. Include glyphs for the following seemingly random Hiragana characters:
    • い - U+3044
    • う - U+3046
    • か - U+304B
    • ひ - U+3057
    • の - U+306E
    • ん - U+3093

此列表不是一个玩笑

这篇关于防止TrueType字体的抗锯齿(或亚像素渲染)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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