New Forum | Previous | Next | (P-PDF) Developers
Topic: FONT NAME EXTRACTION
Conf: (P-PDF) Developers, Msg: 133242
Date: 5/24/2005 04:01 PM
i have yet another question regarding the PDF format. This time its
regarding the FONT-NAME.
I have studied about the fonts and whenever the PDF gives the name of
the Basefont , it tends to remove the spaces between words. For
example it will name Arial Black font as ArialBlack (without the space). I
read the PostScript Language Reference Manual Third Edition and just
before section 5.3 they have said that it is customary to remove the
spaces to limit the name length to less than 40 characters.
Now I am looking towards using this font name to be applied to text, but
if I use this name I will not get perfectly correct results. So is there any
way where I can extract the correct font name from this entry. One way
I thought of doing this is - after studying a few fonts I found that the
general flow is like if there is Capital Letter then there has to be a space
before that just like in the case of Arial Black. Another example will be
the simple font -Times New Roman which PDF gives as TimesNewRoman
(again without spaces). But we can observe a generalization here.
However I will be failing in the case of certain fonts like PMingLiU or
SimSun or for that matter the other CJK fonts which are not named in
Roman characters but are 2 byte representations for each character.
Is any generalised solution possible for this problem ?
Thanks and regards
Jai Praful Ved