Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable auto font-size for active forms #1721

Merged
merged 2 commits into from Sep 18, 2022

Conversation

ChrisB9
Copy link
Contributor

@ChrisB9 ChrisB9 commented Sep 16, 2022

Solves issue #834

According to this commit, it seems to be completely enough to just set the font-size parameter within the AcroForm definition to 0.

@finwe
Copy link
Member

finwe commented Sep 17, 2022

Thanks for the PR! Would you please add a changelog entry and a test with a code example showcasing the new functionality?

@ChrisB9
Copy link
Contributor Author

ChrisB9 commented Sep 17, 2022

Done

@@ -70,7 +70,7 @@ public function open($attr, &$ahtml, &$ihtml)
if (isset($properties['FONT-FAMILY'])) {
$this->mpdf->SetFont($properties['FONT-FAMILY'], $this->mpdf->FontStyle, 0, false);
}
if (isset($properties['FONT-SIZE'])) {
if (isset($properties['FONT-SIZE']) && $properties['FONT-SIZE'] !== 'auto') {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder, though, whether we should filter out font-size: 0 too, as it breaks the input and text-area as well.

Maybe like this:
0 = default, auto = /F 0

@finwe
Copy link
Member

finwe commented Sep 18, 2022

This works like a charm. Merging, thanks.

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

Successfully merging this pull request may close these issues.

None yet

2 participants