[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Devel] Re: patch: check bdf properties WEIGHT_NAME and SLANT case insen
From: |
Mike FABIAN |
Subject: |
[Devel] Re: patch: check bdf properties WEIGHT_NAME and SLANT case insensitively |
Date: |
Wed, 27 Aug 2003 17:20:33 +0200 |
User-agent: |
Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Rational FORTRAN, linux) |
Federic Zhang <address@hidden> さんは書きました:
> Similiar problem occurs in the bdfdrivr.c and pcfdriver.c when check
> whether the charset_registry is either "ISO10646" or "ISO8859", if the
> string is lowercase, and the test will fail and charmap's encoding is
> wrongly set to FT_ENCODING_NONE.
>
> With the issue the fc-cache will fail to generate the fonts.cache-1
> for the bdf/pcf.gz font that has lowercase charset_registry property.
The problem with the charset_registry property is already fixed
in the CVS though whereas the problem with the bold and italic is not.
The change in CVS which fixed the charset_registry problem looks like
this:
--- freetype-2.1.4/src/pcf/pcfdriver.c 2003-03-20 08:04:40.000000000 +0100
+++ freetype2-cvs/src/pcf/pcfdrivr.c 2003-06-22 17:33:52.000000000 +0200
@@ -273,10 +274,21 @@
if ( ( charset_registry != NULL ) &&
( charset_encoding != NULL ) )
{
- if ( !ft_strcmp( face->charset_registry, "ISO10646" ) ||
- ( !ft_strcmp( face->charset_registry, "ISO8859" ) &&
- !ft_strcmp( face->charset_encoding, "1" ) ) )
+ char* s = face->charset_registry;
+
+
+ /* Uh, oh, compare first letters manually to avoid dependency
+ on locales. */
+ if ( ( s[0] == 'i' || s[0] == 'I' ) &&
+ ( s[1] == 's' || s[1] == 'S' ) &&
+ ( s[2] == 'o' || s[2] == 'O' ) )
+ {
+ s += 3;
+ if ( !ft_strcmp( s, "10646" ) ||
+ ( !ft_strcmp( s, "8859" ) &&
+ !ft_strcmp( face->charset_encoding, "1" ) ) )
unicode_charmap = 1;
+ }
}
{
--
Mike Fabian <address@hidden> http://www.suse.de/~mfabian
睡眠不足はいい仕事の敵だ。