Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -1757,9 +1757,17 @@ continue_on_failed2: · 1756 unmodified lines | ||
| 1757 | 1757 | first_min_x64 = FFMIN(glyph->bbox.xMin, first_min_x64); |
| 1758 | 1758 | } |
| 1759 | 1759 | if (t == hb->glyph_count - 1) { |
| 1760 | − w64 += glyph->bbox.xMax; | |
| 1761 | − last_max_x64 = FFMAX(glyph->bbox.xMax, last_max_x64); | |
| 1762 | − cur_line->offset_right64 = glyph->bbox.xMax; | |
| 1760 | + // The following code measures the width of the line up to the last | |
| 1761 | + // character's horizontal advance | |
| 1762 | + int last_char_width = hb->glyph_pos[t].x_advance; | |
| 1763 | + | |
| 1764 | + // The following code measures the width of the line up to the rightmost | |
| 1765 | + // visible pixel of the last character | |
| 1766 | + // int last_char_width = glyph->bbox.xMax; | |
| 1767 | + | |
| 1768 | + w64 += last_char_width; | |
| 1769 | + last_max_x64 = FFMAX(last_char_width, last_max_x64); | |
| 1770 | + cur_line->offset_right64 = last_char_width; | |
| 1763 | 1771 | } else { |
| 1764 | 1772 | if (is_tab) { |
| 1765 | 1773 | int size = s->blank_advance64 * s->tabsize; |