@@ -41,7 +41,8 @@ typedef struct {
typedef struct {
int current_byte, number_of_glyphs, *glyph_offsets;
- uint16_t *unicode_to_glyph_indicies, units_per_em;
+ uint16_t *unicode_to_glyph_indicies;
+ float units_per_em;
uint8_t *buffer;
SP_glyph *glyphs;
int16_t index_to_loca_format;
@@ -326,7 +326,7 @@ SP_font* SP_load_font(char *filename){
skip_32(font); // magic number
skip_16(font); // flags
- font->units_per_em = get_u16(font);
+ font->units_per_em = (float)get_u16(font);
// skip gibberjabber
skip_32(font); // 64 bit longdatetime