Re: [ft] Rendering chinese characters

2012-07-06 Thread daya.k58
Suzuki san,

I m using HanaMinA.ttf font file. Now,I m able to display the 
HKSCS sets using both DirectFB and FreeType..
Thanks a lot for your help and your time .

Thanks and Regards,
Daya



-Original Message-
From: suzuki toshiya [mailto:mpsuz...@hiroshima-u.ac.jp] 
Sent: Wednesday, June 27, 2012 4:14 PM
To: Daya Devi K (WT01 - Product Engineering Services)
Cc: freetype@nongnu.org
Subject: Re: [ft] Rendering chinese characters

Unfortunately, the fonts under liberated license covering
non-BMP Hanzi are few.

One of the exception would be Hanazono Mincho:
http://fonts.jp/hanazono/
(although the beginning of the page is in Japanese,
you can find English note at the end of the page).

Their type design of Ext B block might be slightly
different from the expected design in China, Taiwan, etc.
So co-using it with Ming typeface could show some
inconsistency.

Also, the font is only Mincho (SongTi-like typeface),
so it would not be appropriate for the low resolution
monochrome device.

Another hopeful project would be Wen Quan Yi, but their
non-BMP glyph resources seem to has just begun.
http://wenq.org/
I'm waiting for their next release...

Regards,
mpsuzuki



daya@wipro.com wrote:
 suzuki san,
 
 I tried that ftview command..
 my font file does not support non-bmp characters
 Please suggest me some font file which support non bmp characters if u 
 know
 Thanks a lot for ur help
 
 
 
 Regards,
 Daya
 
 
 From: suzuki toshiya [mpsuz...@hiroshima-u.ac.jp]
 Sent: Tuesday, June 26, 2012 4:13 PM
 To: Daya Devi K (WT01 - Product Engineering Services)
 Cc: freetype@nongnu.org
 Subject: Re: [ft] Rendering chinese characters
 
 Hi,
 
 At present, ftview does not receive UCS codepoints via hexadecimal expression.
 But, as you already checked that FT_Get_Char_Index() fails for non-BMP 
 character,
 what you should try is NOT the search a character by the character codepoint.
 Searching a character by some codepoint always invokes the 
 FT_Get_Char_Index().
 So it does not give any new information. What you should try is
 1) the font has non-BMP cmap (mapping table from character codepoint to glyph 
 index), or not?
 2) if non-BMP cmap is included, what kind of glyphs are included in the font?
 
 To check 1), please try ftdump.
 In the case of BMP-only font, the result would finish like:
 
 [...]
 charmaps
0: platform 1, encoding 0, language 0
1: platform 3, encoding 1, language 0 (active)
 
 It means, platform 3 (=Microsoft) encoding 1 (=UCS2), so no mapping tables for
 non-BMP characters are included. There is no way to show non-BMP character 
 with
 this font (even if the font producer inserts any glyph, we cannot know that it
 is related with non-BMP character).
 
 In the case of not-BMP-only font, the result would finish like:charmaps
 [...]
0: platform 0, encoding 3, language 0
1: platform 0, encoding 4, language 0
2: platform 1, encoding 0, language 0
3: platform 3, encoding 1, language 0
4: platform 3, encoding 10, language 0 (active)
 
 You can find that there is UCS4 cmap (platform=3, encoding=10), so there might
 be some non-BMP character.
 
 ---
 
 After knowing the font includes non-BMP character, please show the glyphs in
 the font with ftview, and push F12 key endlessly until the end of the glyph
 index. When you reached the end of the glyph index, push F7 key to back 10
 glyph index, and search the last CJK ideograph - you may be able to guess the
 coverage of CJK ideographs, because huge CJK fonts including non-BMP 
 characters
 often order their glyphs by UCS codepoint at the quite large glyph index.
 
 Regards,
 mpsuzuki
 
 
 
 
 daya@wipro.com wrote:
 Hi mpsuzuki,
 using ftview ,I m able to see BMP characters,But  my intention is to display 
 chinese characters in non-BMP plane...

 when I give  the following command
  ftview  -m '豈' font ming.ttf  ,I m able to display the character  as this 
 character belongs BMP plane...
 ftview -m 'text' fontfile
 In ftview  ,is there any  option to give 'unicode point' as argument?
 (because in the place of text in ftview command ,I have to copy the  
 equivalent character of 0x00027267,which I am not able to.I m able copy 
 only squares!!! )

 Thanks in adv...

 Thanks Regards,
 Daya




 
 From: suzuki toshiya [mpsuz...@hiroshima-u.ac.jp]
 Sent: Tuesday, June 26, 2012 1:06 PM
 To: Daya Devi K (WT01 - Product Engineering Services)
 Cc: freetype@nongnu.org
 Subject: Re: [ft] Rendering chinese characters

 In addition, if you're working on Unix like systems, please try ftview 
 command.
 It will show the glyphs in the font without consideration if they are 
 accessible via some character code,
 so it might be helpful to know if the font supports non-BMP characters.

 Regards,
 mpsuzuki

 suzuki toshiya wrote:
 Hi,

 Basically, if glyph index returned

