[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] master 78cded2 1/2: Fix cmap format 2 handling (#53320).
From: |
Werner LEMBERG |
Subject: |
[freetype2] master 78cded2 1/2: Fix cmap format 2 handling (#53320). |
Date: |
Tue, 13 Mar 2018 06:11:57 -0400 (EDT) |
branch: master
commit 78cded2c5c687d06c5b74b308fb54af7f807dc0d
Author: Werner Lemberg <address@hidden>
Commit: Werner Lemberg <address@hidden>
Fix cmap format 2 handling (#53320).
The patch introduced for #52646 was not correct.
* src/sfnt/ttcmap.c (tt_cmap2_char_next): Adjust condition.
---
ChangeLog | 8 ++++++++
src/sfnt/ttcmap.c | 15 +++++++--------
2 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 25639ae..65bc409 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2018-03-13 Werner Lemberg <address@hidden>
+
+ Fix cmap format 2 handling (#53320).
+
+ The patch introduced for #52646 was not correct.
+
+ * src/sfnt/ttcmap.c (tt_cmap2_char_next): Adjust condition.
+
2018-03-10 Nikolaus Waxweiler <address@hidden>
* CMakeLists.txt (BASE_SRCS): Update to changes from 2018-03-05.
diff --git a/src/sfnt/ttcmap.c b/src/sfnt/ttcmap.c
index 8cc70f7..58b49c9 100644
--- a/src/sfnt/ttcmap.c
+++ b/src/sfnt/ttcmap.c
@@ -549,19 +549,18 @@
}
}
}
+
+ /* if unsuccessful, avoid `charcode' leaving */
+ /* the current 256-character block */
+ if ( count )
+ charcode--;
}
- /* If `charcode' is <= 0xFF, retry with `charcode + 1'. If */
- /* `charcode' is 0x100 after the loop, do nothing since we have */
- /* just reached the first sub-header for two-byte character codes. */
- /* */
- /* For all other cases, we jump to the next sub-header and adjust */
- /* `charcode' accordingly. */
+ /* If `charcode' is <= 0xFF, retry with `charcode + 1'. */
+ /* Otherwise jump to the next 256-character block and retry. */
Next_SubHeader:
if ( charcode <= 0xFF )
charcode++;
- else if ( charcode == 0x100 )
- ;
else
charcode = FT_PAD_FLOOR( charcode, 0x100 ) + 0x100;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] master 78cded2 1/2: Fix cmap format 2 handling (#53320).,
Werner LEMBERG <=