Created
February 23, 2019 09:17
-
-
Save aminophen/bd616ddf70b44768be8def44c8cf766e to your computer and use it in GitHub Desktop.
例の dvipdfmx の修正
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- tt_post.c.1~ Sun Jan 31 08:20:35 2016 | |
+++ tt_post.c Sat Feb 23 18:14:31 2019 | |
@@ -161,7 +161,7 @@ | |
ASSERT(post && glyphname); | |
- for (gid = 0; gid < post->count; gid++) { | |
+ for (gid = 0; gid < post->numberOfGlyphs; gid++) { | |
if (post->glyphNamePtr[gid] && | |
!strcmp(glyphname, post->glyphNamePtr[gid])) { | |
return gid; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://gist.github.com/zr-tex8r/56b4945178ab43f0c16664d8f1edd449 のバグへの対処。
tt_post.c によると
である。すなわち
post->glyphNamePtr
はpost->numberOfGlyphs
のサイズしかメモリ確保していない。ところが,ipaexm.ttf では
post->numberOfGlyphs
= 12238 である一方post->count
= 12250 であり,この場合ループが回りすぎてしまい,落ちていたらしい。