bugThe FreeType Project - Bugs: bug #27503, CFF font_matrix is not always...

 
 

bug #27503: CFF font_matrix is not always applied to outline.

Submitted by:  bram tassyns <bramt>
Submitted on:  Wed 23 Sep 2009 07:01:35 AM UTC  
 
Severity: 3 - NormalItem Group: Incorrect behaviour
Status: FixedPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: 2.3.10

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 24 Sep 2009 02:17:39 PM UTC, comment #3:

The current git version should be the `right' one: The PostScript stack now correctly uses 16.16 values instead of integers.

Suzuki-san is working on the compiler warning stuff (in particular, FreeType currently doesn't compile with a C++ compiler).

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Thu 24 Sep 2009 11:14:25 AM UTC, comment #2:

downloaded and integrated the latest version,
this seems to work fine.

Just a few comments:
- there seem to be some rounding differences when comparing
the results against 2.3.9 (most errors are below 1,
but for a MMType1 there's a difference of 2). Any idea
to which changes this is related?
- compiler warning:
In file included from FontLayer/../FreeType/src/cache/ftcache.c:25:
FontLayer/../FreeType/src/cache/ftccmap.c: In function 'FTC_CMapCache_Lookup':
FontLayer/../FreeType/src/cache/ftccmap.c:373: warning: assignment from incompatible pointer type
In file included from FontLayer/../FreeType/src/cache/ftcache.c:29:
FontLayer/../FreeType/src/cache/ftcbasic.c: In function 'FTC_ImageCache_Lookup':
FontLayer/../FreeType/src/cache/ftcbasic.c:374: warning: assignment from incompatible pointer type
FontLayer/../FreeType/src/cache/ftcbasic.c: In function 'FTC_ImageCache_LookupScaler':
FontLayer/../FreeType/src/cache/ftcbasic.c:442: warning: assignment from incompatible pointer type
FontLayer/../FreeType/src/cache/ftcbasic.c: In function 'FTC_SBitCache_Lookup':
FontLayer/../FreeType/src/cache/ftcbasic.c:711: warning: assignment from incompatible pointer type
C gxvalid.c
FontLayer/../FreeType/src/cache/ftcbasic.c: In function 'FTC_SBitCache_LookupScaler':
FontLayer/../FreeType/src/cache/ftcbasic.c:780: warning: assignment from incompatible pointer type

bram tassyns <bramt>
Wed 23 Sep 2009 07:16:36 AM UTC, comment #1:

This has already been fixed in the git repository on 2009-Aug-25. Please test.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Wed 23 Sep 2009 07:01:35 AM UTC, original submission:

If the CFF font matrix only differs from identity in the xx component it is not applied to the outline.

The code says in a comment that xx is already normalized, but this doesn't seem the case. So either the comment is wrong or the normalization didn't happen for some reason. The patch below assumes the comment is wrong. I added the font (both in PDF and font stream alone) so you can test it.

cff.cffgload.c:2757

/* apply the font matrix -- `xx' has already been normalized */
if ( !( font_matrix.yy == 0x10000L &&
font_matrix.xy == 0 &&
font_matrix.yx == 0 ) )
FT_Outline_Transform( &glyph->root.outline, &font_matrix );

=>

if ( !( font_matrix.xx == 0x10000L &&
font_matrix.yy == 0x10000L &&
font_matrix.xy == 0 &&
font_matrix.yx == 0 ) )
FT_Outline_Transform( &glyph->root.outline, &font_matrix );

bram tassyns <bramt>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #18756:  Helvetica-Narrow.cff added by bramt (6KiB - application/octet-stream)
file #18755:  Helvetica-Narrow.pdf added by bramt (12KiB - application/pdf)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by wl (Posted a comment)
  • -unavailable- added by bramt (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 23 Sep 2009 07:16:36 AM UTCwlStatusNone=>Fixed
      Assigned toNone=>wl
      Open/ClosedOpen=>Closed
      Planned ReleaseNone=>2.3.10
    Wed 23 Sep 2009 07:01:35 AM UTCbramtAttached File-=>Added Helvetica-Narrow.pdf, #18755
      Attached File-=>Added Helvetica-Narrow.cff, #18756

    Back to the top


    Powered by Savane 3.1-cleanup1