Line
Link Here
|
0 |
-- a/libass/ass_font.c |
0 |
++ b/libass/ass_font.c |
Lines 675-691
void fix_freetype_stroker(FT_OutlineGlyph glyph, int border_x, int border_y)
Link Here
|
675 |
|
675 |
|
676 |
// zero-out contours that can be removed; much simpler than copying |
676 |
// zero-out contours that can be removed; much simpler than copying |
677 |
if (modified) { |
677 |
if (modified) { |
|
|
678 |
int p = 0, c = 0; |
678 |
for (i = 0; i < nc; i++) { |
679 |
for (i = 0; i < nc; i++) { |
679 |
if (valid_cont[i]) |
680 |
if (!valid_cont[i]) |
680 |
continue; |
681 |
continue; |
681 |
begin = (i == 0) ? 0 : glyph->outline.contours[i - 1] + 1; |
682 |
begin = (i == 0) ? 0 : glyph->outline.contours[i - 1] + 1; |
682 |
stop = glyph->outline.contours[i]; |
683 |
stop = glyph->outline.contours[i]; |
683 |
for (j = begin; j <= stop; j++) { |
684 |
for (j = begin; j <= stop; j++) { |
684 |
glyph->outline.points[j].x = 0; |
685 |
glyph->outline.points[p].x = glyph->outline.points[j].x; |
685 |
glyph->outline.points[j].y = 0; |
686 |
glyph->outline.points[p].y = glyph->outline.points[j].y; |
686 |
glyph->outline.tags[j] = 0; |
687 |
glyph->outline.tags[p] = glyph->outline.tags[j]; |
|
|
688 |
p++; |
687 |
} |
689 |
} |
|
|
690 |
glyph->outline.contours[c] = p - 1; |
691 |
c++; |
688 |
} |
692 |
} |
|
|
693 |
glyph->outline.n_points = p; |
694 |
glyph->outline.n_contours = c; |
689 |
} |
695 |
} |
690 |
|
696 |
|
691 |
free(boxes); |
697 |
free(boxes); |