Changes between Version 3 and Version 4 of Font_Builder2


Ignore:
Timestamp:
Mar 18, 2021, 3:21:30 PM (3 years ago)
Author:
Langbart
Comment:

Troubleshooting macOS

Legend:

Unmodified
Added
Removed
Modified
  • Font_Builder2

    v3 v4  
    33This font builder is a python script that converts font files into pre-rendered glyph collections to be used in the game. This means fonts have to be pre-rendered for all combinations of styles (bold, italic, different sizes ...) that are used in the game. These glyph collections get a certain name that can be used in the GUI system.
    44
    5 Fonts are compiled by just running the [[http://trac.wildfiregames.com/browser/ps/trunk/source/tools/fontbuilder2|fontbuilder.py]] script with python2. 
     5Fonts are compiled by just running the [[http://trac.wildfiregames.com/browser/ps/trunk/source/tools/fontbuilder2|fontbuilder.py]] script with python2.
    66
    77== Adding new fonts or replacing fonts ==
    8 
    98To add a new font, you place the font files in the [[http://trac.wildfiregames.com/browser/ps/trunk/binaries/data/tools/fontbuilder/fonts|binaries/data/tools/fontbuilder/fonts]] directory. Then you modify the [[http://trac.wildfiregames.com/browser/ps/trunk/source/tools/fontbuilder2/fontbuilder.py|fontbuilder.py]] script to render those fonts. The font variations are controlled near the end of the file. Note that, unless you're redesigning the entire GUI, the names in the fonts array still need to contain all names used in the GUI files.
    109
     
    1312== Fallback fonts ==
    1413TODO (see r14853)
     14
     15== Troubleshooting ==
     16Using the ''fontbuilder.py'' tool on '''macOS''' 10.15.7 with Homebrew
     17
     18 * Install the following formulas '''brew install python@3.9 cairo py3cairo'''
     19 * Open this file: '' 0ad/source/tools/fontbuilder2/!FontLoader.py'' and apply the following changes:
     20   * ft_lib = "libfreetype.so.6" --> ft_lib = "libfreetype.dylib"
     21   * lc_lib = "libcairo.so.2" --> lc_lib = "libcairo.dylib"
     22 * Now open terminal and run '''python3 fontbuilder.py '''