Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8328750

[TestBug] Improve Stub Font Support

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • jfx23
    • jfx22
    • javafx
    • b11
    • generic
    • generic

    Description

      While writing tests for JDK-8186188, I figured out that the stub font support should be improved.

      It 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

      It is not a goal to have some kind of support for fonts on the system - it is good that they are mocked/stubbed. But an existing font and some rules/tests for the stub would make this more clear and easier to mock and test text layout.

      Attachments

        Issue Links

          Activity

            People

              mhanl Marius Hanl
              mhanl Marius Hanl
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: