What I'm going to say is valid for Acrobat in windows and you should start
there. After working there, worry about xpdf.
Acrobat has a single way to address the glyphs in the fonts with the CID
number. This is the index to the glyph.
There are a number of mappings to simplify our life. One of them is
UniCNS-UCS2-V that maps Unicode (16 bits) to CID and doesn't have all the
characters. Other encoding is HKscs-B5-H that has the mapping from the
extended big5 to the CID. This last mapping is not directly supported in
iText because big5 has 8 and 16 bit characters and that wouldn't fit in the
text strings used in Java. What is needed is a function that converts the
big5 from a byte array to a CID in a string that can then be used with the
font:

BaseFont bfChinese = BaseFont.createFont("MSungStd-Light",
BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);

This function should exist in iText and if you care to wait a couple of
weeks it will be there, together with other encodings.

Best Regards,
Paulo Soares



> -----Original Message-----
> From: Ray Chan [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, January 30, 2003 17:24
> To:   [EMAIL PROTECTED]
> Subject:      [iText-questions] How to convert extended font to CID?
> 
> Could anyone teach me how to convert big5 extended 
> characters(hkscs2001-->ISO/IEC 10646-2:2001) to CID codes (e.g. in java 
> program) so that I can generate and allow all big5 fonts as well as hkscs 
> fonts (in \u format) to be displayed in the output pdf under redhat8.
> 
> I got:
> -big5-iso.txt (conversion table from HK government)
> -5080.Adobe-CNS1-4.pdf (contains many many ... characters and their cid)
> -HKscs-B5-H (from xpdf chinese patch)
> -vert_cjk2.java from paulo
> inside it I had try to create font using:
> BaseFont bfChinese = BaseFont.createFont("MSungStd-Light",
> "UniCNS-UCS2-V",
> BaseFont.NOT_EMBEDDED);
> it failed to display the desired characters because of incorrect cid 
> conversion
> 
> 
> Any help would be appreciated.
> 
> 
> 
> _________________________________________________________________
> The new MSN 8: smart spam protection and 2 months FREE*  
> http://join.msn.com/?page=features/junkmail
> 
> 
> 
> -------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to