1 /* 2 Copyright (C) 2016-2017 Alexander Borisov 3 4 This library is free software; you can redistribute it and/or 5 modify it under the terms of the GNU Lesser General Public 6 License as published by the Free Software Foundation; either 7 version 2.1 of the License, or (at your option) any later version. 8 9 This library is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 Lesser General Public License for more details. 13 14 You should have received a copy of the GNU Lesser General Public 15 License along with this library; if not, write to the Free Software 16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 18 Author: lex.borisov@gmail.com (Alexander Borisov) 19 */ 20 21 #ifndef MyFONT_HHEA_H 22 #define MyFONT_HHEA_H 23 #pragma once 24 25 #include "myfont/myosi.h" 26 27 #ifdef __cplusplus 28 extern "C" { 29 #endif 30 31 // table hhea 32 struct myfont_table_hhea { 33 int32_t version; 34 int16_t Ascender; 35 int16_t Descender; 36 int16_t LineGap; 37 uint16_t advanceWidthMax; 38 int16_t minLeftSideBearing; 39 int16_t minRightSideBearing; 40 int16_t xMaxExtent; 41 int16_t caretSlopeRise; 42 int16_t caretSlopeRun; 43 int16_t caretOffset; 44 int16_t reserved1; 45 int16_t reserved2; 46 int16_t reserved3; 47 int16_t reserved4; 48 int16_t metricDataFormat; 49 uint16_t numberOfHMetrics; 50 } 51 typedef myfont_table_hhea_t; 52 53 #include "myfont/myfont.h" 54 55 struct myfont_font; 56 57 mystatus_t myfont_load_table_hhea(myfont_font_t *mf, uint8_t* data, size_t data_size); 58 59 #ifdef __cplusplus 60 } /* extern "C" */ 61 #endif 62 63 #endif /* MyFONT_HHEA_H */ 64