Skip to content

Conversation

rasamassen
Copy link

@rasamassen rasamassen commented Sep 1, 2025

Description

Adds underline styles, doublestrikethrough, smallcaps, allcaps, fgcolor, hidden, scale, spacing, kerning (not sure if the * 2 is correct, but I think it is), position, noproof, and bgcolor.

Does not implement:
shading or lang. Also not sure what "paragraph" is or whether it needs to be implemented.

May break tests for multiple reasons:

  • Font no longer unnecessarily sets \f or \cf if not changed from default.
  • Some settings (notably \rtlch) are in a different order
    (these should be simple fixes, but I'm not sure which tests are broken)

Checklist:

  • My CI is 🟢
  • I have covered by unit tests my new code (check build/coverage for coverage report)
  • I have updated the documentation to describe the changes
  • I have updated the changelog

In combination with next edit...

Sets the fgColor and bgColor according to the colorTable.
Adds underline styles, doublestrikethrough, smallcaps, allcaps, fgcolor, hidden, scall, spacing, kerning, position, noproof, and bgcolor.
Now that Font isn't returning unnecessary values, it could sometimes occur where it returned an extra space in the document if ($content == ''). This is fixed.
In these cases, the array_search should always return an integer, but because the php static analysis tests didn't like the chance that it might return a string, let's explicitly cast the variable as an integer.
@rasamassen
Copy link
Author

This may fix #321? I'm not sure what the bug report means by "export", but I assume they are talking about the RTF Writer?

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

Successfully merging this pull request may close these issues.

1 participant