Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/lexborisov/Modest.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/myfont/hhea.c')
-rw-r--r--source/myfont/hhea.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/myfont/hhea.c b/source/myfont/hhea.c
index 92cd247..16b97d5 100644
--- a/source/myfont/hhea.c
+++ b/source/myfont/hhea.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2016 Alexander Borisov
+ Copyright (C) 2016-2017 Alexander Borisov
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -20,7 +20,7 @@
#include "myfont/hhea.h"
-myfont_status_t myfont_load_table_hhea(myfont_font_t *mf)
+mystatus_t myfont_load_table_hhea(myfont_font_t* mf, uint8_t* font_data, size_t data_size)
{
memset(&mf->table_hhea, 0, sizeof(myfont_table_hhea_t));
@@ -30,11 +30,11 @@ myfont_status_t myfont_load_table_hhea(myfont_font_t *mf)
myfont_table_hhea_t *thhea = &mf->table_hhea;
const uint32_t table_offset = mf->cache.tables_offset[MyFONT_TKEY_hhea];
- if(mf->file_size < (table_offset + 8 + 6 + 2 + 22 + 2))
+ if(data_size < (table_offset + 8 + 6 + 2 + 22 + 2))
return MyFONT_STATUS_ERROR_TABLE_UNEXPECTED_ENDING;
/* get current data */
- uint8_t *data = &mf->file_data[table_offset];
+ uint8_t *data = &font_data[table_offset];
thhea->version = myfont_read_u32(&data);