Skip to content

Courier monospace issues #160

@PartialVolume

Description

@PartialVolume

Apologies first, hopefully I'm not doing something daft but I have the following problem with rendered courier text.

Using the commands:

 pdf_set_font( pdf, "courier" );
 pdf_add_text( pdf, NULL, "Make:AaBbCcDdEeFf!23D?~|\\/", 14, 60, 410, PDF_GRAY );

which results in pdfgen rendered text that looks like this
Image

this is the same text rendered in libreoffice using courier which looks much more legible.
Image

There seems to be multiple problems:

  • It looks like both upper and lower case use the same font width, but lower case is rendered right in the font width and upper case is rendered left in the font width resulting in large gaps and no gaps between characters.
  • Looking at the two slash characters they overlap.
  • It looks like symbols don't use the same font width as the letters but have a font width the size of the symbol making them look squashed and over lapping as is the case with back slash, forward slash /

Is this something that can be fixed relatively easily or has it already been fixed. I looked through the open/closed/PRs but didn't spot any fixes.

I tried both 12 and 14 font sizes and the behaviour was the same. Also helvetica and helvetica-bold don't have any issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions