Skip to content
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

User-installed font not usable in custom theme CSS #8523

Closed
2 tasks done
pcdi opened this issue Feb 23, 2022 · 2 comments · Fixed by #10627
Closed
2 tasks done

User-installed font not usable in custom theme CSS #8523

pcdi opened this issue Feb 23, 2022 · 2 comments · Fixed by #10627
Labels
bug Confirmed bugs or reports that are very likely to be bugs status: depends-on-external A bug or issue that depends on an update of an external library

Comments

@pcdi
Copy link

pcdi commented Feb 23, 2022

JabRef version

Latest development branch build (please note build date below)

Operating system

Windows

Details on version and operating system

Microsoft Windows 10 Enterprise Version 20H2 (Build 19042.1526)

Checked with the latest development build

  • I made a backup of my libraries before testing the latest development version.
  • I have tested the latest development version and the problem persists

Steps to reproduce the behaviour

JabRef 5.6--2022-02-22--d98a603
Windows 10 10.0 amd64
Java 17.0.2
JavaFX 17.0.2-ea+3

It is not possible to use user-wide installed fonts in custom themes as described in the documentation.

On Windows 10, fonts can be installed either for all users (requiring admin privileges) or for a single user, as shown in the picture below.
https://i.stack.imgur.com/FebTI.jpg
The option Install installs fonts into C:\Users\<Username>\AppData\Local\Microsoft\Windows\Fonts, while Install for all users installs fonts into C:\Windows\Fonts.

Fonts that are not installed system-wide cannot be used in the user CSS, so the following example does not work:

/* Biblatex Source Code */
.code-area .text {
    -fx-font-family: "DejaVu Sans";
}

Steps to reprooduce

  1. Install a font as a non-admin user (e.g. DejaVu Fonts)
  2. Create a CSS file with the above code.
  3. Set JabRef to use that CSS file under Preferences > Appearance > Visual theme

Appendix

No response

@pcdi pcdi changed the title User-installed font User-installed font not usable in custom theme CSS Feb 23, 2022
@Siedlerchr Siedlerchr added status: depends-on-external A bug or issue that depends on an update of an external library bug Confirmed bugs or reports that are very likely to be bugs labels Feb 23, 2022
@Siedlerchr
Copy link
Member

Thanks for the feedback! This seems to be a java/JavaFX Bug:
https://bugs.openjdk.java.net/browse/JDK-8281327
Meanwhile, I guess it makes sense to adjust the documentation and add a section for Windows regarding custom fonts.
https://github.com/JabRef/user-documentation
It would be nice if you add a section.

@Siedlerchr
Copy link
Member

We just upgraded to javafx 21 where this bug is solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs status: depends-on-external A bug or issue that depends on an update of an external library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants