[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH by default?
From: |
Behdad Esfahbod |
Subject: |
Re: [ft-devel] FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH by default? |
Date: |
Wed, 20 Apr 2011 14:53:56 -0400 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.15) Gecko/20110303 Lightning/1.0b2 Thunderbird/3.1.9 |
On 04/20/11 03:11, Werner LEMBERG wrote:
>> Every user of FreeType that I know has once in their lifetime hit
>> the bug that with many common CJK fonts, non-CJK characters take
>> doublewidth where they should take a single one. The fix always has
>> been to pass FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH to FreeType, as the
>> fonts have the bit set wrongly. A "monospace" CJK font is never
>> monospace. It has single-width glyphs, and double-width, hence
>> setting global-advance is wrong in the font.
>>
>> But since this is such a common issue, I wonder if FreeType should
>> simply ignore global advance by default. Cairo and fontconfig
>> always pass that flag to FreeType. I've seen this bug hit Qt
>> before. And most recently I watched it hit Skia.
>
> I've already pondered about this problem, but I've found no solution
> which guarantees backwards compatibility. Your idea of completely
> ignoring this flag didn't come to my mind :-)
>
> Since your suggestion sounds sensible, could you provide a patch?
Attached. You also need to update the ft2demos that use it to remove the
option (ftdiff, etc).
behdad
> Werner
ignore-global-advance.patch
Description: Text Data