Description
Describe the bug
Font Size 10 pt is recognized in source code but displayed as 9pt in the toolbar
To Reproduce
Steps to reproduce the behavior:
- Change the fontSizeUnit to pt
- Type text and set the size to 10 pt.
- If you inspect the source code of the text there's the correct attribute "font-size: 10pt"
- In the toolbar 9 pt is shown.
Expected behavior
The toolbar should also show 10 pt too
Additional context
It's a problem with convertFontSize in the core.js. First you multiply the 10 with 1.333 and round it: pxSize = math.round(sizeNum * 1.333);
Result is 13,333 and rounded 13.
After that the result get's divided by 1.333 and the pt String added to the result
return math.floor(pxSize / 1.333) + to;
If you divide 13 by 1,333. you get 9,75. This result is rounded down with math.floor. So in the end you've converted the 10 pt to 9pt which is shown in the toolbar.
Im not 100% sure what's the reason for the method at all, so i'm afraid to fix it myself.
Activity