Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

OpenType fonts not displayed as bold in PDF

edited March 2013 in General
Hi,

When exporting reports with Open Type fonts as PDF files using
TppPDFDevice or simply selecting PDF in the "Print to file" dialog, I
noticed that bold fonts aren't displayed as such in the PDF viewer -
they are displayed as non-bold, i.e. the normal way. I embedded all the
fonts to the PDF using "PDFSettings.EmbedFontOptions := [efAllFonts]"

Besides that, bold OpenType fonts are correctly displayed in the Report
Bulder's print preview, and they are also correctly displayed in the PDF
if I print the report using PDFCreator.

To reproduce the issue I used the font available here:
http://www.fontspace.com/gluk/rawengulksans (file RawengulkSans-094.otf
in the zip archive). I also tested on a demo copy of RB 14.05 and the
results were the same.

What can I do to fix this issue?

Thanks in advance and regards,
Jure

Comments

  • edited March 2013
    This will be addressed for the next release of ReportBuilder.

    The font you are using does not natively support bold or italic
    characters. When you set Bold or Italic, Windows uses internal logic to
    render the character glyphs as such. PDF with embedded fonts can only
    use the characters available so for your font, bold or italic letters do
    not display correctly.

    For complex Unicode characters we work around this by manually skewing
    letters or re-drawiing them over and over in slightly different
    positions to mimic italic or bold letters. This obviously does not give
    as high quality output as Windows but it is the recommended way to
    perform this task.

    Even with this logic in place, it is highly recommended that you use
    fonts that internally support bold and italic character glyphs if you
    wish to embed the font into your PDF document. For instance, if you
    navigate to the Windows\Fonts directory on your machine and double click
    Arial, you will see that it contains numerous fonts within (Arial, Arial
    Bold, Arial Italic, Arial Bold Italic, etc.).

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2013
    Hi Nico,

    thanks for the thorough answer. If it's possible, I'd only ask one more
  • edited March 2013
    Hi Jure,


    Yes probably. It appears they are also using some sort of font
    substitution with the built-in Type1 fonts. I'm unsure what trick they
    are using but if you can talk them into letting me look at their source,
    I'd be happy to look into it :).

    I added logic to manually render bold and italic styles for all fonts
    (including the one you gave a link to) using the methods described in my
    previous post for the next version of ReportBuilder.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2013
    Nico, thank you again for the explanation.

    Regards,
    Jure

This discussion has been closed.