[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] planning next release
From: |
Dirck Blaskey |
Subject: |
Re: [Devel] planning next release |
Date: |
Mon, 20 Dec 2004 13:58:32 -0800 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
Please consider this patch for how cff_face_init decides if a font is bold.
let me know if you need more info.
thanks,
d
--- d:\3rd\freetype2\src\cff\cffobjs.c Fri May 28 17:52:21 2004
+++ freetype-2.1.9\cff\cffobjs.c Mon Dec 20 21:30:39 2004
@@ -527,6 +527,15 @@
psnames );
char* fullp = full;
char* family = cffface->family_name;
+ char* family_name = 0;
+
+ if( dict->family_name )
+ {
+ family_name = cff_index_get_sid_string( &cff->string_index,
+ dict->family_name,
+ psnames);
+ family = family_name;
+ }
/* We try to extract the style name from the full name. */
/* We need to ignore spaces and dashes during the search. */
@@ -566,6 +575,8 @@
}
break;
}
+ if( family_name )
+ FT_FREE( family_name );
FT_FREE( full );
}
}
@@ -620,18 +631,10 @@
if ( dict->italic_angle )
flags |= FT_STYLE_FLAG_ITALIC;
- {
- char *weight = cff_index_get_sid_string( &cff->string_index,
- dict->weight,
- psnames );
-
-
- if ( weight )
- if ( !ft_strcmp( weight, "Bold" ) ||
- !ft_strcmp( weight, "Black" ) )
+ if ( cffface->style_name )
+ if ( 0==strncmp( cffface->style_name, "Bold", 4 ) ||
+ 0==strncmp( cffface->style_name, "Black", 5 ) )
flags |= FT_STYLE_FLAG_BOLD;
- FT_FREE( weight );
- }
cffface->style_flags = flags;
}
Re: [Devel] planning next release, wangtao, 2004/12/21