diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2022-04-05 01:58:38 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2022-04-05 01:58:38 +0000 |
commit | 5bff9ca8e2b241daefc929d1d93a36b96c570e94 (patch) | |
tree | ede68b76c2074b0a8308d8b7a8c65abb9bde3ffb /Build/source/libs/freetype2/freetype-src/src/sfnt/ttkern.c | |
parent | f8c9fa0f3e341f99f49f318029b143b560531817 (diff) |
freetype 2.12.0
git-svn-id: svn://tug.org/texlive/trunk@62910 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/freetype2/freetype-src/src/sfnt/ttkern.c')
-rw-r--r-- | Build/source/libs/freetype2/freetype-src/src/sfnt/ttkern.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/Build/source/libs/freetype2/freetype-src/src/sfnt/ttkern.c b/Build/source/libs/freetype2/freetype-src/src/sfnt/ttkern.c index bb1922caf95..ca1c5094065 100644 --- a/Build/source/libs/freetype2/freetype-src/src/sfnt/ttkern.c +++ b/Build/source/libs/freetype2/freetype-src/src/sfnt/ttkern.c @@ -5,7 +5,7 @@ * Load the basic TrueType kerning table. This doesn't handle * kerning data within the GPOS table at the moment. * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -94,7 +94,7 @@ p_next = p; - p += 2; /* skip version */ + p += 2; /* skip version */ length = FT_NEXT_USHORT( p ); coverage = FT_NEXT_USHORT( p ); @@ -144,7 +144,7 @@ cur_pair = FT_NEXT_ULONG( p ); - if ( cur_pair <= old_pair ) + if ( cur_pair < old_pair ) break; p += 2; @@ -187,11 +187,18 @@ FT_UInt left_glyph, FT_UInt right_glyph ) { - FT_Int result = 0; - FT_UInt count, mask; - FT_Byte* p = face->kern_table; - FT_Byte* p_limit = p + face->kern_table_size; + FT_Int result = 0; + FT_UInt count, mask; + FT_Byte* p; + FT_Byte* p_limit; + + + if ( !face->kern_table ) + return result; + + p = face->kern_table; + p_limit = p + face->kern_table_size; p += 4; mask = 0x0001; |