[cl-pdf-devel] Re: [cl-typesetting-devel] Unicode?

Dmitriy Ivanov divanov at aha.ru
Sun Sep 9 09:12:05 UTC 2007


Hello Peter,

| Anyway, after some more investigation, I think the problem goes much
| deeper than just a font metric issue. I looked at the PDF file
| generated when I made the text was (format nil "A~cB" (code-char
| #x2014). In the PDF there's a:
|
|    (A?B) Tj
|
| where the ? is actually the character #x14, i.e. the bottom byte of the
| #x2014 character...

What you see is actually depends on the viewer or editor you are using to
browse the PDF file.

| ... It conceivable that through some proper manipulation
| of external-formats somewhere I could fix that but it wouldn't help
| because, as far as I understand the PDF spec, (...) strings can only
| contain ASCII characters. There is obviously some way to include
| Unicode text (uncoded in UTF-16BE, I believe) in PDFs but it's much
| more involved than just throwing some text between ()'s....

Not exactly. The text strings used outside content streams can only contain
characters in PDFDocEncoding or UNICODE. Literal strings enclosed in (...)
in content streams can contain arbitrary characters and even escape
sequences.

| I think the relevant sections of the PDF spec may be 5.6 Composite
| Fonts and following.

Yes, but this section is rather tough to dig into :-(
--
Sincerely,
Dmitriy Ivanov
lisp.ystok.ru




More information about the cl-pdf-devel mailing list