From: Vincent Fourmond Date: 2007-02-17T19:48:39+09:00 Subject: Re: PDF::Writer and Unicode --------------020504030704030008010408 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Xavier Noria wrote: > On Feb 16, 2007, at 2:49 PM, Vincent Fourmond wrote: > >> Moreover, in this particular case, you are using the Helvetica >> built-in font, and I'm pretty sure it doesn't have glyphes for a Euro >> symbol. > > Austin explained the issue. But to understand that remark in any case, > is that Helvetica in the PDF different from the Helvetica I use in the > system? The Helvetica here in the Mac certainly has the euro symbol. Well... It is a long and complex story. A font is (for the PDF document) just a correspondance (char) -> (nice drawing + metrics). What we call Helvetica is in real a fair number of different fonts, which cover various symbols that have a helvetica look & feel... Even if a font is called helvetica, you can't be assured that there are all the glyphs you're interested in inside it. And I don't even speak about more delicate things like fonts with Chinese or Russian characters... I didn't mean to exaggerate when I wrote 'nightmare' ;-) ! But, in this particular case, I was wrong ;-)... I checked up in the PDF documentation, which specifies char codes for the Euro symbol. The real problem was that the font encoding wasn't the right one. I tweaked manually the file until I could get it. See the problems with the encodings and fonts: I spent a long time trying to get the char \240 displayed as Euro until I realised the encoding wasn't quite the right one and \240 meant 'unbreakable space' ! I attached the file just for the example. Cheers Vince -- Vincent Fourmond, PhD student (not for long anymore) http://vincent.fourmond.neuf.fr/ --------------020504030704030008010408 Content-Type: application/pdf; name="euro_symbol.pdf" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="euro_symbol.pdf" JVBERi0xLjMKJeLjz9NcbgoxIDAgb2JqCjw8IC9UeXBlIC9DYXRhbG9nCi9PdXRsaW5lcyAy IDAgUgovUGFnZXMgMyAwIFI+PgplbmRvYmoKMiAwIG9iago8PCAvVHlwZSAvT3V0bGluZXMg Pj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzCi9LaWRzIFs2IDAgUgpdCi9Db3Vu dCAxCi9SZXNvdXJjZXMgPDwKL1Byb2NTZXQgNCAwIFIKL0ZvbnQgPDwgCi9G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