Skip to content

Conversation

hazington
Copy link
Contributor

@hazington hazington commented Dec 30, 2022

Description

Word supports fractional font sizes like 8.5pt, but PHPWord doesn't.

Fixes # (issue)

That fractional font size ist not supported as default font size, while font style elements support fractional font size.

Checklist:

  • I have run composer run-script check --timeout=0 and no errors were reported
  • The new code is covered by unit tests (check build/coverage for coverage report)
  • I have updated the documentation to describe the changes

hazington and others added 16 commits December 30, 2022 21:25
Word supports fractional font sizes like 8.5pt, but PHPWord doesn't.
Add background color support for text box element for Word writer
Word supports fractional font sizes like 8.5pt, but PHPWord doesn't.
…dded type hinting to settings class and unit test coverage for fractional (float) font size.
# Conflicts:
#	src/PhpWord/Settings.php
…dded type hinting to settings class and unit test coverage for fractional (float) font size.
@hazington
Copy link
Contributor Author

hazington commented Jan 4, 2023

@Progi1984

I've added type hinting to the settings class and improved the set default font size method. It now supports both, int and float font sizes. I've also updated the unit tests to cover the new supported fractional font sizes. For an unknown reason the rebase command also added the new textbox code of my other patch that has already been merged to the master branch.

P.S. The docs do not mention that only integer font sizes are supported. So there is no place to edit the docs.

@Progi1984 Progi1984 merged commit aac3a60 into PHPOffice:master Jan 6, 2023
@Progi1984 Progi1984 added this to the v1.1.0 milestone Jan 6, 2023
@Progi1984 Progi1984 self-assigned this Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants