Fonts - bold and italics

This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-Tools SDK of Library DLL functions(only) - Please use the PDF-XChange Drivers API SDK Forum for assistance with all PDF Print Driver related topics.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Sean - Tracker, Chris - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software, Andrew - Tracker Support, Tracker - Clarion Support, John - Tracker Supp, Support Staff, moderators

Post Reply
ken66
User
Posts: 50
Joined: Mon May 16, 2005 5:10 pm

Fonts - bold and italics

Post by ken66 » Wed May 25, 2005 9:50 pm

I have been trying to set my font to bold or italic doing the following:

PXC_AddFontA(m_pdf_pt, FW_BOLD, FALSE, "Arial Unicode MS", &fontId);
PXC_SetCurrentFont(m_page, fontId, 12);

and

PXC_AddFontA(m_pdf_pt, FW_NORMAL, TRUE, "Arial Unicode MS", &fontId);
ret = PXC_SetCurrentFont(m_page, fontId, 12);

I could not get this to work. I tried the following though and it worked but I'm not sure why.

PXC_AddFontA(m_pdf_pt, FW_NORMAL, FALSE, "Arial Unicode MS Bold", &fontId);
PXC_SetCurrentFont(m_page, fontId, 12);

and

PXC_AddFontA(m_pdf_pt, FW_NORMAL, FALSE, "Arial Unicode MS Italic", &fontId);
PXC_SetCurrentFont(m_page, fontId, 12);

This doesn't match your example code and I'm not sure what the dwWeight and bItalic arguments do. Does this make sense or am I missing something again?[/list]

John - Tracker Supp
Site Admin
Posts: 8202
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Thu May 26, 2005 10:24 am

Hi Ken,

This is because Arial Unicode MS font does not offer Bold or Italic variants (just Normal) and the font has been embedded and therefore used - but the required style cannot be supported.

Therefore when the font name "Arial Unicode MS Italic" for example is passed to the library we write this font name into the PDF, and Adobe uses Windows' emulation for drawing the font in this event and italic supported - if the font has not been embedded.

If the font is embedded it will be used, even if there is "Italic" in the name (but itallic will not be supported) and no emulation occurs to emulate the required style.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

ken66
User
Posts: 50
Joined: Mon May 16, 2005 5:10 pm

Post by ken66 » Tue May 31, 2005 11:10 pm

Is there a unicode font that supports bold and italics without using the emulation?

John - Tracker Supp
Site Admin
Posts: 8202
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Wed Jun 01, 2005 8:08 am

Hi Ken,

to be honest almost all fonts in my system offer unicode, but if you require Japanese then I did not find any bold or italic Unicode fonts in my system by default.

For Arabic there are two fonts with bold variant (but not with italic): TraditionalArabic and SimplifiedArabic

But then I do not have Japanese Windows installed - this may be different.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

Post Reply