Add Text Justification Options - #285
Conversation
Codecov Report
@@ Coverage Diff @@
## main #285 +/- ##
=====================================
Coverage 83% 83%
=====================================
Files 222 222
Lines 12211 12266 +55
Branches 1761 1779 +18
=====================================
+ Hits 10191 10248 +57
+ Misses 1591 1586 -5
- Partials 429 432 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
|
You seem to have zero test coverage for validating the justification. 2 test cases I can think of,
Additionally how does this effect rtl and ttb etc, they should also be accounted for in the tests. |
|
@tocsoft Yeah... Trying to figure out some way of testing things. It's a meaty gap. I think I can also calculate for the Regarding RTL and TTB layouts. They all use the same ScaledAdvance to operate so this will automatically work for all layout versions. I'll try and add tests though. |
|
@tocsoft I've added some tests. In order to do so I was required to add a new method to |
Prerequisites
Description
Prompted by this Stack Overflow question This PR adds a new
TextJustificationenum toTextOptions. The options and implementation supporting theCSS Text Module Level 3 text-justify property.
Horizontal
TextJustification.NoneTextJustification.InterWordTextJustification.InterCharacterVertical
TextJustification.NoneTextJustification.InterWordTextJustification.InterCharacter