I have a problem with generating a PDF file. I have embedded the font by using a /ToUnicode character map. Then I've written the glyph IDs as a text stream.
The strange thing is: I can select and copy text from the PDF into other applications an paste the text. This works with every character, even russian, greek, etc. However, the text does not display on-screen.
Below is the structure of my PDF:
The PDF itself is available at: https://drive.google.com/file/d/0B9J8lfyB3w2PX3R3N0dfT0VhRTA/view?usp=sharing
If I view this PDF inside a browser (Firefox or Chrome), the text "Hello" shows up. If I open this PDF inside Adobe Reader or other document viewers such as xpdf or the Linux document viewer, the glyphs do not show up.
I have set the Encoding to Identity-H and created a valid /ToUnicode table. I've set the Font as CIDFontType0 / (CIDFontType0C in the FontDescriptor). The FontFile3 contains a full copy of the .otf file of the font "Asimov", since I wanted to embed the complete font.
The Linux PDF viewer tells me that the font is embedded:
I can't figure out why the text isn't displaying. I wrote the text by looking up the glyph ID for the font. What do I need to do in order to make the font show up?