[gs-devel] (Long) Revised thinking about pdf_font_t and
L. Peter Deutsch
ghost at aladdin.com
Fri Apr 12 12:24:41 PDT 2002
> caches the FontObject in the FontDescriptor ...
> These caused me to revise the patch (still in work) to also cache the
> /Widths and the /Encoding in order to allow comparison before using the
> cached FontObject.
I think there is a better way to organize this.
What should be cached with the FontDescriptor is the *unmodified* font --
that is, the font exactly as read in from the FontFile, without modification
by Widths or Encoding.
What should be cached with the font resource object is the *modified* font.
This is simply an implementation of the general principle that "anything
cached with object X should be derived (computed) only from information in
object X and immutable objects that it references". In the case of the
FontDescriptor, the cached PS font should not be modified by Widths or
Encoding, because those are stored with the font resource, not the
L. Peter Deutsch | Aladdin Enterprises | 203 Santa Margarita Ave.
ghost at aladdin.com | http://www.aladdin.com | Menlo Park, CA 94025
No government censorship of software! Oppose the CBDTPA! www.eff.org
More information about the gs-devel