JabRef / jabref

Graphical Java application for managing BibTeX and biblatex (.bib) databases
https://devdocs.jabref.org
MIT License
3.63k stars 2.59k forks source link

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

Closed pcdi closed 1 year ago

pcdi commented 2 years ago

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

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

Siedlerchr commented 2 years ago

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 commented 1 year ago

We just upgraded to javafx 21 where this bug is solved