> In https://github.com/openjdk/jfx/pull/1405, I identified some shortcomings > of the stub font implementation. As I don't want to clutter the PR with that, > I decided to cherrypick the improvements I did to a new ticket and PR. > > The current implementation has the following shortcomings: > - It does not reliable detect the System Font, as a consequence, tests in > TableColumnHeaderTest.java are failing on my local machine > - Another consequence of this is, that the font size is always estimated with > 0, as it is not detected > - One shortcoming currently is, that the stub font siie estimate is not > considering bold fonts. That would improve writing tests for some scenarios, > e.g. for TableColumnHeader, where we would expect that the size of the header > is bigger since it is bold > > Some tests were failing for the following reasons: > - `AreaChartTest.java` - `expected -30.0, was -30.00000000004` - I added > rounding to the data. > - `StackedBarChartTest.java` - since we now calculate correctly, the path > changed > - A test tried to load `Helvetica`, which is not supported in the stub font > loader. I changed it > - The default System font is considered a `Regular` one (style) - just like > in JavaFX > > I wrote tests and documented the stub behaviour. > I did some minor changes here: > - System font is now detected, also in bold and italic > - A bold font will be calculated with a little bit more width (1px). Checkout > the test as well for that > > Note: This only changes test setup, no 'production' code.
Marius Hanl has updated the pull request incrementally with one additional commit since the last revision: improve javadoc ------------- Changes: - all: https://git.openjdk.org/jfx/pull/1422/files - new: https://git.openjdk.org/jfx/pull/1422/files/f8909afc..1788ad68 Webrevs: - full: https://webrevs.openjdk.org/?repo=jfx&pr=1422&range=02 - incr: https://webrevs.openjdk.org/?repo=jfx&pr=1422&range=01-02 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jfx/pull/1422.diff Fetch: git fetch https://git.openjdk.org/jfx.git pull/1422/head:pull/1422 PR: https://git.openjdk.org/jfx/pull/1422