New Forum | Previous | Next | (P-PDF) Beginners
Topic: CJK Font width with '/W' entry
Conf: (P-PDF) Beginners, Msg: 132668
Date: 5/13/2005 02:56 PM
I have posted this topic on the PDF Developers forum as well. but as this
one deals with basics of the PDF , i am posting it here as well.
I have doubts regarding picking up widths of CJK fonts from the "/W"
entry. Can someone help me out with this regards. Actually if a complete
explanation on how to get the correct widths from the "/W" entry is
possible that would be really nice, else I have some examples to share
from which if an explanation can be derived. Actually the problem I am
facing is to map the correct width for a particular character.
* The font that is given is ???
* Its encoding is given as KSCms-UHC-H
* The /W entry is /W [ 1 94 500]
* Also DW is given as 1000 and MissingWidth is given as 500.
* Which takes preference (DW or MissingWidth) ??
* Now as per the PDFReference we have the widths given for CID 1 to
The text string which has to applied this font is given as
Tj . This is a text string for the text ???? .
* Now when we look into the Cmap of KSCms-UHC-H we see that the CID
we get equivalent to
B1E2 is 1245,
BEF7 is 2488,
BAD0 is 2073,
BCAE is 2227.
Now how do we map the font width per character ?
We see that the widths have been given only for CIDs 1 - 94. So in this
case should the width be picked from DW entry (or MissingWidth) or is
there some other way to pick the widths. Or is it that what I have
understood from the PDFReference is wrong ?
* The font that is given is PPALKG+H2gtrE
* Its encoding is given as Identity-H
* The /W entry is /W [ 71 [ 333 ]
76 [ 855 ]
79 80 376
83 [ 291 ]
85 [ 291 375 595 ]
88 96 595
105 [ 708 ]
108 [ 671 ]
110 [ 740 765 ]
115 [ 638 ]
117 [ 775 ]
119 [ 654 ]
122 [ 625 ]
136 [ 541 ]
138 [ 541 ]
143 [ 574 289 ]
155 [ 359 566 ]
160 [ 587 ] ]
Also the ToUnicode entry is given. So whatever text string we get, will
now have to be mapped through this ToUnicode entry.
The text string given is <2CEE260A>Tj . The actual string that will be
displayed is ??. The equivalent unicode entries in the ToUnicode entry
are C804 and C120.
How will the mapping of widths for this case happen?
P.S. If we look into the CMAP for Identity-H we find that the CID for 2CEE
is 2CEE itself and for 260A is 260A itself.
These are 2 examples i have managed to catch hold of right now. I can
put more of such examples maybe later if required.
I hope I can receive some help with this issue.
Thanks and Regards
Jai Praful Ved