That Terminal
A terminal emulator designed for video making purposes.
make_similarities.hh File Reference

Builds a similarity map between glyphs. Used internally by FontPlan. More...

#include <vector>
#include <utility>
Include dependency graph for make_similarities.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

std::vector< std::pair< char32_t, char32_t > > ParseSimilarities ()
 

Detailed Description

Builds a similarity map between glyphs. Used internally by FontPlan.

Function Documentation

◆ ParseSimilarities()

std::vector<std::pair<char32_t, char32_t> > ParseSimilarities ( )

Parses the file similarities.dat within ~/.config/that_terminal.

If the file is not found, generates it.

If the file fonts/alias.txt is found (

See also
FindShareFile), it improves the result using that data.

For generating, it reads the following file (

See also
FindShareFile): unicode/UnicodeData.txt
Returns
a vector containing character substitution pairs. Each pair contains a target glyph (unicode character index), and a candidate recipe (approximately similar glyph) for substituting if the target glyph is not available in the font.