Package: xdvik-ja / 22.84.16-j1.40+t1lib-1

0006-Freetype-Invalid-Outline.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From: Youhei SASAKI <uwabami@gfd-dennou.org>
Date: Sun, 25 Mar 2012 16:30:09 +0900
Subject: Freetype Invalid Outline

Signed-off-by: Youhei SASAKI <uwabami@gfd-dennou.org>
---
 texk/xdvik/ft2.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/texk/xdvik/ft2.c b/texk/xdvik/ft2.c
index fa807a6..571b427 100644
--- a/texk/xdvik/ft2.c
+++ b/texk/xdvik/ft2.c
@@ -183,7 +183,12 @@ static void glyph_to_bitmap(struct bitmap *bm, FT_GlyphSlot g, int ascend)
     } /* We love plus % plus, we hate minus % plus. */
     assert( xmax <= bm->bytes_wide );
 
-    yoffset = ascend - g->bitmap_top;
+    if (g->bitmap_top == 0) {
+        yoffset = 0;
+    } else {
+        yoffset = ascend - g->bitmap_top;
+    }
+
     if ( yoffset >= 0 ) { /* to down */
 	dst += yoffset * bm->bytes_wide;
 	if (ymax > bm->h - yoffset) ymax = bm->h - yoffset;