freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] [patch] TrueType GX/AAT validator


From: George Williams
Subject: Re: [ft-devel] [patch] TrueType GX/AAT validator
Date: 22 Aug 2005 22:04:00 -0700

On Mon, 2005-08-22 at 18:29, address@hidden wrote:
>       - state transition diagram uses undefined glyph ID
A note of caution here, the apple world makes use of undefined glyph IDs
as temporary state flags. One state machine will test for a condition
and apply a substitution which creates an invalid GID, then another
state machine will detect the bad GID, change it to something valid and
enter a new state where it does other substitutions.
   Example font: Zapfino 4.1d6

This is useful on the mac because only two substitutions can be made
once a pattern has been matched.
        Suppose one wants to change
                "abcd" => "efgh"
        changing nothing until the "d" was read. This can't be done with
        a single state machine, but one way to do it would be to create
        two state machines, one which matches "abcd" and upon the match
        changes the "a" to GID65534, and a second which enters a magic
        state when it gets GID65534 which it changes to "e", changes
        "b"->"f", and so forth.

A long winded explanation to say that out of bounds GIDs are not always
undesirable -- as long as a later substitution will prevent them from
reaching the output string.

(I've been wrestling with this in fontforge for a while, trying to
figure out what Zapfino was up to -- I think that's the gist of it)





reply via email to

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