Re: [ft] Rendering chinese characters

2012-07-06 Thread suzuki toshiya
Nice to hear that you had proceeded your first step.

I have to note that the preferred typeface design policy
in HongKong would be different from Hanazono Mincho,
and, some documents may use HKSCS characters via PUA
codepoints (Hanazono fonts may not support PUA codepoint
for HKSCS), so I recommend to consider the possibility
to update the application to use multiple fonts.

Regards,
mpsuzuki

daya@wipro.com wrote:
 Suzuki san,
 
   I m using HanaMinA.ttf font file. Now,I m able to display the 
 HKSCS sets using both DirectFB and FreeType..
 Thanks a lot for your help and your time .
 
 Thanks and Regards,
 Daya
 
 
 
 -Original Message-
 From: suzuki toshiya [mailto:mpsuz...@hiroshima-u.ac.jp] 
 Sent: Wednesday, June 27, 2012 4:14 PM
 To: Daya Devi K (WT01 - Product Engineering Services)
 Cc: freetype@nongnu.org
 Subject: Re: [ft] Rendering chinese characters
 
 Unfortunately, the fonts under liberated license covering
 non-BMP Hanzi are few.
 
 One of the exception would be Hanazono Mincho:
   http://fonts.jp/hanazono/
 (although the beginning of the page is in Japanese,
 you can find English note at the end of the page).
 
 Their type design of Ext B block might be slightly
 different from the expected design in China, Taiwan, etc.
 So co-using it with Ming typeface could show some
 inconsistency.
 
 Also, the font is only Mincho (SongTi-like typeface),
 so it would not be appropriate for the low resolution
 monochrome device.
 
 Another hopeful project would be Wen Quan Yi, but their
 non-BMP glyph resources seem to has just begun.
   http://wenq.org/
 I'm waiting for their next release...
 
 Regards,
 mpsuzuki
 
 
 
 daya@wipro.com wrote:
 suzuki san,

 I tried that ftview command..
 my font file does not support non-bmp characters
 Please suggest me some font file which support non bmp characters if u 
 know
 Thanks a lot for ur help



 Regards,
 Daya

 
 From: suzuki toshiya [mpsuz...@hiroshima-u.ac.jp]
 Sent: Tuesday, June 26, 2012 4:13 PM
 To: Daya Devi K (WT01 - Product Engineering Services)
 Cc: freetype@nongnu.org
 Subject: Re: [ft] Rendering chinese characters

 Hi,

 At present, ftview does not receive UCS codepoints via hexadecimal 
 expression.
 But, as you already checked that FT_Get_Char_Index() fails for non-BMP 
 character,
 what you should try is NOT the search a character by the character codepoint.
 Searching a character by some codepoint always invokes the 
 FT_Get_Char_Index().
 So it does not give any new information. What you should try is
 1) the font has non-BMP cmap (mapping table from character codepoint to 
 glyph index), or not?
 2) if non-BMP cmap is included, what kind of glyphs are included in the font?

 To check 1), please try ftdump.
 In the case of BMP-only font, the result would finish like:

 [...]
 charmaps
0: platform 1, encoding 0, language 0
1: platform 3, encoding 1, language 0 (active)

 It means, platform 3 (=Microsoft) encoding 1 (=UCS2), so no mapping tables 
 for
 non-BMP characters are included. There is no way to show non-BMP character 
 with
 this font (even if the font producer inserts any glyph, we cannot know that 
 it
 is related with non-BMP character).

 In the case of not-BMP-only font, the result would finish like:charmaps
 [...]
