|
From: | Dirck Blaskey |
Subject: | Re: [Devel] planning next release |
Date: | Tue, 21 Dec 2004 10:34:08 -0800 |
User-agent: | Mozilla Thunderbird 1.0 (Windows/20041206) |
Sorry, the patch is a little confused - I didn't reintegrate. The original patch was for 2.0.9, where weight is initially extracted and plugged in to root->style_name. 2.1.10 doesn't do this. I had pulled the newer family parsing code and plugged it into 2.0.9,and only if the weight wasn't populated.
There are two basic issues i'm trying to get at with the patch: dict->family_name seems better than the existing cffface->family_name when trying to parse the style out, and we'd like to look at that parsed style when deciding if it's bold - but apparently, only if the weight isn't specified, which isn't in my patch. does that make sense? i'll try to produce a better patch... Werner LEMBERG wrote:
Please consider this patch for how cff_face_init decides if a font is bold.Basically, you've sent two different patches...let me know if you need more info.[Ideally, I would also like to have a ChangeLog entry...] This snippet isn't clear to me: - { - 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 ); - } It's a good idea to use the style name for a check whether FT_STYLE_FLAG_BOLD should be set. But why do you drop the test for `dict->weight' completely? How about a combination of both checks? Werner
[Prev in Thread] | Current Thread | [Next in Thread] |