freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Devel] Half-width ASCII in monospace CJK fonts


From: Anthony Fok
Subject: Re: [Devel] Half-width ASCII in monospace CJK fonts
Date: Sun, 10 Nov 2002 03:42:24 +0800
User-agent: Mutt/1.4i

Hello David,

On Fri, Nov 08, 2002 at 11:15:23PM +0100, David Turner wrote:
> [...]
> Fact is that this gave surprising results, mostly because many of the
> popular mono-spaced fonts available have glyphs with advances that do
> *not* correspond to the global advance width.
> [...]
> In short, we simply _cannot_  "trust" the font's content. Amusing, isn't 
> it :-)

Thank you very much for your detailed explanation.  I thought we could trust
the fonts.  Guess not!  :-)

> I tend to believe that this is the problem of the text layout engine, not
> of FreeType itself. One can analyze the charmaps provided to detect most
> half-width and full-width forms. There is still the case of ambiguous
> characters that cannot be explicited without additional context that only
> the layout layer knows about anyway.
> 
> Of course, let me know if you have a good argument that would prove that
> adding such support within the engine would be better.

I'll have to think more about that one.  I first thought about doing it in
the FreeType engine because "ftview" shows the same behaviour ("A B C D E "
vs "ABCDE").  Anyhow, adding half-width/full-width data to FreeType would
probably increase its size by some 50 - 100 KB, and bloating is not good.

> However, I have no idea for the moment of any "smarter" algorithm (maybe
> one that looks at other tables in the file, but which ones precisely).
> Keep in mind that any alternative solution should work on the *vast*
> majority of available fonts today.
> 
> Until we find this "better" way, I won't change the engine's behaviour...
> 
> Sorry,
> 
> - David Turner
> - The FreeType Project  (www.freetype.org)

That's quite alright, and I am grateful that you took the time to clear up
my confusion.  If reversing the default would break things for most users,
let's not touch it then.

As for halfwidth/fullwidth global advance, perhaps adding some 50 KB of
bloat isn't the best solution.  I just read Ha Shao's post too, and I like
his idea a lot.  I guess what we'll do next is to do more testing on as many
existing fonts as we can, and perhaps a simple heuristic algorithm that
compares the ratio of glyph advance to global advance would do the trick. 
(Now, I'm curious what heuristics Microsoft Windows use.  :-)

We'll get back to you when we get some statistics.  :-)  Also, thanks for
your new ftcheckfixedwidth tool.  It's very helpful indeed.

Best regards,

Anthony

-- 
Anthony Fok Tung-Ling
ThizLinux Laboratory   <address@hidden> http://www.thizlinux.com/
Debian Chinese Project <address@hidden>       http://www.debian.org/intl/zh/
Come visit Our Lady of Victory Camp!           http://www.olvc.ab.ca/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]