This site requires JavaScript, please enable it in your browser!
Greenfoot back
Hull
Hull wrote ...

2021/4/5

Using custom .ttf files to create a font

Hull Hull

2021/4/5

#
In my current project, I've run into the issue that not all versions of Windows have the same set of fonts. I intended to use the "Alien Encounters" font, which doesn't seem present on the machines of the people working on this project with me (and my second PC). After doing a small deep dive, I've come across the fonts folder in Windows and reinstalled my version of Alien Encounters, for testing purposes. Ever since that, it's also broken on my PC. By broken, I mean not properly displayed: It's fixed by installing the .ttf for all users on the given device. However, one would have to somehow tell every user of the project to install the font. I don't want that, it's clumsy and seems inconsistent. So my question would be, is there a decent way to create an awt.Font off of a .ttf file within the same directory as the project, and convert that font to a Greenfoot font? That way, I could just ship the project with the appropriate .ttf and not worry about the local system.
You need to login to post a reply.