Skip to content

Some tools to build distance maps / font atlas from truetype fonts.

Notifications You must be signed in to change notification settings

Stupeflix/fontatlas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FontAtlas

Install

$ mkdir build && cd build && cmake .. && sudo make install

Usage

There is two binaries generated by fontatlas.

font_data

Use this binary to generate a json which contains all the meta-data, and all the png atlas file for a given font.

$ font_data ../league.ttf
Generated ../league.ttf.1.png
Generated ../league.ttf.json
$

font_meta_data

This one will generate a binary meta-data file.

$ font_meta_data ../league.ttf
Compute meta data....
Generated ../league.ttf.meta
$

After in our main program, use osgStupeflix::FontAtlas::generateFromChar function to generate the json and png file for a range of characters. Moreover, the function will return the index of the json and png file in which the character is stored. If the index is 2, and the font is league, the files will be:

  • league.ttf.2.png
  • league.ttf.2.json

About

Some tools to build distance maps / font atlas from truetype fonts.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages