freetype
[Top][All Lists]
Advanced

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

Re: [ft] TT_PLATFORM_MACINTOSH : which mapping converts Unicode into the


From: suzuki toshiya
Subject: Re: [ft] TT_PLATFORM_MACINTOSH : which mapping converts Unicode into the expected encoding?
Date: Mon, 28 May 2012 22:28:37 +0900
User-agent: Mozilla-Thunderbird 2.0.0.12 (X11/20080406)

Tom Sanham wrote:
> Thanks for the response.
> 
> I asked because I came across a very old font which contains no Unicode
> mapping, and no glyph names; hence I wish to write a routine to
> translate Unicode values into the legacy encoding supported by the font.

I see.

> However I think I have now found the answer I needed:
> 
> The relationships between the legacy encodings and Unicode are specified
> by the following document:
> 
> ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/APPLE/README.TXT

If you're working on Mac OS X, CoreFoundation may have some existing
utilities for encoding conversions. I could find an interesting list
of the encodings at:
http://opensource.apple.com/source/CF/CF-550/CFStringEncodingDatabase.c

Regards,
mpsuzuki


> Thanks again
> 
> Tom
> 
> -----Original Message-----
> From: suzuki toshiya [mailto:address@hidden 
> Sent: 28 May 2012 13:32
> To: Tom Sanham
> Cc: address@hidden
> Subject: Re: [ft] TT_PLATFORM_MACINTOSH : which mapping converts Unicode
> into the expected encoding?
> 
> Hi,
> 
> Excuse me, FreeType2 has no feature to convert character encoding.
> If you mean "how to select the charcode-to-glyph mapping table
> for Unicode", the solution would be TT_PLATFORM_APPLE_UNICODE.
> TT_PLATFORM_MACINTOSH is used for the legacy system before Unicode,
> the recent Macintosh uses TT_PLATFORM_APPLE_UNICODE.
> 
> Regards,
> mpsuzuki
> 
> 
> Tom Sanham wrote:
>> Hello
>>
>>  
>>
>> When a FT_CharMapRec has
>>
>>   .encoding=FT_ENCODING_NONE
>>
>>   .platform_id=TT_PLATFORM_MACINTOSH
>>
>>   .encoding_id=<whatever>
>>
>>  
>>
>> My question is: for the possible values of .encoding_id, how does one
>> figure out which mapping to use to convert from a Unicode value to the
>> value expected by FT_Get_Char_Index?
>>
>>  
>>
>> (In experiment, I have found that when
> .encoding_id=TT_MAC_ID_JAPANESE,
>> I can convert Unicode values through the mapping specified at the
>> following URL. What about the other values of .encoding_id?)
>>
>> ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/APPLE/JAPANESE.TXT
>>
>>  
>>
>> Thank you
>>
>>  
>>
>> Tom
>>
>>
>>
>>
>>
> ------------------------------------------------------------------------
>> _______________________________________________
>> Freetype mailing list
>> address@hidden
>> https://lists.nongnu.org/mailman/listinfo/freetype
> 




reply via email to

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