[gs-code-review] Bug 689014, New glyphs in Helvetica-Bold

Leonardo leonardo at artifex.com
Mon Aug 6 14:53:47 PDT 2007


I added a comment to the bug.


----- Original Message ----- 
From: "Alex Cherepanov" <alexcher at quadnet.net>
To: <gs-code-review at ghostscript.com>
Sent: Wednesday, July 11, 2007 4:20 PM
Subject: [gs-code-review] Bug 689014, New glyphs in Helvetica-Bold


> The 2nd sample file in the bug 689014 uses non-embedded Helvetica-Bold
> font and /odblacute glyph. This glyph name doesn't exist in our fonts.
>
> The patch tries to look up alternative glyph names during the glyph
> name resolution.
>
> There's an another approach - add the glyph aliases during the font
> construction. The former has lower run time costs the latter appears
> to be safer when the font is embedded in PDF. What approach
> is better ?
>
> /postalias table should be undefined from systemdict but it is now
> shared between 2 files. What is a good way to do this ?
>


--------------------------------------------------------------------------------


> Index: gs/lib/gs_ttf.ps
> ===================================================================
> --- gs/lib/gs_ttf.ps (revision 8018)
> +++ gs/lib/gs_ttf.ps (working copy)
> @@ -1423,7 +1423,7 @@
>   TTFDEBUG { (Encoding: ) print dup === flush } if
> } bind def
>
> -currentdict /postalias undef
> +% currentdict /postalias undef
>
> % -mark- <key> <value> ... .definettfont <font>
> /.definettfont {
> Index: gs/lib/gs_type1.ps
> ===================================================================
> --- gs/lib/gs_type1.ps (revision 8018)
> +++ gs/lib/gs_type1.ps (working copy)
> @@ -113,6 +113,7 @@
> % undefine a dict that is only used internally, and is immediately bound
> currentdict /closesourcedict .undef
>
> +
> % Here are the BuildChar and BuildGlyph implementation for Type 1 fonts.
> % The names %Type1BuildChar and %Type1BuildGlyph are known to the 
> interpreter.
> % The real work is done in an operator:
> @@ -128,16 +129,25 @@
> /.type1build { % <font> <code|name> <name> .type1build
>  %   <font> <code|name> <name> <charstring>
>   2 index begin
> -    dup CharStrings exch .knownget not {
> -      2 copy eq { exch pop /.notdef exch } if
> -       QUIET not
> - { (Substituting .notdef for ) print
> -   =string cvs print ( in the font ) print
> -   1 index /FontName get = flush
> - }
> - { pop }
> -       ifelse
> -       /.notdef CharStrings /.notdef get
> +    dup CharStrings exch .knownget not
> +    {                                       % <<>> code name
> +      dup postalias exch .knownget {        % <<>> code name name'
> +        CharStrings exch .knownget not      % <<>> code name {proc}
> +      } {
> +        (not found)==
> +        //true
> +      } ifelse
> +      {
> +        2 copy eq { exch pop /.notdef exch } if
> +         QUIET not
> +   { (Substituting .notdef for ) print
> +     =string cvs print ( in the font ) print
> +      1 index /FontName get = flush
> +   }
> +   { pop }
> +         ifelse
> +         /.notdef CharStrings /.notdef get
> +      } if
>     } if
>   end
> } bind def
>


--------------------------------------------------------------------------------


> _______________________________________________
> gs-code-review mailing list
> gs-code-review at ghostscript.com
> http://www.ghostscript.com/mailman/listinfo/gs-code-review
> 



More information about the gs-code-review mailing list