Skip to content

Unable to render non-English letters supported by the font #2

@fatso83

Description

@fatso83

I can't get Orson PDF to display non-English letters contained in the text when not rendering the text as vector graphic. I only get '???' where it should say "ØÆÅ". I have checked that the Font supports this letter using Font#canDisplay() and it is of course installed on the system (checked using Font#getFamily() being not equal to DIALOGUE).

    Font f = new Font("DejaVu Serif", PLAIN, 16);
    graphics2D.setFont(f);
    System.out.println("family" + f.getFamily() + " " + f.getName());
    System.out.println("Can display Ø:" + f.canDisplay('Ø') );

    //vector works
    graphics2D.setRenderingHint(PDFHints.KEY_DRAW_STRING_TYPE, PDFHints.VALUE_DRAW_STRING_TYPE_VECTOR);
    graphics2D.drawString("VECTOR: æøå ØÅÆ", 0, 20);

    //normal text doesn't
    graphics2D.setRenderingHint(PDFHints.KEY_DRAW_STRING_TYPE, PDFHints.VALUE_DRAW_STRING_TYPE_STANDARD);
    graphics2D.drawString("TEXT: æøå ØÅÆ", 300, 20);

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