1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-23 21:32:13 +03:00

fonts: svg: half-assed attempt to set the y-bearing

This is not right, but better than not setting it.
This commit is contained in:
Wez Furlong 2023-08-15 11:27:34 -07:00
parent edbf4ac1e4
commit b365225695
No known key found for this signature in database
GPG Key ID: 7A7F66A31EC9B387

View File

@ -487,7 +487,8 @@ fn svg_preset_slot_impl(
let dimension_y = pixmap_size.height() as f64 * y_svg_to_out;
slot.bitmap_left = 0;
slot.bitmap_top = 0;
slot.bitmap_top = dimension_y as i32; // This sets the y-bearing. It is incorrect,
// but better than using 0
slot.bitmap.rows = dimension_y as _;
slot.bitmap.width = dimension_x as _;
slot.bitmap.pitch = (dimension_x as i32) * 4;