int len, i = 0, ch;
int x1 = 0, y1 = 0;
int xb = x, yb = y;
+ int yd = 0;
font_t *font;
fontkey_t fontkey;
char *next;
}
#endif
+ i = 0;
while (*next) {
ch = *next;
}
/* newlines */
if (ch == '\n') {
+ if (!*(++next)) break;
/* 2.0.13: reset penf.x. Christopher J. Grayce */
penf.x = 0;
penf.y -= (long)(face->size->metrics.height * linespace);
y1 = (int)(- penf.y * cos_a + 32) / 64;
xb = x + x1;
yb = y + y1;
+ yd = 0;
pen.x = pen.y = 0;
previous = 0; /* clear kerning flag */
- next++;
continue;
}
glyph_bbox.xMax += slot->metrics.horiAdvance;
}
if (!i) { /* if first character, init BB corner values */
+ yd = slot->metrics.height - slot->metrics.horiBearingY;
bbox.xMin = glyph_bbox.xMin;
bbox.yMin = glyph_bbox.yMin;
bbox.xMax = glyph_bbox.xMax;
bbox.yMax = glyph_bbox.yMax;
} else {
+ FT_Pos desc;
+
+ if ( (desc = (slot->metrics.height - slot->metrics.horiBearingY)) > yd) {
+ yd = desc;
+ }
if (bbox.xMin > glyph_bbox.xMin) {
bbox.xMin = glyph_bbox.xMin;
}
normbox.xMax = bbox.xMax - bbox.xMin;
normbox.yMax = bbox.yMax - bbox.yMin;
+ brect[0] = brect[2] = brect[4] = brect[6] = (int) (yd * sin_a);
+ brect[1] = brect[3] = brect[5] = brect[7] = (int)(- yd * cos_a);
+
/* rotate bounding rectangle */
- brect[0] = (int) (normbox.xMin * cos_a - normbox.yMin * sin_a);
- brect[1] = (int) (normbox.xMin * sin_a + normbox.yMin * cos_a);
- brect[2] = (int) (normbox.xMax * cos_a - normbox.yMin * sin_a);
- brect[3] = (int) (normbox.xMax * sin_a + normbox.yMin * cos_a);
- brect[4] = (int) (normbox.xMax * cos_a - normbox.yMax * sin_a);
- brect[5] = (int) (normbox.xMax * sin_a + normbox.yMax * cos_a);
- brect[6] = (int) (normbox.xMin * cos_a - normbox.yMax * sin_a);
- brect[7] = (int) (normbox.xMin * sin_a + normbox.yMax * cos_a);
+ brect[0] += (int) (normbox.xMin * cos_a - normbox.yMin * sin_a);
+ brect[1] += (int) (normbox.xMin * sin_a + normbox.yMin * cos_a);
+ brect[2] += (int) (normbox.xMax * cos_a - normbox.yMin * sin_a);
+ brect[3] += (int) (normbox.xMax * sin_a + normbox.yMin * cos_a);
+ brect[4] += (int) (normbox.xMax * cos_a - normbox.yMax * sin_a);
+ brect[5] += (int) (normbox.xMax * sin_a + normbox.yMax * cos_a);
+ brect[6] += (int) (normbox.xMin * cos_a - normbox.yMax * sin_a);
+ brect[7] += (int) (normbox.xMin * sin_a + normbox.yMax * cos_a);
/* scale, round and offset brect */
brect[0] = xb + gdroundupdown(brect[0], d2 > 0);
--FILE--
<?php
$cwd = dirname(__FILE__);
-$font = "$cwd/test8859.ttf";
+$font = "$cwd/Tuffy.ttf";
$delta_t = 360.0 / 16; # Make 16 steps around
$g = imagecreate(800, 800);
$bgnd = imagecolorallocate($g, 255, 255, 255);
$y = $cos_t * $y - $sin_t * $x;
$x = $temp;
}
+imagepng($g, "$cwd/bug43073.png");
?>
--EXPECTF--
-(500, 400), (579, 400), (579, 370), (500, 370)
-(492, 361), (575, 327), (564, 301), (480, 335)
-(470, 329), (540, 260), (521, 242), (451, 312)
-(438, 307), (478, 210), (461, 204), (420, 301)
-(400, 300), (400, 193), (383, 193), (383, 300)
-(361, 307), (319, 207), (297, 216), (338, 317)
-(329, 329), (254, 254), (233, 275), (307, 351)
-(307, 361), (215, 323), (203, 354), (294, 392)
-(300, 400), (203, 400), (203, 431), (300, 431)
-(307, 438), (219, 474), (229, 501), (318, 465)
-(329, 470), (263, 535), (281, 553), (347, 489)
-(361, 492), (326, 575), (343, 582), (378, 499)
-(400, 500), (400, 584), (416, 584), (416, 500)
-(438, 492), (468, 567), (490, 559), (460, 483)
-(470, 470), (523, 525), (545, 505), (491, 449)
-(492, 438), (560, 467), (572, 436), (504, 408)
+(500, 402), (610, 402), (610, 376), (500, 376)
+(492, 363), (591, 322), (580, 295), (480, 336)
+(470, 331), (548, 254), (527, 233), (449, 310)
+(439, 309), (483, 202), (461, 193), (416, 299)
+(401, 300), (401, 183), (381, 183), (381, 300)
+(362, 307), (316, 195), (291, 205), (337, 318)
+(330, 329), (246, 244), (224, 265), (308, 350)
+(308, 360), (202, 316), (190, 344), (296, 388)
+(300, 399), (186, 399), (186, 425), (300, 425)
+(306, 437), (195, 483), (206, 510), (318, 464)
+(328, 469), (240, 557), (260, 578), (349, 491)
+(359, 491), (312, 607), (334, 616), (382, 501)
+(398, 500), (398, 618), (418, 618), (418, 500)
+(436, 493), (483, 607), (507, 597), (461, 482)
+(468, 471), (555, 558), (577, 538), (490, 450)
+(490, 440), (600, 485), (611, 457), (502, 412)