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
8281327: JavaFX does not support fonts installed per-user on Windows 10/11 #1017
Conversation
👋 Welcome back jpereda! A progress list of the required criteria for merging this PR into |
That is great! We have been looking forward to this patch for two years. |
/reviewers 2 |
@kevinrushforth |
|
||
if (ret != ERROR_SUCCESS || | ||
dwMaxValueNameLen >= MAX_BUFFER || | ||
dwMaxValueDataLen >= MAX_BUFFER) { |
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.
This implementation instantly fails if any value or data exceeds MAX_BUFFER
. Wouldn't it be better to only skip the values that are too large, instead of ignoring all values entirely?
Instead of using RegQueryInfoKeyW
, the documentation suggests the following approach:
To enumerate values, an application should initially call the RegEnumValue function with the dwIndex parameter set to zero. The application should then increment dwIndex and call the RegEnumValue function until there are no more values (until the function returns ERROR_NO_MORE_ITEMS).
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.
Please note that this is just a refactoring of the existing code, extracting a method so that it can be called twice, and it is also what the JDK is doing.
If the affected code needs changes, maybe that is for a follow up.
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.
Code looks good and I applied the patch and verified it works as advertised.
@jperedadnr This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 21 new 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 this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
/integrate |
Going to push as commit f4ca00d.
Your commit was automatically rebased without conflicts. |
@jperedadnr Pushed as commit f4ca00d. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
This PR simply applies the patch from JDK-8218914 that solved the same issue for the JDK.
I've tested it on Windows 11 (Version 22H2 Build 22621.1105).
I have the Roboto font installed under C:\Users%user\AppData\Local\Microsoft\Windows\Fonts
and with this PR, -Dprism.debugfonts shows:
Also, I can see that the font is picked in a simple JavaFX application.
Without this PR, the font is not used, and defaults to a system one.
I don't think I can add this as a system/manual test to the PR, though.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx pull/1017/head:pull/1017
$ git checkout pull/1017
Update a local copy of the PR:
$ git checkout pull/1017
$ git pull https://git.openjdk.org/jfx pull/1017/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1017
View PR using the GUI difftool:
$ git pr show -t 1017
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1017.diff