Skip to content

Justify text with any custom font does not work #3261

Closed
@nApTu3aHs

Description

@nApTu3aHs

U can see bug here: https://mrrio.github.io/jsPDF/
Code:

var doc = new jsPDF();
doc.addFont("test/reference/PTSans.ttf", "PTSans", "normal");

doc.setFont("PTSans"); // set font
doc.setFontSize(10);
doc.text("А ну чики брики и в дамки! А ну чики брики и в дамки! А ну чики брики и в дамки! А ну чики брики и в дамки! А ну чики брики и в дамки! А ну чики брики и в дамки! А ну чики брики и в дамки! А ну чики брики и в дамки! А ну чики брики и в дамки! ", 10, 10, {
        align: "justify",
        maxWidth: 100,
});

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