read advance from JSON
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
7fa1c279ce
commit
d22c95a493
|
@ -127,7 +127,7 @@ typedef struct PackedChar
|
|||
{
|
||||
float atlasLeft, atlasTop, atlasRight, atlasBottom;
|
||||
float planeLeft, planeTop, planeRight, planeBottom;
|
||||
int xAdvance;
|
||||
float xAdvance;
|
||||
} PackedChar;
|
||||
|
||||
typedef struct CharRange
|
||||
|
@ -436,9 +436,7 @@ Wellspring_Font* Wellspring_CreateFont(
|
|||
font->packer.ranges[charRangeIndex].data = Wellspring_realloc(font->packer.ranges[charRangeIndex].data, sizeof(PackedChar) * font->packer.ranges[charRangeIndex].charCount);
|
||||
|
||||
PackedChar *packedChar = &font->packer.ranges[charRangeIndex].data[font->packer.ranges[charRangeIndex].charCount - 1];
|
||||
|
||||
int bearing;
|
||||
stbtt_GetCodepointHMetrics(&font->fontInfo, codepoint, &packedChar->xAdvance, &bearing);
|
||||
packedChar->xAdvance = json_object_get_double(currentGlyphObject, "advance");
|
||||
|
||||
if (json_object_has_key(currentGlyphObject, "atlasBounds"))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue