Forum Stats

  • 3,816,603 Users
  • 2,259,212 Discussions
  • 7,893,517 Comments

Discussions

Get font file as a File object or get its path

User_SVC79
User_SVC79 Member Posts: 1 Green Ribbon

Hi,

I want to get font file as a File object or get its path.

My goal is to copy paste the font file to an another folder.

To do that, I did some research and this is the only solution I found: https://stackoverflow.com/questions/2019249/get-font-file-as-a-file-object-or-get-its-path


The problem of this solution is that it use a really old class that does not seems maintain.

I am saying that, because GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts() show all the font without any problem, but the method on stackoverflow can't find the font in this folder: %userprofile%\AppData\Local\Microsoft\Windows\Fonts

Tagged: