OatMeal
OatMeal

Reputation: 121

Fonts installed in Windows not shown in SceneBuilder

I'm just starting with SceneBuilder and JavaFX. I've opened a test project and am checking out SceneBuilder. Added Label to the AnchorPane and wanted to change the font of the text. But I don't see any fonts installed in my system by me. I've already had some fonts installed in Windows before (Next Art, Montserrat, Bebas Neue). Neither of them is shown in SceneBuilder. I didn't find any helpful information on this problem. I've seen youtube videos where people choose their custom fonts directly from SceneBuilder. Am I doing something wrong?

P.S.: I know that I could simply write some code and integrate any font using CSS for example. But yet want to do it in SceneBuilder.

(I use Java SDK v.14.0.2, JavaFX v.11.0.2 and SceneBuilder v.11.0.0)

Upvotes: 4

Views: 1686

Answers (1)

OatMeal
OatMeal

Reputation: 121

Finally, I managed to make it work properly. Yet the answer was in an unanswered question here on the site :D. Well, the reason why SceneBuilder doesn't see my custom fonts is that they weren't installed for all users. Windows 10 stores your custom fonts in this folder:

C:\Users\<username>\AppData\Local\Microsoft\Windows\Fonts

But the system does it if you simply open the font and click "Install" button or drag-and-drop it to Start>Settings>Personalization>Fonts or C:\Windows\Fonts folder.

To make your fonts visible in SceneBuilder on Windows 10

  1. If you already had them installed in your system:

    • backup your font/fonts from C:\Windows\Fonts folder
    • delete it/them from there (otherwise fonts will be doubled later)
  2. Select your custom font/fonts

  3. Right-click it/them and choose Install for all users option (but not Install)

  4. Relaunch your IDE and SceneBuilder.

Now you should be able to choose your custom fonts directly from SceneBuilder. That helped me, thanks to the user d3f4lt.

Upvotes: 8

Related Questions