[cairo-commit] Changes to 'cff2'

Adrian Johnson ajohnson at kemper.freedesktop.org
Tue Nov 30 03:33:38 PST 2010


New branch 'cff2' available with the following commits:
commit 6732dbf2992891be4b1f08b14a5c449fd08b637c
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Tue Nov 30 21:55:50 2010 +1030

    CFF Subsetting: Subset subroutines
    
    Go through each Charstring looking for the local and global
    subroutines called. To avoid modifying the Charstrings [1], the unused
    subroutines are reduced to a single byte return op [2] leaving the
    remaining subroutines in their original array index position.
    
    Results of testing with some CFF fonts with a 26 glyph [a-z] subset:
    
    Font                       Subset size: Before   After
    -------------------------------------------------------
    LinBiolinum_Re-0.6.4.otf                48,423    8,295
    LinBiolinum_It-0.5.1.otf                88,942   11,501
    LinBiolinum_Sl-0.4.9.otf                89,231   11,505
    LinLibertine_Re-4.7.5.otf               51,125    8,654
    LinLibetine_It-4.2.6.otf                59,333    9,632
    Inconsolata.otf                         13,826    8,407
    
    [1] Further reductions could be obtained by stripping out unused
    subroutines and renumbering the remaining subroutines but is more
    complicated due to the encoding used for subroutine numbers that is
    both variable length and a function of the size of the subroutine
    array.
    
    [2] Poppler and Fontforge do not seem to like zero length unused
    subroutines.



More information about the cairo-commit mailing list