Skip to content

A textcircle with no font-size raises Undefined array key "fontsize" warnings #645

Closed

Description

@jakejackson1

A <textcircle> with no font-size raises three PHP warnings when the document is written.

$mpdf = new \Mpdf\Mpdf(['mode' => 'c']);
$mpdf->WriteHTML('<textcircle r="30mm" top-text="Hello" />');
$mpdf->Output('', 'S');
Undefined array key "fontsize" @ src/Mpdf.php:8058
Undefined array key "fontsize" @ src/Mpdf.php:8430
Undefined array key "fontsize" @ src/Mpdf.php:8433

The text circle's object is drawn without a fontsize key when neither the tag nor CSS sets one. It should fall back to the current font size.

Reproduced on gravitypdf at e685435, on PHP 8.5. Found while working on #644.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions