Page 1 of 1

PXC_AddFontW generic TTF fonts: bold, italic and bolditalic

Posted: Thu Jul 05, 2018 12:43 pm
by Marcin95777
Hi,
I have a question about abilities of function PXC_AddFontW in pxclib40.dll, as for creating or making Windows to produce a generic bold, italic and bolditalic fonts.
Windows apparently can do it, since when having only a single file with a given font, we can still use bold, italic and bolditalic fonts. windows generates them "when needed."
However, when creating a pdf using pxclib40.dll, this cannot be achieved and only regular font is in obtained pdf document.

I tried using PXC_AddFontW, which have arguments for bold and italic parameters, but I suspect, that when a "physical" file is not found in the Windows (fonts folder?) then the library does not use it.
But maybe it can use this ability somehow, and I am not using correct functions?
Observing the argument out from this method, the last parameter, which is pointer to the font, when having only regular font file, it is the same for all 4 cases: regular, italic, bold and bolditalic. For a font, that has these multiple files, I get values different for: regular, bold, and italic, bolditalic (these last two have the same value). This suggests, presence of these separate files is required and pxclib40.dll does not use windows ability to mimic these fonts.
Is this by design?

Thank you,
Marcin

Re: PXC_AddFontW generic TTF fonts: bold, italic and bolditalic

Posted: Thu Jul 05, 2018 12:47 pm
by Will - Tracker Supp
Hi Marcin,

Please be aware that you have posted in our end user forums, which are not actively monitored by our developers. Are you using the PDF-Tools SDK, or the CoreAPI SDK? I'll need to know so that I can move the topic to the appropriate forum.

Thanks,

Re: PXC_AddFontW generic TTF fonts: bold, italic and bolditalic

Posted: Fri Jul 06, 2018 7:36 am
by Marcin95777
Hi,
Thank you for your message.
The dll I have is file version: 4.0.0201.0000
PDF-XChange Library

If this is sufficient?
---
We keep it in folder "pdftools", but it may not mean exactly what we use.

Re: PXC_AddFontW generic TTF fonts: bold, italic and bolditalic

Posted: Mon Jul 09, 2018 9:06 am
by Will - Tracker Supp
Hi Marcin95777,

Thanks for the post, but we'll need to identify the specific version you're using and the latest you're entitled to use from your license info.
**Please do NOT post license info. here!

Please email us at support@pdf-xchange.com with a link back to this topic and your license key, then we should be able to assist further.

Thanks,

Re: PXC_AddFontW generic TTF fonts: bold, italic and bolditalic

Posted: Mon Jul 09, 2018 11:13 am
by Marcin95777
Hi,
Thank you! I sent an email.
However we have an old license.

Best wishes,
Marcin

Re: PXC_AddFontW generic TTF fonts: bold, italic and bolditalic

Posted: Wed Jul 11, 2018 10:29 am
by Will - Tracker Supp
Hi Marcin,

Sorry for the delay - We've received your email and I sent the question to our developers. Here's what they said:
Regarding simulating Bold/Italic faces when they are missing - we do not offer such functionality, even in new SDK. However this simulation can be simply done by user themselves: To simulate italic they should simply set skew for display matrix.

To simulate bold, there are two possible solutions:
  • Set/Increase stroke width by some degree of font size and change text rendering mode to TextRenderingMode_FillStroke
  • Show same text several times (usually 4) with different small offset in both directions.
Most applications (including our drivers [printers]) prefer method 1, however some others (mostly Chinese, etc. [due to the nature of the characters in their fonts]) prefer method 2.
HTH!