[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Devel] Fix for bdf|pcf|pfr|type1|fnt default cmap problem
From: |
Detlef Würkner |
Subject: |
[Devel] Fix for bdf|pcf|pfr|type1|fnt default cmap problem |
Date: |
Tue, 18 Jun 2002 10:17:56 +0200 |
address@hidden (Anthony Fok) wrote:
> I wonder if it is related to the same changes in FreeType 2.1.1: After
> upgrading FreeType 2.1.1, Nautilus is no longer able to display
> anti-aliased fonts under the icons. It appears that librsvg1
> (SAX-based renderer library for SVG files) is responsible for calling
> FreeType to render the fonts; it works with TrueType fonts, but not
> with Type 1 fonts: [...]
Maybe there is no call to FT_Select_Charmap() or FT_Set_Charmap(), and
FT_CONFIG_OPTION_USE_CMAPS is defined. In this case the current drivers
for bdf, pcf, pfr, type1 and fnt dont set the default charmap. The fix:
----8<----
--- freetype2-current/src/bdf/bdfdrivr.c.ori Fri Jun 14 14:48:43 2002
+++ freetype2-current/src/bdf/bdfdrivr.c Tue Jun 18 07:59:49 2002
@@ -448,6 +448,10 @@
}
error = FT_CMap_New( &bdf_cmap_class, NULL, &charmap, NULL );
+
+ /* Select default charmap */
+ if (root->num_charmaps)
+ root->charmap = root->charmaps[0];
}
#else /* !FT_CONFIG_OPTION_USE_CMAPS */
@@ -481,11 +485,15 @@
charmap.face = FT_FACE( face );
- charmap.encoding = ft_encoding_none;
- charmap.platform_id = 0;
+ charmap.encoding = ft_encoding_adobe_standard;
+ charmap.platform_id = 7;
charmap.encoding_id = 0;
error = FT_CMap_New( &bdf_cmap_class, NULL, &charmap, NULL );
+
+ /* Select default charmap */
+ if (root->num_charmaps)
+ root->charmap = root->charmaps[0];
}
#else /* !FT_CONFIG_OPTION_USE_CMAPS */
--- freetype2-current/src/pcf/pcfdriver.c.ori Fri Jun 14 17:00:22 2002
+++ freetype2-current/src/pcf/pcfdriver.c Tue Jun 18 07:57:21 2002
@@ -340,6 +340,10 @@
}
error = FT_CMap_New( &pcf_cmap_class, NULL, &charmap, NULL );
+
+ /* Select default charmap */
+ if (face->root.num_charmaps)
+ face->root.charmap = face->root.charmaps[0];
}
#else /* !FT_CONFIG_OPTION_USE_CMAPS */
--- freetype2-current/src/pfr/pfrobjs.c.ori Sat Jun 15 13:34:16 2002
+++ freetype2-current/src/pfr/pfrobjs.c Tue Jun 18 07:50:41 2002
@@ -175,6 +175,10 @@
charmap.encoding = ft_encoding_unicode;
FT_CMap_New( &pfr_cmap_class_rec, NULL, &charmap, NULL );
+
+ /* Select default charmap */
+ if (root->num_charmaps)
+ root->charmap = root->charmaps[0];
}
}
--- freetype2-current/src/type1/t1objs.c.ori Sun May 12 19:59:17 2002
+++ freetype2-current/src/type1/t1objs.c Tue Jun 18 07:53:31 2002
@@ -485,6 +485,10 @@
if ( clazz )
FT_CMap_New( clazz, NULL, &charmap, NULL );
+
+ /* Select default charmap */
+ if (root->num_charmaps)
+ root->charmap = root->charmaps[0];
}
}
--- freetype2-current/src/winfonts/winfnt.c.ori Tue May 21 20:22:59 2002
+++ freetype2-current/src/winfonts/winfnt.c Tue Jun 18 07:48:12 2002
@@ -549,6 +549,10 @@
&charmap,
NULL );
if (error) goto Fail;
+
+ /* Select default charmap */
+ if (root->num_charmaps)
+ root->charmap = root->charmaps[0];
}
#else /* !FT_CONFIG_OPTION_USE_CMAPS */
----8<----
Ciao, Detlef
--
_ // address@hidden
\X/ Detlef Wuerkner, Langgoens/Germany