MCPcopy Create free account
hub / github.com/MyGUI/mygui / getFontCoordinateScale

Function getFontCoordinateScale

MyGUIEngine/src/msdfgen/ext/import-font.cpp:104–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104static double getFontCoordinateScale(const FT_Face &face, FontCoordinateScaling coordinateScaling) {
105 switch (coordinateScaling) {
106 case FONT_SCALING_NONE:
107 return 1;
108 case FONT_SCALING_EM_NORMALIZED:
109 return 1./(face->units_per_EM ? face->units_per_EM : 1);
110 case FONT_SCALING_LEGACY:
111 return MSDFGEN_LEGACY_FONT_COORDINATE_SCALE;
112 }
113 return 1;
114}
115
116GlyphIndex::GlyphIndex(unsigned index) : index(index) { }
117

Callers 4

getFontMetricsFunction · 0.85
getFontWhitespaceWidthFunction · 0.85
loadGlyphFunction · 0.85
getKerningFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected