Lines 1046-1057
Link Here
|
1046 |
prop = pcf_find_property( face, "FAMILY_NAME" ); |
1046 |
prop = pcf_find_property( face, "FAMILY_NAME" ); |
1047 |
if ( prop && prop->isString ) |
1047 |
if ( prop && prop->isString ) |
1048 |
{ |
1048 |
{ |
1049 |
int l = ft_strlen( prop->value.atom ) + 1; |
1049 |
int l = ft_strlen( prop->value.atom ) + 1; |
1050 |
|
1050 |
int wide = 0; |
1051 |
|
1051 |
PCF_Property foundry_prop = pcf_find_property( face, "FOUNDRY" ); |
1052 |
if ( FT_NEW_ARRAY( root->family_name, l ) ) |
1052 |
PCF_Property point_size_prop = pcf_find_property( face, "POINT_SIZE" ); |
1053 |
goto Exit; |
1053 |
PCF_Property average_width_prop = pcf_find_property( face, "AVERAGE_WIDTH" ); |
1054 |
ft_strcpy( root->family_name, prop->value.atom ); |
1054 |
if ( point_size_prop != NULL && average_width_prop != NULL) { |
|
|
1055 |
if ( average_width_prop->value.integer >= point_size_prop->value.integer ) { |
1056 |
/* This font is at least square shaped or even wider */ |
1057 |
wide = 1; |
1058 |
l += ft_strlen( " Wide"); |
1059 |
} |
1060 |
} |
1061 |
if ( foundry_prop != NULL && foundry_prop->isString) { |
1062 |
l += ft_strlen( foundry_prop->value.atom ) + 1; |
1063 |
if ( FT_NEW_ARRAY( root->family_name, l ) ) |
1064 |
goto Exit; |
1065 |
ft_strcpy( root->family_name, foundry_prop->value.atom ); |
1066 |
strcat( root->family_name, " "); |
1067 |
strcat( root->family_name, prop->value.atom ); |
1068 |
} |
1069 |
else { |
1070 |
if ( FT_NEW_ARRAY( root->family_name, l ) ) |
1071 |
goto Exit; |
1072 |
ft_strcpy( root->family_name, prop->value.atom ); |
1073 |
} |
1074 |
if ( wide != 0) { |
1075 |
strcat( root->family_name, " Wide"); |
1076 |
} |
1055 |
} |
1077 |
} |
1056 |
else |
1078 |
else |
1057 |
root->family_name = NULL; |
1079 |
root->family_name = NULL; |