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

Function getKerning

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

Source from the content-addressed store, hash-verified

251}
252
253bool getKerning(double &output, FontHandle *font, GlyphIndex glyphIndex0, GlyphIndex glyphIndex1, FontCoordinateScaling coordinateScaling) {
254 FT_Vector kerning;
255 if (FT_Get_Kerning(font->face, glyphIndex0.getIndex(), glyphIndex1.getIndex(), FT_KERNING_UNSCALED, &kerning)) {
256 output = 0;
257 return false;
258 }
259 output = getFontCoordinateScale(font->face, coordinateScaling)*kerning.x;
260 return true;
261}
262
263bool getKerning(double &output, FontHandle *font, unicode_t unicode0, unicode_t unicode1, FontCoordinateScaling coordinateScaling) {
264 return getKerning(output, font, GlyphIndex(FT_Get_Char_Index(font->face, unicode0)), GlyphIndex(FT_Get_Char_Index(font->face, unicode1)), coordinateScaling);

Callers

nothing calls this directly

Calls 3

getFontCoordinateScaleFunction · 0.85
GlyphIndexClass · 0.85
getIndexMethod · 0.80

Tested by

no test coverage detected