Skip to content

Allow fractional font sizes #181

@JonasBuerger

Description

@JonasBuerger

Is your feature request related to a problem? Please describe.
I am trying to recreate a PDF file that was originally generated with TCPDF+FPDI.

There using fractional font sizes such as 10.5 was possible. Currently in tc-lib-pdf, font sizes appear to be limited to int|null, which prevents me from matching the original document layout.

Describe the solution you'd like
Opening the types on \Com\Tecnick\Pdf\Font\Stack::insert as well as \Com\Tecnick\Pdf\Font\Stack::cloneFont to int|float|null.

Describe alternatives you've considered
I tried using addHTMLCell with CSS font-size: 10.5pt; but it seems to round the size when I compare it with our original version.

Additional context
This would mainly help with compatibility when migrating or recreating documents that were previously generated with TCPDF.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions