Skip to content

PowerShell script to easily convert a font file to GFX format.

Notifications You must be signed in to change notification settings

antond15/gfx-font-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to use

  1. Run the convert.ps1 script
  2. Drag and drop your font file to the PowerShell window
  3. Confirm and enter prompt details
  4. Add the new .gfx file from output folder to your script's stream folder
  5. Register the font in-game

Example of registering the custom font in game

RegisterFontFile('Arial') -- File name without file extension
local fontId = RegisterFontId('Arial') -- Font name you entered in the convert script
local fontText = '<font face="Arial">This text will have the Arial font</font>'

Common issues

PowerShell closes automatically after running it

To fix that you need to change the execution policy.

  1. Open PowerShell as Administrator
  2. Type Set-ExecutionPolicy RemoteSigned
  3. Type Y to confirm

"FreeType does not like"...

This is caused by having a whitespace in the font file path.
Only way you can fix this is by moving the font file to another folder, without a whitespace in it's path.
More info can be found in issue #1.

Credits

About

PowerShell script to easily convert a font file to GFX format.

Topics

Resources

Stars

Watchers

Forks