diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2022-05-07 06:06:35 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2022-05-07 06:06:35 +0000 |
commit | a056f660b41815752ccb53f2182f24de721393aa (patch) | |
tree | 30eec2d7fde35ce87c344e67cf37677be4c4bbd7 /Build/source/libs/freetype2/freetype-src/src/sfnt/ttkern.c | |
parent | 2f0167f2576a7c29b556a8f15e44b062d4750f46 (diff) |
freetype 2.12.1 (trial)
git-svn-id: svn://tug.org/texlive/trunk@63245 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; |