Print Page | Close Window

Font problems with LoadFromCanvasDC

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3006
Printed Date: 01 May 24 at 3:43AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Font problems with LoadFromCanvasDC
Posted By: Johan Havner
Subject: Font problems with LoadFromCanvasDC
Date Posted: 11 Nov 14 at 3:45PM
I am using QuickPdf to convert a series of GDI+ commands to a PDF, via the LoadFromCanvasDC function.
This mostly works well, but if I use characters with uncommon fonts e.g. Webdings, they just doesnt show up. 

The strange thing about this is that if I use LoadFromCanvasDC with the 0 option (0 = Process the drawing commands as vector graphics, fonts are not embedded) then the characters actually show up, but when I use any of the other options, the symbols are invisible. it's still possible to select them (if you can guess where they are om the page) and if I Copy-Paste them in a texteditor, the ansi character representation comes out.

Of course I can also use the -1 option to get everything i n a single image, but as I will need to be able to serch text and also to be able to view the resulting pdf on multiple platforms, I really need to embed the fonts (or subsets there of) in my PDF.

Any suggestions for a working solution will be appriciated.



Replies:
Posted By: Johan Havner
Date Posted: 13 Nov 14 at 7:22AM
Update: the symbol I was after was a small i encircled. As I searched fo a solution, I found that this character occurs (with small variations) in several places in unicode. 

What finally worked, was switching from writing the letter i in 'Webdings' font to write U+24d8 in 'Arial Unicode MS' instead. The effect is the same: A subset of the font is embedded in the document. But this approach works and shows the glyph i want*, even when viewed on different platforms, so hurray for that!

The real question remains: Why did it not work to embed Webdings, when Arial Unicode MS worked exactly as it should?





*To be clear, an 'i' printed in Webdings does not look exactly the same as 'U+24d8' in Arial Unicode MS, but it works just as well for me, since I was only after an encircled small letter i


Posted By: AndrewC
Date Posted: 19 Nov 14 at 10:44AM
Johan,

WebDings and other Symbol fonts are using a different encoding table which it not currently supported by the EMF import functions such as LoadFromCanvasDC. This is on our todo list for an upcoming version.

Andrew.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk