Skip to content

Font contructor won't load font anymore (with workaround)Β #970

Open
@JanBuerger

Description

@JanBuerger

This isn't setting the font to courier anymore, it defaults to LiberationSans :
final Font font = new Font(Font.COURIER, fontsize, Font.NORMAL)
final PdfPCell c = new PdfPCell(new Phrase(myText, font));

image

This seems to fix it:
final Font font = fontFactoryImp.getFont("Courier", fontsize, 0);
final PdfPCell c = new PdfPCell(new Phrase(myText, font));
image

Can you please remove or update the broken Font constructor?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions