freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Devel] Re: patch: check bdf properties WEIGHT_NAME and SLANT case i


From: Federic Zhang
Subject: Re: [Devel] Re: patch: check bdf properties WEIGHT_NAME and SLANT case insensitively
Date: Thu, 28 Aug 2003 16:47:48 +0800
User-agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.2.1) Gecko/20030507

Thanks.

Note that it just supports both iso10646 and iso8859 charsets, is it
reasonable to support the legacy charsets such as Big5 and GB2312 etc?

-federic

> 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;
> +        }
>        }
>  
>        {
> 


-- 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]