bugThe FreeType Project - Bugs: bug #12725, font matrix in CID CFF subfont

 
 

bug #12725: font matrix in CID CFF subfont

Submitted by:  Derek Noonburg <derekn>
Submitted on:  Mon 18 Apr 2005 10:41:04 PM UTC  
 
Severity: 3 - NormalItem Group: Incorrect behaviour
Status: FixedPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: 2.1.10

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Tue 19 Apr 2005 06:26:13 PM UTC, comment #2:

The CVS version works correctly. Thanks for the fix.

Regarding item 3 -- I don't have a test font for it. It's really just speculation, based on experimenting with similar PostScript fonts (Type 0 non-CID and Type 0 CIDFont both seem to work that way). The PostScript reference says:

"FontMatrix plays the same role in a Type 0 font as it does in a base font. When a glyph is shown, both the font matrix of the Type 0 font and the font matrix of the descendant base font or CIDFont are concatenated to the CTM."

The CFF spec doesn't say much, so I'm guessing that it behaves the same way.

Derek Noonburg <derekn>
Tue 19 Apr 2005 05:08:33 AM UTC, comment #1:

Incidentally, I've fixed this yesterday in the CVS!
Please test.

The only thing I'm unsure is your item 3. Can you provide
a test font which does that?

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Mon 18 Apr 2005 10:41:04 PM UTC, original submission:

A subfont within a CID CFF font can have its own font matrix. I believe FreeType 2.1.9 ignores the subfont matrix.

This isn't clear from the CFF spec, but as best as I can tell (based on Acrobat's behavior with CID CFF fonts embedded in PDF files), the correct behavior looks like this:

1. If the main font dict specifies a font matrix and the subfont doesn't, use the main font's matrix.

2. If the main font dict does not specify a font matrix and the subfont does, use the subfont's matrix.

3. If both dictionaries specify matrices, use the product of the two matrices.

4. If neither dictionary has a font matrix, use the default value of [0.001 0 0 0.001 0 0].

Note that you can't simply default the main font matrix to [0.001 0 0 0.001 0 0] and the subfont matrix to [1 0 0 1 0 0] and then use the product of the two matrices. If the subfont has a matrix and the main dict does not, then the main font matrix effectively defaults to [1 0 0 1 0 0].

I'm attaching a sample font (extracted from a PDF file). I can provide the PDF file if desired.

Derek Noonburg <derekn>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #2862:  font1.cff added by derekn (3KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

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 5 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Fri 18 Nov 2005 07:30:43 AM UTCwlOpen/ClosedOpen=>Closed
Fri 18 Nov 2005 07:30:08 AM UTCwlStatusNone=>Fixed
Tue 19 Apr 2005 05:08:33 AM UTCwlAssigned toNone=>wl
  Planned ReleaseNone=>2.1.10
Mon 18 Apr 2005 10:41:04 PM UTCdereknAttached File-=>Added font1.cff, #2412

Back to the top


Powered by Savane 3.1-cleanup1