freetype
[Top][All Lists]
Advanced

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

[Freetype] Ambiguously Undefined Glyphs [was: Mozilla needs some info on


From: Juliusz Chroboczek
Subject: [Freetype] Ambiguously Undefined Glyphs [was: Mozilla needs some info on Xft]
Date: 10 Aug 2001 08:43:00 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

[CC'd to FreeType.  Sorry if you see this more than once.]

Me:

JC> How do you distinguish between such an undefined character in a
JC> broken font, and a bona fide blank character such as space,
JC> em-quad or en-space?

Brian Stell:

BS> Excellent question. Since the list of spaces is small and does not
BS> seem to change frequently we have a subroutine that tests for the known 
BS> Unicode spaces.

But I had also written:

JC> (You're hopefully not treating all blank characters as undefined,
JC> which is clearly bogus, unless you have an exhaustive list of all
JC> characters in all languages that you plan to support that may,
JC> potentially, be blank in some potentially exotic font style.)

To quote myself, what you're doing is ``clearly bogus.''  See also
Antoine Leca's note on the FreeType list.

Anyway, back to your problem.  If these fonts work with Windows, there
must be something we don't understand (I'm sure Windows doesn't do
something that stupid), so there must be some way of disambiguating
these Ambiguously Undefined Glyphs (AUGs) from blank glyphs.

It is difficult to say without seeing a dump of the relevant parts of
the fonts, but I'll take a guess.  Assuming that the AUGs' cmap
entries point at valid loca entries, and that the loca entries point
at valid glyph data (you have checked that, haven't you?), I'd be
tempted to believe that they're trying to optimise the size of a type
4 cmap by having non-zero cmap entries that are aliased to the
undefined glyph through the loca table.

To make it clear, let n be the codepoint of an AUG.  In theory, you
ought to have

  cmap[n] = 0,

but under some circumstances that may break an otherwise regular type
4 cmap.  In order to avoid that, one might be tempted to set

  cmap[n] = k

for some k such that

  loca[k] = loca[0].

Could you check whether this is indeed the case?  If so, it should be
trivial to add this check to FreeType.

                                        Juliusz

P.S. I want Erik back!


reply via email to

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