0: platform 0, encoding 3, language 0
1: platform 0, encoding 4, language 0
2: platform 1, encoding 0, language 0
3: platform 3, encoding 1, language 0
4: platform 3, encoding 10, language 0 (active)

 You can find that there is UCS4 cmap (platform=3, encoding=10), so there 
 might
 be some non-BMP character.

 ---

 After knowing the font includes non-BMP character, please show the glyphs in
 the font with ftview, and push F12 key endlessly until the end of the glyph
 index. When you reached the end of the glyph index, push F7 key to back 10
 glyph index, and search the last CJK ideograph - you may be able to guess the
 coverage of CJK ideographs, because huge CJK fonts including non-BMP 
 characters
 often order their glyphs by UCS codepoint at the quite large glyph index.

 Regards,
 mpsuzuki




 daya@wipro.com wrote:
 Hi mpsuzuki,
 using ftview ,I m able to see BMP characters,But  my intention is to 
 display chinese characters in non-BMP plane...

 when I give  the following command
  ftview  -m '豈' font ming.ttf  ,I m able to display the character  as this 
 character belongs BMP plane...
 ftview -m 'text' fontfile
 In ftview  ,is there any  option to give 'unicode point' as argument?
 (because in the place of text in ftview command ,I have to copy the  
 equivalent character of 0x00027267,which I am not able to.I m able copy 
 only squares!!! )

 Thanks in adv...

 Thanks Regards,
 Daya




 
 From: suzuki toshiya [mpsuz...@hiroshima-u.ac.jp]
 Sent: Tuesday, June 26, 2012 1:06 PM
 To: Daya Devi K (WT01 - Product Engineering

Re: [ft] Rendering chinese characters

2012-06-27 Thread suzuki toshiya
Unfortunately, the fonts under liberated license covering
non-BMP Hanzi are few.

One of the exception would be Hanazono Mincho:
http://fonts.jp/hanazono/
(although the beginning of the page is in Japanese,
you can find English note at the end of the page).

Their type design of Ext B block might be slightly
different from the expected design in China, Taiwan, etc.
So co-using it with Ming typeface could show some
inconsistency.

Also, the font is only Mincho (SongTi-like typeface),
so it would not be appropriate for the low resolution
monochrome device.

Another hopeful project would be Wen Quan Yi, but their
non-BMP glyph resources seem to has just begun.
http://wenq.org/
I'm waiting for their next release...

Regards,
mpsuzuki



daya@wipro.com wrote:
 suzuki san,
 
 I tried that ftview command..
 my font file does not support non-bmp characters
 Please suggest me some font file which support non bmp characters if u 
 know
 Thanks a lot for ur help
 
 
 
 Regards,
 Daya
 
 
 From: suzuki toshiya [mpsuz...@hiroshima-u.ac.jp]
 Sent: Tuesday, June 26, 2012 4:13 PM
 To: Daya Devi K (WT01 - Product Engineering Services)
 Cc: freetype@nongnu.org
 Subject: Re: [ft] Rendering chinese characters
 
 Hi,
 
 At present, ftview does not receive UCS codepoints via hexadecimal expression.
 But, as you already checked that FT_Get_Char_Index() fails for non-BMP 
 character,
 what you should try is NOT the search a character by the character codepoint.
 Searching a character by some codepoint always invokes the 
 FT_Get_Char_Index().
 So it does not give any new information. What you should try is
 1) the font has non-BMP cmap (mapping table from character codepoint to glyph 
 index), or not?
 2) if non-BMP cmap is included, what kind of glyphs are included in the font?
 
 To check 1), please try ftdump.
 In the case of BMP-only font, the result would finish like:
 
 [...]
 charmaps
0: platform 1, encoding 0, language 0
1: platform 3, encoding 1, language 0 (active)
 
 It means, platform 3 (=Microsoft) encoding 1 (=UCS2), so no mapping tables for
 non-BMP characters are included. There is no way to show non-BMP character 
 with
 this font (even if the font producer inserts any glyph, we cannot know that it
 is related with non-BMP character).
 
 In the case of not-BMP-only font, the result would finish like:charmaps
 [...]
