bugThe FreeType Project - Bugs: bug #27988, family_name in pure cff fonts...

 
 

bug #27988: family_name in pure cff fonts should not contain the style_name

Submitted by:  bram tassyns <bramt>
Submitted on:  Tue 10 Nov 2009 09:02:50 AM UTC  
 
Severity: 3 - NormalItem Group: Incorrect behaviour
Status: FixedPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: 2.4.5

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Mon 07 Mar 2011 08:40:02 AM UTC, comment #5:

This is now in the git repository, thanks.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Tue 22 Feb 2011 09:27:56 AM UTC, comment #4:

My apologies.

bram tassyns <bramt>
Tue 22 Feb 2011 09:27:16 AM UTC, comment #3:

Uh, oh, this was a complete, non-free font from Adobe – I had to delete it from Savannah (but I've downloaded it for testing purposes). Subsetted stuff with just a few glyphs are OK, everything else must be free...

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Tue 22 Feb 2011 08:13:33 AM UTC, comment #2:

This issue was apparently overlooked because we already had the fix in our depot and it didn't cause integration issues. I attached a sample file which has a wrong value for family without the path (has AdobeHebrew-Italic, but should be AdobeHebrew, Italic is the (sub)family).

(file #22753)

bram tassyns <bramt>
Fri 09 Jul 2010 05:26:32 AM UTC, comment #1:

Somehow I've completely missed this issue...

Is this still of importance? Can you provide an example font which demonstrates the need of this change?

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Tue 10 Nov 2009 09:02:50 AM UTC, original submission:

Remove the style_name from the end of the family_name when generating the family_name from the fontname for pure cff fonts.

cffobjs.c, 763:

...
if ( !family && fullp )
{
/* The full name begins with the same characters as the */
/* family name, with spaces and dashes removed. In this */
/* case, the remaining string in `fullp' will be used as */
/* the style name. */
style_name = cff_strcpy( memory, fullp );
}
...
=>
...
if ( !family && fullp )
{
/* The full name begins with the same characters as the */
/* family name, with spaces and dashes removed. In this */
/* case, the remaining string in `fullp' will be used as */
/* the style name. */
style_name = cff_strcpy( memory, fullp );

/* remove the style part from the family name (if present) */
remove_style( cffface->family_name, style_name );
}

with:

/* remove the style part from the family name (if present) */
void
remove_style( FT_String* family_name,
const FT_String* style_name )
{
FT_Int index = 0;
FT_Int32 family_name_length, style_name_length;

family_name_length = strlen( family_name );
style_name_length = strlen( style_name );
if ( family_name_length > style_name_length )
{
for ( index = 1; index <= style_name_length; ++index )
{
if ( family_name[family_name_length-index] !=
style_name[style_name_length-index] )
{
break;
}
}

if ( index > style_name_length )
{
// family_name ends with style_name, remove it
index = family_name_length - style_name_length -1;

// also remove special characters between real family name and style
while ( index > 0
&& ( family_name[index] == '-'
|| family_name[index] == ' '
|| family_name[index] == '_'
|| family_name[index] == '+' ) )
{
--index;
}

if ( index > 0 )
{
family_name[index+1] = 0;
}
}
}
}
...

bram tassyns <bramt>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

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 cloos
  • -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 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 07 Mar 2011 08:40:02 AM UTCwlStatusNeed Info=>Fixed
      Open/ClosedOpen=>Closed
      Planned ReleaseNone=>2.4.5
    Tue 22 Feb 2011 09:25:28 AM UTCwlAttached File#22753=>Removed
    Tue 22 Feb 2011 08:13:33 AM UTCbramtAttached File-=>Added AdobeHebrew-Italic.cff, #22753
    Fri 09 Jul 2010 05:26:32 AM UTCwlStatusNone=>Need Info
      Assigned toNone=>wl
    Tue 02 Mar 2010 03:57:23 PM UTCcloosCarbon-Copy-=>Added cloos

    Back to the top


    Powered by Savane 3.1-cleanup1