1 /***************************************************************************/ 2 /* */ 3 /* ttkern.c */ 4 /* */ 5 /* Load the basic TrueType kerning table. This doesn't handle */ 6 /* kerning data within the GPOS table at the moment. */ 7 /* */ 8 /* Copyright 1996-2018 by */ 9 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 10 /* */ 11 /* This file is part of the FreeType project, and may only be used, */ 12 /* modified, and distributed under the terms of the FreeType project */ 13 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 14 /* this file you indicate that you have read the license and */ 15 /* understand and accept it fully. */ 16 /* */ 17 /***************************************************************************/ 18 19 20 #include <ft2build.h> 21 #include FT_INTERNAL_DEBUG_H 22 #include FT_INTERNAL_STREAM_H 23 #include FT_TRUETYPE_TAGS_H 24 #include "ttkern.h" 25 26 #include "sferrors.h" 27 28 29 /*************************************************************************/ 30 /* */ 31 /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ 32 /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */ 33 /* messages during execution. */ 34 /* */ 35 #undef FT_COMPONENT 36 #define FT_COMPONENT trace_ttkern 37 38 39 #undef TT_KERN_INDEX 40 #define TT_KERN_INDEX( g1, g2 ) ( ( (FT_ULong)(g1) << 16 ) | (g2) ) 41 42 43 FT_LOCAL_DEF( FT_Error ) 44 tt_face_load_kern( TT_Face face, 45 FT_Stream stream ) 46 { 47 FT_Error error; 48 FT_ULong table_size; 49 FT_Byte* p; 50 FT_Byte* p_limit; 51 FT_UInt nn, num_tables; 52 FT_UInt32 avail = 0, ordered = 0; 53 54 55 /* the kern table is optional; exit silently if it is missing */ 56 error = face->goto_table( face, TTAG_kern, stream, &table_size ); | 1 /**************************************************************************** 2 * 3 * ttkern.c 4 * 5 * Load the basic TrueType kerning table. This doesn't handle 6 * kerning data within the GPOS table at the moment. 7 * 8 * Copyright (C) 1996-2019 by 9 * David Turner, Robert Wilhelm, and Werner Lemberg. 10 * 11 * This file is part of the FreeType project, and may only be used, 12 * modified, and distributed under the terms of the FreeType project 13 * license, LICENSE.TXT. By continuing to use, modify, or distribute 14 * this file you indicate that you have read the license and 15 * understand and accept it fully. 16 * 17 */ 18 19 20 #include <ft2build.h> 21 #include FT_INTERNAL_DEBUG_H 22 #include FT_INTERNAL_STREAM_H 23 #include FT_TRUETYPE_TAGS_H 24 #include "ttkern.h" 25 26 #include "sferrors.h" 27 28 29 /************************************************************************** 30 * 31 * The macro FT_COMPONENT is used in trace mode. It is an implicit 32 * parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log 33 * messages during execution. 34 */ 35 #undef FT_COMPONENT 36 #define FT_COMPONENT ttkern 37 38 39 #undef TT_KERN_INDEX 40 #define TT_KERN_INDEX( g1, g2 ) ( ( (FT_ULong)(g1) << 16 ) | (g2) ) 41 42 43 FT_LOCAL_DEF( FT_Error ) 44 tt_face_load_kern( TT_Face face, 45 FT_Stream stream ) 46 { 47 FT_Error error; 48 FT_ULong table_size; 49 FT_Byte* p; 50 FT_Byte* p_limit; 51 FT_UInt nn, num_tables; 52 FT_UInt32 avail = 0, ordered = 0; 53 54 55 /* the kern table is optional; exit silently if it is missing */ 56 error = face->goto_table( face, TTAG_kern, stream, &table_size ); |