Re: [ft-devel] How to map a char to glyph with pcf

2018-03-24 Thread duhuanpeng
Thanks very much. I use my own method to do this mapping, it works well... I just to want to how does freetype2 to deal with this. Thank you again. I will leave my code unchanged. I will dig the code more later. duhuanpeng ___ Freetype-devel

Re: [ft-devel] How to map a char to glyph with pcf

2018-03-24 Thread Werner LEMBERG
PLEASE, don't send such large e-mails to the list! >> Yes. In FreeType, after selecting the character map, you can now >> use `FT_Load_Char' to map a (16bit) code value in `buf' to a glyph >> index. > > Do you mean > > FT_Error FT_Select_Charmap(FT_Face face, >

Re: [ft-devel] How to map a char to glyph with pcf

2018-03-23 Thread Werner LEMBERG
> I was sorry I didn't explain my problem clearly. I want to know if > freetype2 have Done this mapping(step [3]) in the library? Or I > have to write extra code for support it?[link 1] > [1] char buf[2]="\xb4\xeb"; [I assume that you are only interested in 16bit values representing Korean

Re: [ft-devel] How to map a char to glyph with pcf

2018-03-22 Thread Werner LEMBERG
>> The standard Korean encoding was WANSUNG (a Korean word meaning >> `pre-composed'), also known as EUC-KR. It contains two character >> sets, covering ASCII, Hanja (Korean CJK), and 2,350 pre-composed >> Hangul characters: > > Thank you for the explanation. I also found Microsoft article >

Re: [ft-devel] How to map a char to glyph with pcf

2018-03-22 Thread duhuanpeng
Hi, my Korean text is encoded in ecu format in a array like: const char textkr[] = "\xb4\xeb\xc7\xd1\xb9\xce\xb1\xb9\x20\xc1\xa4\xba\xce\xb8\xa6\x20" "\xc7\xd1\x20\xb9\xf8\xbf\xa1\x20\xb8\xb8\xb3\xaa\xb4\xc2\x20\xc5" "\xeb\xc7\xd5\xc3\xa2\xb1\xb8"; Now I have make three

Re: [ft-devel] How to map a char to glyph with pcf

2018-03-22 Thread Alexei Podtelezhnikov
On Thu, Mar 22, 2018 at 2:13 AM, Werner LEMBERG wrote: > > >> CHARSET_REGISTRY: `KSC5601.1987' > >> CHARSET_ENCODING: `0' > >> > > The standard Korean encoding was WANSUNG (a Korean word meaning > `pre-composed'), also known as EUC-KR. It contains two character > sets,

Re: [ft-devel] How to map a char to glyph with pcf

2018-03-22 Thread Werner LEMBERG
>> CHARSET_REGISTRY: `KSC5601.1987' >> CHARSET_ENCODING: `0' >> >> in the debug messages. The characters in the font are indeed encoded >> as plain KSC5601. > > Is this very different from KS C 5601-1992, aka FT_ENCODING_JOHAB >

Re: [ft-devel] How to map a char to glyph with pcf

2018-03-21 Thread Alexei Podtelezhnikov
On Wed, Mar 21, 2018 at 2:13 AM, Werner LEMBERG wrote: > I see > > CHARSET_REGISTRY: `KSC5601.1987' > CHARSET_ENCODING: `0' > > in the debug messages. The characters in the font are indeed encoded > as plain KSC5601. Is this very different from KS C 5601-1992, aka

Re: [ft-devel] How to map a char to glyph with pcf

2018-03-21 Thread suzuki toshiya
Sorry, I slipped to insert a few words. >> I wish if "ISO-2022-KR" is supported, I wish if "ISO-2022-KR" is supported *by (your) iconv*, Regards, mpsuzuki duhuanpeng wrote: > Hi, Suzuki, > >> oh, I wish if "ISO-2022-KR" is supported, although it would not >> be so easy for the young people

Re: [ft-devel] How to map a char to glyph with pcf

2018-03-21 Thread duhuanpeng
Hi, Suzuki, >oh, I wish if "ISO-2022-KR" is supported, although it would not >be so easy for the young people to relate KSC5601 with it. These mono pcf fonts still very useful in embedded devices. Some "smart" router, doorbell, Electric meter, tea pot, etc. duhuanpeng

Re: [ft-devel] How to map a char to glyph with pcf

2018-03-21 Thread Werner LEMBERG
> I find it, I cannot use FT_Load_Char() to load the glyph from a pcf file. > (face->charmaps[0]->encoding is zero) Yes. > and I make a dirty hack to do this mapping before using FT_Load_Glyph() > Like: > https://paste.ubuntu.com/p/T3M2mHVYg4/ > it works. Mhmm, this is indeed an ad-hoc