0: platform 0, encoding 3, language 0
1: platform 0, encoding 4, language 0
2: platform 1, encoding 0, language 0
3: platform 3, encoding 1, language 0
4: platform 3, encoding 10, language 0 (active)
 
 You can find that there is UCS4 cmap (platform=3, encoding=10), so there might
 be some non-BMP character.
 
 ---
 
 After knowing the font includes non-BMP character, please show the glyphs in
 the font with ftview, and push F12 key endlessly until the end of the glyph
 index. When you reached the end of the glyph index, push F7 key to back 10
 glyph index, and search the last CJK ideograph - you may be able to guess the
 coverage of CJK ideographs, because huge CJK fonts including non-BMP 
 characters
 often order their glyphs by UCS codepoint at the quite large glyph index.
 
 Regards,
 mpsuzuki
 
 
 
 
 daya@wipro.com wrote:
 Hi mpsuzuki,
 using ftview ,I m able to see BMP characters,But  my intention is to display 
 chinese characters in non-BMP plane...

 when I give  the following command
  ftview  -m '豈' font ming.ttf  ,I m able to display the character  as this 
 character belongs BMP plane...
 ftview -m 'text' fontfile
 In ftview  ,is there any  option to give 'unicode point' as argument?
 (because in the place of text in ftview command ,I have to copy the  
 equivalent character of 0x00027267,which I am not able to.I m able copy 
 only squares!!! )

 Thanks in adv...

 Thanks Regards,
 Daya




 
 From: suzuki toshiya [mpsuz...@hiroshima-u.ac.jp]
 Sent: Tuesday, June 26, 2012 1:06 PM
 To: Daya Devi K (WT01 - Product Engineering Services)
 Cc: freetype@nongnu.org
 Subject: Re: [ft] Rendering chinese characters

 In addition, if you're working on Unix like systems, please try ftview 
 command.
 It will show the glyphs in the font without consideration if they are 
 accessible via some character code,
 so it might be helpful to know if the font supports non-BMP characters.

 Regards,
 mpsuzuki

 suzuki toshiya wrote:
 Hi,

 Basically, if glyph index returned by FT_Get_Char_Index() is zero,
 the font is expected to lack the glyph for the character code passed
 to FT_Get_Char_Index().

 Regards,
 mpsuzuki

 daya@wipro.com wrote:
 Hi,

 I don't know how to check whether a character is present in the font file 
 or not
 pls anyone let me know the way to find whether a character is present in 
 the font file or not


 Thanks and regards,
 Daya





 -Original Message-
 From: suzuki toshiya [mailto:mpsuz

Re: [ft] Rendering chinese characters

2012-06-26 Thread suzuki toshiya
Hi,

Are you sure that your font file (I don't know what it is) include the 
character for +0x00027267?
If you are sure, how you have checked it?

Regards,
mpsuzuki

daya@wipro.com wrote:
 Hi,
 
 I m using the following piece of code for rendering the  Chinese 
 character and the font file is ming_uni.ttf:
 
 {
 FT_Library  library;
   FT_GlyphSlot slot;
 FT_Face face;
 FT_Init_FreeType( library );
 FT_New_Face( library,/usr/local/share/ming.ttf,0,face);
 FT_Set_Char_Size(temp_ptr-face,16*64,16*64 ,500,500 );
   slot = face-glyph;
 glyph_index = FT_Get_Char_Index(face,0x00027267);
   printf(Glyph index is %d is \n,glyph_index);
 }
 
 when I printed the glyph_index ,it is zero...bt  if I use 0xF900 instead of  
 0x00027267 ,I m able to see the Chinese character..
 My doubt is why  the  FT_Get_Char_Index does not display Chinese character  
 for  Unicode value 0x00027267?
 Is that the problem of font file ,I m using?
 Why I m nt able to get the glyph (or charmap) of 0x00027267 and similar 
 values?
 
 Please help me..
 Thanks in adv.
 
 
 Regards,
 Daya
 
 
 Please do not print this email unless it is absolutely necessary. 
 
 The information contained in this electronic message and any attachments to 
 this message are intended for the exclusive use of the addressee(s) and may 
 contain proprietary, confidential or privileged information. If you are not 
 the intended recipient, you should not disseminate, distribute or copy this 
 e-mail. Please notify the sender immediately and destroy all copies of this 
 message and any attachments. 
 
 WARNING: Computer viruses can be transmitted via email. The recipient should 
 check this email and any attachments for the presence of viruses. The company 
 accepts no liability for any damage caused by any virus transmitted by this 
 email. 
 
 www.wipro.com
 
 
 
 
 
 ___
 Freetype mailing list
 Freetype@nongnu.org
 https://lists.nongnu.org/mailman/listinfo/freetype


___
Freetype mailing list
Freetype@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype


Re: [ft] Rendering chinese characters

2012-06-26 Thread daya.k58
Hi,

I don't know how to check whether a character is present in the font file or 
not
pls anyone let me know the way to find whether a character is present in the 
font file or not


Thanks and regards,
Daya





-Original Message-
From: suzuki toshiya [mailto:mpsuz...@hiroshima-u.ac.jp] 
Sent: Tuesday, June 26, 2012 12:14 PM
To: Daya Devi K (WT01 - Product Engineering Services)
Cc: freetype@nongnu.org
Subject: Re: [ft] Rendering chinese characters

Hi,

Are you sure that your font file (I don't know what it is) include the 
character for +0x00027267?
If you are sure, how you have checked it?

Regards,
mpsuzuki

daya@wipro.com wrote:
 Hi,
 
 I m using the following piece of code for rendering the  Chinese 
 character and the font file is ming_uni.ttf:
 
 {
 FT_Library  library;
   FT_GlyphSlot slot;
 FT_Face face;
 FT_Init_FreeType( library );
 FT_New_Face( library,/usr/local/share/ming.ttf,0,face);
 FT_Set_Char_Size(temp_ptr-face,16*64,16*64 ,500,500 );
   slot = face-glyph;
 glyph_index = FT_Get_Char_Index(face,0x00027267);
   printf(Glyph index is %d is \n,glyph_index);
 }
 
 when I printed the glyph_index ,it is zero...bt  if I use 0xF900 instead of  
 0x00027267 ,I m able to see the Chinese character..
 My doubt is why  the  FT_Get_Char_Index does not display Chinese character  
 for  Unicode value 0x00027267?
 Is that the problem of font file ,I m using?
 Why I m nt able to get the glyph (or charmap) of 0x00027267 and similar 
 values?
 
 Please help me..
 Thanks in adv.
 
 
 Regards,
 Daya
 
 
 Please do not print this email unless it is absolutely necessary. 
 
 The information contained in this electronic message and any attachments to 
 this message are intended for the exclusive use of the addressee(s) and may 
 contain proprietary, confidential or privileged information. If you are not 
 the intended recipient, you should not disseminate, distribute or copy this 
 e-mail. Please notify the sender immediately and destroy all copies of this 
 message and any attachments. 
 
 WARNING: Computer viruses can be transmitted via email. The recipient should 
 check this email and any attachments for the presence of viruses. The company 
 accepts no liability for any damage caused by any virus transmitted by this 
 email. 
 
 www.wipro.com
 
 
 
 
 
 ___
 Freetype mailing list
 Freetype@nongnu.org
 https://lists.nongnu.org/mailman/listinfo/freetype


Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email. 

www.wipro.com

___
Freetype mailing list
Freetype@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype


Re: [ft] Rendering chinese characters

2012-06-26 Thread suzuki toshiya
Hi,

Basically, if glyph index returned by FT_Get_Char_Index() is zero,
the font is expected to lack the glyph for the character code passed
to FT_Get_Char_Index().

Regards,
mpsuzuki

daya@wipro.com wrote:
 Hi,
 
 I don't know how to check whether a character is present in the font file or 
 not
 pls anyone let me know the way to find whether a character is present in the 
 font file or not
 
 
 Thanks and regards,
 Daya
 
 
 
   
 
 -Original Message-
 From: suzuki toshiya [mailto:mpsuz...@hiroshima-u.ac.jp] 
 Sent: Tuesday, June 26, 2012 12:14 PM
 To: Daya Devi K (WT01 - Product Engineering Services)
 Cc: freetype@nongnu.org
 Subject: Re: [ft] Rendering chinese characters
 
 Hi,
 
 Are you sure that your font file (I don't know what it is) include the 
 character for +0x00027267?
 If you are sure, how you have checked it?
 
 Regards,
 mpsuzuki
 
 daya@wipro.com wrote:
 Hi,

 I m using the following piece of code for rendering the  Chinese 
 character and the font file is ming_uni.ttf:

 {
 FT_Library  library;
   FT_GlyphSlot slot;
 FT_Face face;
 FT_Init_FreeType( library );
 FT_New_Face( library,/usr/local/share/ming.ttf,0,face);
 FT_Set_Char_Size(temp_ptr-face,16*64,16*64 ,500,500 );
   slot = face-glyph;
 glyph_index = FT_Get_Char_Index(face,0x00027267);
   printf(Glyph index is %d is \n,glyph_index);
 }

 when I printed the glyph_index ,it is zero...bt  if I use 0xF900 instead of  
 0x00027267 ,I m able to see the Chinese character..
 My doubt is why  the  FT_Get_Char_Index does not display Chinese character  
 for  Unicode value 0x00027267?
 Is that the problem of font file ,I m using?
 Why I m nt able to get the glyph (or charmap) of 0x00027267 and similar 
 values?

 Please help me..
 Thanks in adv.


 Regards,
 Daya


 Please do not print this email unless it is absolutely necessary. 

 The information contained in this electronic message and any attachments to 
 this message are intended for the exclusive use of the addressee(s) and may 
 contain proprietary, confidential or privileged information. If you are not 
 the intended recipient, you should not disseminate, distribute or copy this 
 e-mail. Please notify the sender immediately and destroy all copies of this 
 message and any attachments. 

 WARNING: Computer viruses can be transmitted via email. The recipient should 
 check this email and any attachments for the presence of viruses. The 
 company accepts no liability for any damage caused by any virus transmitted 
 by this email. 

 www.wipro.com



 

 ___
 Freetype mailing list
 Freetype@nongnu.org
 https://lists.nongnu.org/mailman/listinfo/freetype
 
 
 Please do not print this email unless it is absolutely necessary. 
 
 The information contained in this electronic message and any attachments to 
 this message are intended for the exclusive use of the addressee(s) and may 
 contain proprietary, confidential or privileged information. If you are not 
 the intended recipient, you should not disseminate, distribute or copy this 
 e-mail. Please notify the sender immediately and destroy all copies of this 
 message and any attachments. 
 
 WARNING: Computer viruses can be transmitted via email. The recipient should 
 check this email and any attachments for the presence of viruses. The company 
 accepts no liability for any damage caused by any virus transmitted by this 
 email. 
 
 www.wipro.com


___
Freetype mailing list
Freetype@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype


Re: [ft] Rendering chinese characters

2012-06-26 Thread suzuki toshiya
In addition, if you're working on Unix like systems, please try ftview 
command.
It will show the glyphs in the font without consideration if they are 
accessible via some character code,
so it might be helpful to know if the font supports non-BMP characters.

Regards,
mpsuzuki

suzuki toshiya wrote:
 Hi,
 
 Basically, if glyph index returned by FT_Get_Char_Index() is zero,
 the font is expected to lack the glyph for the character code passed
 to FT_Get_Char_Index().
 
 Regards,
 mpsuzuki
 
 daya@wipro.com wrote:
 Hi,

 I don't know how to check whether a character is present in the font file or 
 not
 pls anyone let me know the way to find whether a character is present in the 
 font file or not


 Thanks and regards,
 Daya



  

 -Original Message-
 From: suzuki toshiya [mailto:mpsuz...@hiroshima-u.ac.jp] 
 Sent: Tuesday, June 26, 2012 12:14 PM
 To: Daya Devi K (WT01 - Product Engineering Services)
 Cc: freetype@nongnu.org
 Subject: Re: [ft] Rendering chinese characters

 Hi,

 Are you sure that your font file (I don't know what it is) include the 
 character for +0x00027267?
 If you are sure, how you have checked it?

 Regards,
 mpsuzuki

 daya@wipro.com wrote:
 Hi,

 I m using the following piece of code for rendering the  Chinese 
 character and the font file is ming_uni.ttf:

 {
 FT_Library  library;
   FT_GlyphSlot slot;
 FT_Face face;
 FT_Init_FreeType( library );
 FT_New_Face( library,/usr/local/share/ming.ttf,0,face);
 FT_Set_Char_Size(temp_ptr-face,16*64,16*64 ,500,500 );
   slot = face-glyph;
 glyph_index = FT_Get_Char_Index(face,0x00027267);
   printf(Glyph index is %d is \n,glyph_index);
 }

 when I printed the glyph_index ,it is zero...bt  if I use 0xF900 instead of 
  0x00027267 ,I m able to see the Chinese character..
 My doubt is why  the  FT_Get_Char_Index does not display Chinese character  
 for  Unicode value 0x00027267?
 Is that the problem of font file ,I m using?
 Why I m nt able to get the glyph (or charmap) of 0x00027267 and similar 
 values?

 Please help me..
 Thanks in adv.


 Regards,
 Daya


 Please do not print this email unless it is absolutely necessary. 

 The information contained in this electronic message and any attachments to 
 this message are intended for the exclusive use of the addressee(s) and may 
 contain proprietary, confidential or privileged information. If you are not 
 the intended recipient, you should not disseminate, distribute or copy this 
 e-mail. Please notify the sender immediately and destroy all copies of this 
 message and any attachments. 

 WARNING: Computer viruses can be transmitted via email. The recipient 
 should check this email and any attachments for the presence of viruses. 
 The company accepts no liability for any damage caused by any virus 
 transmitted by this email. 

 www.wipro.com



 

 ___
 Freetype mailing list
 Freetype@nongnu.org
 https://lists.nongnu.org/mailman/listinfo/freetype

 Please do not print this email unless it is absolutely necessary. 

 The information contained in this electronic message and any attachments to 
 this message are intended for the exclusive use of the addressee(s) and may 
 contain proprietary, confidential or privileged information. If you are not 
 the intended recipient, you should not disseminate, distribute or copy this 
 e-mail. Please notify the sender immediately and destroy all copies of this 
 message and any attachments. 

 WARNING: Computer viruses can be transmitted via email. The recipient should 
 check this email and any attachments for the presence of viruses. The 
 company accepts no liability for any damage caused by any virus transmitted 
 by this email. 

 www.wipro.com
 
 
 ___
 Freetype mailing list
 Freetype@nongnu.org
 https://lists.nongnu.org/mailman/listinfo/freetype


___
Freetype mailing list
Freetype@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype


Re: [ft] Rendering chinese characters

2012-06-26 Thread daya.k58
Hi mpsuzuki,
using ftview ,I m able to see BMP characters,But  my intention is to display 
chinese characters in non-BMP plane...

when I give  the following command
 ftview  -m '豈' font ming.ttf  ,I m able to display the character  as this 
character belongs BMP plane...
ftview -m 'text' fontfile 
In ftview  ,is there any  option to give 'unicode point' as argument?
(because in the place of text in ftview command ,I have to copy the  equivalent 
character of 0x00027267,which I am not able to.I m able copy only 
squares!!! ) 

Thanks in adv...

Thanks Regards,
Daya





From: suzuki toshiya [mpsuz...@hiroshima-u.ac.jp]
Sent: Tuesday, June 26, 2012 1:06 PM
To: Daya Devi K (WT01 - Product Engineering Services)
Cc: freetype@nongnu.org
Subject: Re: [ft] Rendering chinese characters

In addition, if you're working on Unix like systems, please try ftview 
command.
It will show the glyphs in the font without consideration if they are 
accessible via some character code,
so it might be helpful to know if the font supports non-BMP characters.

Regards,
mpsuzuki

suzuki toshiya wrote:
 Hi,

 Basically, if glyph index returned by FT_Get_Char_Index() is zero,
 the font is expected to lack the glyph for the character code passed
 to FT_Get_Char_Index().

 Regards,
 mpsuzuki

 daya@wipro.com wrote:
 Hi,

 I don't know how to check whether a character is present in the font file or 
 not
 pls anyone let me know the way to find whether a character is present in the 
 font file or not


 Thanks and regards,
 Daya





 -Original Message-
 From: suzuki toshiya [mailto:mpsuz...@hiroshima-u.ac.jp]
 Sent: Tuesday, June 26, 2012 12:14 PM
 To: Daya Devi K (WT01 - Product Engineering Services)
 Cc: freetype@nongnu.org
 Subject: Re: [ft] Rendering chinese characters

 Hi,

 Are you sure that your font file (I don't know what it is) include the 
 character for +0x00027267?
 If you are sure, how you have checked it?

 Regards,
 mpsuzuki

 daya@wipro.com wrote:
 Hi,

 I m using the following piece of code for rendering the  Chinese 
 character and the font file is ming_uni.ttf:

 {
 FT_Library  library;
   FT_GlyphSlot slot;
 FT_Face face;
 FT_Init_FreeType( library );
 FT_New_Face( library,/usr/local/share/ming.ttf,0,face);
 FT_Set_Char_Size(temp_ptr-face,16*64,16*64 ,500,500 );
   slot = face-glyph;
 glyph_index = FT_Get_Char_Index(face,0x00027267);
   printf(Glyph index is %d is \n,glyph_index);
 }

 when I printed the glyph_index ,it is zero...bt  if I use 0xF900 instead of 
  0x00027267 ,I m able to see the Chinese character..
 My doubt is why  the  FT_Get_Char_Index does not display Chinese character  
 for  Unicode value 0x00027267?
 Is that the problem of font file ,I m using?
 Why I m nt able to get the glyph (or charmap) of 0x00027267 and similar 
 values?

 Please help me..
 Thanks in adv.


 Regards,
 Daya


 Please do not print this email unless it is absolutely necessary.

 The information contained in this electronic message and any attachments to 
 this message are intended for the exclusive use of the addressee(s) and may 
 contain proprietary, confidential or privileged information. If you are not 
 the intended recipient, you should not disseminate, distribute or copy this 
 e-mail. Please notify the sender immediately and destroy all copies of this 
 message and any attachments.

 WARNING: Computer viruses can be transmitted via email. The recipient 
 should check this email and any attachments for the presence of viruses. 
 The company accepts no liability for any damage caused by any virus 
 transmitted by this email.

 www.wipro.com



 

 ___
 Freetype mailing list
 Freetype@nongnu.org
 https://lists.nongnu.org/mailman/listinfo/freetype

 Please do not print this email unless it is absolutely necessary.

 The information contained in this electronic message and any attachments to 
 this message are intended for the exclusive use of the addressee(s) and may 
 contain proprietary, confidential or privileged information. If you are not 
 the intended recipient, you should not disseminate, distribute or copy this 
 e-mail. Please notify the sender immediately and destroy all copies of this 
 message and any attachments.

 WARNING: Computer viruses can be transmitted via email. The recipient should 
 check this email and any attachments for the presence of viruses. The 
 company accepts no liability for any damage caused by any virus transmitted 
 by this email.

 www.wipro.com


 ___
 Freetype mailing list
 Freetype@nongnu.org
 https://lists.nongnu.org/mailman/listinfo/freetype


Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to 
this message are intended

Re: [ft] Rendering chinese characters

2012-06-26 Thread suzuki toshiya
Hi,

At present, ftview does not receive UCS codepoints via hexadecimal expression.
But, as you already checked that FT_Get_Char_Index() fails for non-BMP 
character,
what you should try is NOT the search a character by the character codepoint.
Searching a character by some codepoint always invokes the FT_Get_Char_Index().
So it does not give any new information. What you should try is
1) the font has non-BMP cmap (mapping table from character codepoint to glyph 
index), or not?
2) if non-BMP cmap is included, what kind of glyphs are included in the font?

To check 1), please try ftdump.
In the case of BMP-only font, the result would finish like:

[...]
charmaps
   0: platform 1, encoding 0, language 0
   1: platform 3, encoding 1, language 0 (active)

It means, platform 3 (=Microsoft) encoding 1 (=UCS2), so no mapping tables for
non-BMP characters are included. There is no way to show non-BMP character with
this font (even if the font producer inserts any glyph, we cannot know that it
is related with non-BMP character).

In the case of not-BMP-only font, the result would finish like:charmaps
[...]
   0: platform 0, encoding 3, language 0
   1: platform 0, encoding 4, language 0
   2: platform 1, encoding 0, language 0
   3: platform 3, encoding 1, language 0
   4: platform 3, encoding 10, language 0 (active)

You can find that there is UCS4 cmap (platform=3, encoding=10), so there might
be some non-BMP character.

---

After knowing the font includes non-BMP character, please show the glyphs in
the font with ftview, and push F12 key endlessly until the end of the glyph
index. When you reached the end of the glyph index, push F7 key to back 10
glyph index, and search the last CJK ideograph - you may be able to guess the
coverage of CJK ideographs, because huge CJK fonts including non-BMP characters
often order their glyphs by UCS codepoint at the quite large glyph index.

Regards,
mpsuzuki




daya@wipro.com wrote:
 Hi mpsuzuki,
 using ftview ,I m able to see BMP characters,But  my intention is to display 
 chinese characters in non-BMP plane...
 
 when I give  the following command
  ftview  -m '豈' font ming.ttf  ,I m able to display the character  as this 
 character belongs BMP plane...
 ftview -m 'text' fontfile 
 In ftview  ,is there any  option to give 'unicode point' as argument?
 (because in the place of text in ftview command ,I have to copy the  
 equivalent character of 0x00027267,which I am not able to.I m able copy 
 only squares!!! ) 
 
 Thanks in adv...
 
 Thanks Regards,
 Daya
 
 
 
 
 
 From: suzuki toshiya [mpsuz...@hiroshima-u.ac.jp]
 Sent: Tuesday, June 26, 2012 1:06 PM
 To: Daya Devi K (WT01 - Product Engineering Services)
 Cc: freetype@nongnu.org
 Subject: Re: [ft] Rendering chinese characters
 
 In addition, if you're working on Unix like systems, please try ftview 
 command.
 It will show the glyphs in the font without consideration if they are 
 accessible via some character code,
 so it might be helpful to know if the font supports non-BMP characters.
 
 Regards,
 mpsuzuki
 
 suzuki toshiya wrote:
 Hi,

 Basically, if glyph index returned by FT_Get_Char_Index() is zero,
 the font is expected to lack the glyph for the character code passed
 to FT_Get_Char_Index().

 Regards,
 mpsuzuki

 daya@wipro.com wrote:
 Hi,

 I don't know how to check whether a character is present in the font file 
 or not
 pls anyone let me know the way to find whether a character is present in 
 the font file or not


 Thanks and regards,
 Daya





 -Original Message-
 From: suzuki toshiya [mailto:mpsuz...@hiroshima-u.ac.jp]
 Sent: Tuesday, June 26, 2012 12:14 PM
 To: Daya Devi K (WT01 - Product Engineering Services)
 Cc: freetype@nongnu.org
 Subject: Re: [ft] Rendering chinese characters

 Hi,

 Are you sure that your font file (I don't know what it is) include the 
 character for +0x00027267?
 If you are sure, how you have checked it?

 Regards,
 mpsuzuki

 daya@wipro.com wrote:
 Hi,

 I m using the following piece of code for rendering the  Chinese 
 character and the font file is ming_uni.ttf:

 {
 FT_Library  library;
   FT_GlyphSlot slot;
 FT_Face face;
 FT_Init_FreeType( library );
 FT_New_Face( library,/usr/local/share/ming.ttf,0,face);
 FT_Set_Char_Size(temp_ptr-face,16*64,16*64 ,500,500 );
   slot = face-glyph;
 glyph_index = FT_Get_Char_Index(face,0x00027267);
   printf(Glyph index is %d is \n,glyph_index);
 }

 when I printed the glyph_index ,it is zero...bt  if I use 0xF900 instead 
 of  0x00027267 ,I m able to see the Chinese character..
 My doubt is why  the  FT_Get_Char_Index does not display Chinese character 
  for  Unicode value 0x00027267?
 Is that the problem of font file ,I m using?
 Why I m nt able to get the glyph (or charmap) of 0x00027267 and similar 
 values?

 Please help me..
 Thanks in adv.


 Regards,
 Daya


 Please do not print this email unless it is absolutely necessary