(update_seq_area): Fix sign of yoff.
authorhanda <handa>
Thu, 5 Aug 2004 11:42:33 +0000 (11:42 +0000)
committerhanda <handa>
Thu, 5 Aug 2004 11:42:33 +0000 (11:42 +0000)
(update_seq_area): Support more positioning_type.

example/otfview.c

index d4b2c40..a85361a 100644 (file)
@@ -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,