Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
![]() |
Embedded TrueType Font gives wrong characters |
Post Reply
|
| Author | |
chandy21
Team Player
Joined: 23 Sep 09 Status: Offline Points: 20 |
Post Options
Thanks(0)
Quote Reply
Topic: Embedded TrueType Font gives wrong charactersPosted: 11 Nov 09 at 1:52AM |
|
Hi all, I am getting some strange behavior with a document I have. I am selecting one of the Fonts which reports to be embedded in the Document as FontType = 4. The FontName reports as "BAAAAA+Arial-BoldMT" (which by convention of "(6 alphanum)+" should be embedded in the document). When I select that Font, or any other embedded one for that matter, the characters I draw using DrawText() come out as totally different characters. The same code works fine in other documents, for example the QuiclPDF Reference Guide. Any clues as to what could be different with this document? Font Encoding perhaps? I have tried to set that to a couple of different values to no avail. I am testing with the following PDF: http://help.joomla.org/ghop/feb2008/task048/joomla_15_quickstart.pdf For exmaple, the following sentence: "Joomla! 1.5: Quick Start Guide" comes out as: " w L2h " Any help would be greatly appreciated, Thanks, Ando. |
|
![]() |
|
Ingo
Moderator Group
Joined: 29 Oct 05 Status: Offline Points: 3530 |
Post Options
Thanks(0)
Quote Reply
Posted: 11 Nov 09 at 6:19AM |
|
Hi Ando!
The pdf was made with OO 2.3 Writer - that's the problem. Please send your bug description and the link to the Joomla-pdf to the official support-adress. Thanks. Cheers, Ingo |
|
![]() |
|
chandy21
Team Player
Joined: 23 Sep 09 Status: Offline Points: 20 |
Post Options
Thanks(0)
Quote Reply
Posted: 11 Nov 09 at 6:23AM |
|
Hi Ingo, Thanks for your reply. Is there a known problem with documents created by OO Writer? Is it just a matter of selecting a different Encoding? Or is this maybe a Unicode issue? I am seeing the Fonts, it just seems that the Char Glyphs don't line up when I DrawText and that I get the wrong Glyph. Thanks in advance, Ando. |
|
![]() |
|
DELBEKE
Debenu Quick PDF Library Expert
Joined: 31 Oct 05 Location: France Status: Offline Points: 151 |
Post Options
Thanks(0)
Quote Reply
Posted: 11 Nov 09 at 7:35AM |
|
Hi Ando
The embedded font is probably subsetted and don't containt all the glyphs.
This is often used when you have unicoded string
|
|
![]() |
|
chandy21
Team Player
Joined: 23 Sep 09 Status: Offline Points: 20 |
Post Options
Thanks(0)
Quote Reply
Posted: 11 Nov 09 at 9:08AM |
|
Hi Debelke, If I try to write the same string as is there now, it comes out with incorrect Glyphs. I extracted the text and it is correct, I then try to do DrawText() with that SAME string, and it is illegible. I have tried GetSubsetFont() also, and that only returns what I send in, so no remapping of characters. Could it be that I am somehow needing to use Unicode strings into DrawText()? I am using C# with the ActiveX library. Thanks in advance, Ando. |
|
![]() |
|
chandy21
Team Player
Joined: 23 Sep 09 Status: Offline Points: 20 |
Post Options
Thanks(0)
Quote Reply
Posted: 17 Nov 09 at 4:15AM |
|
When I extract one of these Fonts using SaveFontToFile(), the Font comes out as a 31kb file, but when I try to Load it back into a Document using AddTrueTypeFontFromFile() the function fails with a return value of 0. I am guessing the Font has problems, but it appears to display Ok in the original Document, so I am confused. Any further thoughts? Thanks in advance, Ando. |
|
![]() |
|
Rowan
Moderator Group
Joined: 10 Jan 09 Status: Offline Points: 398 |
Post Options
Thanks(0)
Quote Reply
Posted: 24 Nov 09 at 2:38AM |
|
Hi Ando,
The SaveFontToFile function will only work with TrueType fonts that are fully embedded within a document. If the font is an embedded subset, then this function won't work. Cheers, - Rowan.
|
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store