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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Bold Font
  FAQ FAQ  Forum Search   Register Register  Login Login

Bold Font

 Post Reply Post Reply
Author
Message
skwirelboy View Drop Down
Team Player
Team Player


Joined: 27 Feb 06
Status: Offline
Points: 45
Post Options Post Options   Thanks (0) Thanks(0)   Quote skwirelboy Quote  Post ReplyReply Direct Link To This Post Topic: Bold Font
    Posted: 31 Jan 09 at 5:27AM
Hi,
 
 
Does anyone have a code sample to show how to set the font to bold, italic etc.
 
I need to get this working with the standard pdf fonts and also with added truetype fonts.
 
Have tried SetFontFlags, but can't get it to work. Posted a snippet of code I was using a few weeks ago, but nobody was able to correct it.
 
I can't believe that no-one out there has managed to set font to bold, italic etc for truetype fonts.
 
Thanks for any help.
 
Regards
 
Mark
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 31 Jan 09 at 7:02AM

Hi Mark!

I think you won't find an answer... I've used the search-function (here above) with "bold" ... and i've found your old postings in this case ;-)

Perhaps it's better to post your post and then the other ones here can say what's perhaps wrong with it.

Cheers, Ingo

 

Back to Top
skwirelboy View Drop Down
Team Player
Team Player


Joined: 27 Feb 06
Status: Offline
Points: 45
Post Options Post Options   Thanks (0) Thanks(0)   Quote skwirelboy Quote  Post ReplyReply Direct Link To This Post Posted: 02 Feb 09 at 5:55AM
Hi Ingo,
 
I haven't been able to find an answer on the forum. But does this mean it can't be done or that no-one else has this problem.
 
Basically, if you add a truetype font how do you output the text for that font in bold or italics?
 
Does anyone know?
 
Thanks
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 02 Feb 09 at 7:23AM

Perhaps it's better to post your code and then the other ones here can say what's perhaps wrong with it.



Edited by Ingo - 02 Feb 09 at 7:23AM
Back to Top
skwirelboy View Drop Down
Team Player
Team Player


Joined: 27 Feb 06
Status: Offline
Points: 45
Post Options Post Options   Thanks (0) Thanks(0)   Quote skwirelboy Quote  Post ReplyReply Direct Link To This Post Posted: 02 Feb 09 at 7:27AM
Hi Ingo,
 
I have tried using setfontflags as recommended by another user in an earlier post. The code is:
 
id:=qp.AddTrueTypeFont(FontName, 1);
qp.SelectFont(id);
qp.SetFontFlags(0, 0, 0, 0, 1, 0, 0, 1); //ie bold italic
 
 
This makes no perceptible difference to the font whne drawn.
 
Thanks
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 02 Feb 09 at 4:13PM
Hi Mark!
 
This is from the help-file.
Try a font family with bold or whatever you want.
 
Cheers, Ingo
 
Function AddTrueTypeFont(FontName As String,
                         Embed  As Long) As Long
Parameters
FontName The name of the TrueType font to install. This can either be the name of the font
as shown in the Windows\Fonts folder (for example "Times New Roman Bold") or
it can be the font family name with an optional style specifier in square brackets
(for example "Times New Roman [BoldItalic]"). Possible optional specifiers are:
[Bold], [Italic] or [BoldItalic]. A codepage can also be specified (for example "Arial
[Bold] {1250}") which allows other encodings to be used. The only codepages
supported at the moment are 437, 850, 852, 1250, 1251 and 1255.
Embed Specifies whether to embed the font or not:
0 = Don't embed the font.
1 = Embed the font.
Returns
0 The font could not be added. This may mean that the font is not licensed to be
embedded, or that the font could not be found.
Non-zero The ID of the font that was successfully added.
Back to Top
skwirelboy View Drop Down
Team Player
Team Player


Joined: 27 Feb 06
Status: Offline
Points: 45
Post Options Post Options   Thanks (0) Thanks(0)   Quote skwirelboy Quote  Post ReplyReply Direct Link To This Post Posted: 04 Feb 09 at 7:52AM

Hi Ingo,

Works perfectly. Obviously helps to read the help file properly.

I will post a reply to the earlier thread just to point out that SetFontFlags is not the way to go.

 

Many thanks for your help.

 

Regards

 

MArk

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store