New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8191758: Match WebKit's font weight rendering with JavaFX #180
Conversation
Hi @bhaweshkc, welcome to this OpenJDK project and thanks for contributing! We do not recognize you as Contributor and need to ensure you have signed the Oracle Contributor Agreement (OCA). If you have not signed the OCA, please follow the instructions. Please fill in your GitHub username in the "Username" field of the application. Once you have signed the OCA, please let us know by writing If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please use "Add GitHub user bhaweshkc" as summary for the issue. If you are contributing this work on behalf of your employer and your employer has signed the OCA, please let us know by writing |
/covered |
Thank you! Please allow for a few business days to verify that your employer has signed the OCA. Also, please note that pull requests that are pending an OCA check will not usually be evaluated, so your patience is appreciated! |
/reviewers 2 |
@kevinrushforth |
Can you add a unit test to go along with this fix? |
Webrevs
|
Per the opentype spec, 700 is bold. 600 is semi-bold CSS agrees : https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight So are you saying webkit has been using bold at a lower weight than these specs suggest ? I suppose the existing code thinks that if we have reached what that file calls the bold threshold of 600 then we should use bold. It isn't necessarily "wrong" but I think I agree that it is more important to be consistent with the rest of Java FX ... which I believe is the point of this change ? |
@prrace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix and test look good. I confirm that your new test fails without your fix and passes with your fix.
I left one style comment and will approve once you fix that.
modules/javafx.web/src/test/java/test/javafx/scene/web/WebViewTest.java
Outdated
Show resolved
Hide resolved
@bhaweshkc This change now passes all automated pre-integration checks. When the change also fulfills all project specific requirements, type
Since the source branch of this PR was last updated there have been 36 commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid automatic rebasing, please merge As you are not a known OpenJDK Author, an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@kevinrushforth, @arun-joseph) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
/integrate |
@bhaweshkc |
/sponsor |
@kevinrushforth @bhaweshkc The following commits have been pushed to master since your change was applied:
Your commit was automatically rebased without conflicts. Pushed as commit 8ad5805. |
As per JavaFx 700 font weight is considered to be bold but webkit is using 600 font weight for text to become bold. to fix issue, use boldWeightValue() function which uses 700 font weight rather than isFontWeightBold() which compare against 600 font weight.
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jfx pull/180/head:pull/180
$ git checkout pull/180