Print Page | Close Window

Determine the current font

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=2770
Printed Date: 21 Dec 25 at 3:58PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Determine the current font
Posted By: hrdware
Subject: Determine the current font
Date Posted: 24 Oct 13 at 9:44PM
I need to be able to switch between normal and bold fonts for different font sets, ie courier and helvetica.  Is there a way for the PDF library to return what the current font is?  I don't want to go from courier to helvetica bold by accident.



Replies:
Posted By: Rowan
Date Posted: 25 Oct 13 at 2:51AM
Hi hrdware,

You can use the SelectedFont function to determine the ID of the selected font.

So for example, if you add a font using the AddStandardFont function it will return a font ID if the font is successfully added. If you add multiple fonts keep track of the different ID's and then use the SelectFont function to which between the fonts. If you are not sure which font is selected then use the SelectedFont function to get the ID of the selected font.

I hope this helps.

Cheers,
- Rowan.



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