Репозитории ALT
S: | 2.13.2-alt1 |
5.1: | 2.4.2-alt1 |
4.1: | 2.3.11-alt1.M41.1 |
4.0: | 2.3.6-alt1.M40.1 |
+updates: | 2.3.6-alt1.M40.1 |
Группа :: Система/Библиотеки
Пакет: libfreetype
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: freetype-2.3.2-bitmap-foundry.patch
Скачать
Скачать
--- freetype-2.3.2/src/pcf/pcfread.c.foundry 2007-02-13 01:06:26 +0300
+++ freetype-2.3.2/src/pcf/pcfread.c 2007-03-10 15:12:19 +0300
@@ -1164,8 +1164,34 @@ THE SOFTWARE.
prop = pcf_find_property( face, "FAMILY_NAME" );
if ( prop && prop->isString )
{
- if ( FT_STRDUP( root->family_name, prop->value.atom ) )
- goto Exit;
+ int l = ft_strlen( prop->value.atom ) + 1;
+ int wide = 0;
+ PCF_Property foundry_prop = pcf_find_property( face, "FOUNDRY" );
+ PCF_Property point_size_prop = pcf_find_property( face, "POINT_SIZE" );
+ PCF_Property average_width_prop = pcf_find_property( face, "AVERAGE_WIDTH" );
+ if ( point_size_prop != NULL && average_width_prop != NULL) {
+ if ( average_width_prop->value.integer >= point_size_prop->value.integer ) {
+ /* This font is at least square shaped or even wider */
+ wide = 1;
+ l += ft_strlen( " Wide");
+ }
+ }
+ if ( foundry_prop != NULL && foundry_prop->isString) {
+ l += ft_strlen( foundry_prop->value.atom ) + 1;
+ if ( FT_NEW_ARRAY( root->family_name, l ) )
+ goto Exit;
+ ft_strcpy( root->family_name, foundry_prop->value.atom );
+ strcat( root->family_name, " ");
+ strcat( root->family_name, prop->value.atom );
+ }
+ else {
+ if ( FT_NEW_ARRAY( root->family_name, l ) )
+ goto Exit;
+ ft_strcpy( root->family_name, prop->value.atom );
+ }
+ if ( wide != 0) {
+ strcat( root->family_name, " Wide");
+ }
}
else
root->family_name = NULL;