Skip to content

Invalid doc block type hint for SetFont $size #29

Open
@MaximilianKresse

Description

@MaximilianKresse

The current doc block for the $size param of \setasign\SetaFpdf\SetaFpdf::SetFont() is:

@param string $size Font size in points. The default value is the current size. If no size has been specified 
                    since the beginning of the document, the value taken is 12.

Which calls internally \setasign\SetaFpdf\Modules\Font::set() which has the following doc block for $size:

@param string $size

But the size will be written into \setasign\SetaFpdf\StateBuffer\Font::$currentFontSize (without casting) which expects int|float.

The default of Fpdf for this method is also the integer 0 and not an empty string. This should be fixed.

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