Fix extra columns cut-off from the right edge of italic characters that are too wide to fit in a cell
This commit is contained in:
parent
8201cd3288
commit
c74f4a8165
1 changed files with 2 additions and 1 deletions
|
|
@ -337,6 +337,7 @@ trim_borders(ProcessedBitmap *ans, size_t extra) {
|
|||
if (!column_has_text) { ans->width--; extra--; }
|
||||
}
|
||||
|
||||
// Remove any remaining extra columns from the left edge of the bitmap
|
||||
ans->start_x = extra;
|
||||
ans->width -= extra;
|
||||
}
|
||||
|
|
@ -461,7 +462,7 @@ place_bitmap_in_canvas(pixel *cell, ProcessedBitmap *bm, size_t cell_width, size
|
|||
// We want the glyph to be positioned inside the cell based on the bearingX
|
||||
// and bearingY values, making sure that it does not overflow the cell.
|
||||
|
||||
Region src = { .left = bm->start_x, .bottom = bm->rows, .right = bm->width }, dest = { .bottom = cell_height, .right = cell_width };
|
||||
Region src = { .left = bm->start_x, .bottom = bm->rows, .right = bm->width + bm->start_x }, dest = { .bottom = cell_height, .right = cell_width };
|
||||
|
||||
// Calculate column bounds
|
||||
float bearing_x = (float)metrics->horiBearingX / 64.f;
|
||||
|
|
|
|||
Loading…
Reference in a new issue