From: handa Date: Thu, 5 Aug 2004 11:42:33 +0000 (+0000) Subject: (update_seq_area): Fix sign of yoff. X-Git-Tag: REL-0-9-1~14 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=ce703a15258e745bf7919a72143b3825e064d6d5;p=m17n%2Flibotf.git (update_seq_area): Fix sign of yoff. (update_seq_area): Support more positioning_type. --- diff --git a/example/otfview.c b/example/otfview.c index d4b2c40..a85361a 100644 --- a/example/otfview.c +++ b/example/otfview.c @@ -304,6 +304,7 @@ update_seq_area () OTF_drive_gdef (otf, &gstring); XFillRectangle (display, seq_pixmap, gc, 0, 0, render_width, render_height); + XDrawLine (display, seq_pixmap, gc_set, 0, glyph_y, render_width, glyph_y); if (otf) { char *str; @@ -384,34 +385,33 @@ update_seq_area () if (format & OTF_XAdvDevice) advance += DEVICE_DELTA (g->f.f1.value->XAdvDevice, pixel_size); } - break; - case 3: - /* Not yet supported. */ - break; - case 4: - { - int base_x, base_y, mark_x, mark_y; - - base_x = g->f.f4.base_anchor->XCoordinate * pixel_size / unitsPerEm; - base_y = g->f.f4.base_anchor->YCoordinate * pixel_size / unitsPerEm; - mark_x = g->f.f4.mark_anchor->XCoordinate * pixel_size / unitsPerEm; - mark_y = g->f.f4.mark_anchor->YCoordinate * pixel_size / unitsPerEm; - - if (g->f.f4.base_anchor->AnchorFormat != 1) - adjust_anchor (g->f.f4.base_anchor, face, prev, &base_x, &base_y); - if (g->f.f4.mark_anchor->AnchorFormat != 1) - adjust_anchor (g->f.f4.mark_anchor, face, prev, &mark_x, &mark_y); - xoff = (base_x - prev_width) - mark_x; - yoff = base_y - mark_y; + break; + + case 3: + /* Not yet supported. */ + break; + case 4: case 5: + { + int base_x, base_y, mark_x, mark_y; + + base_x = g->f.f4.base_anchor->XCoordinate * pixel_size / unitsPerEm; + base_y = g->f.f4.base_anchor->YCoordinate * pixel_size / unitsPerEm; + mark_x = g->f.f4.mark_anchor->XCoordinate * pixel_size / unitsPerEm; + mark_y = g->f.f4.mark_anchor->YCoordinate * pixel_size / unitsPerEm; + + if (g->f.f4.base_anchor->AnchorFormat != 1) + adjust_anchor (g->f.f4.base_anchor, face, prev, &base_x, &base_y); + if (g->f.f4.mark_anchor->AnchorFormat != 1) + adjust_anchor (g->f.f4.mark_anchor, face, prev, &mark_x, &mark_y); + xoff = (base_x - prev_width) - mark_x; + yoff = base_y - mark_y; + } + break; + + default: /* i.e case 6 */ + /* Not yet supported. */ + break; } - break; - case 5: - /* Not yet supported. */ - break; - default: /* i.e case 6 */ - /* Not yet supported. */ - break; - } XCopyArea (display, bmp->pixmap, seq_pixmap, gc_or, glyph_x + bmp->x, glyph_y + bmp->y, bmp->width, bmp->height,