mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-09-22 03:57:30 +03:00
macOS: Fix incorrect horizontal positioning of some full-width East Asian characters
Fixes #1457 Also render multi-cell PUA characters centered, matching behavior on other platforms
This commit is contained in:
parent
1f1b52b580
commit
859033415b
@ -25,6 +25,12 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
|
||||
- Fix specifying options for layouts in the startup session file not working
|
||||
(:iss:`2520`)
|
||||
|
||||
- macOS: Fix incorrect horizontal positioning of some full-width East Asian characters
|
||||
(:iss:`1457`)
|
||||
|
||||
- macOS: Render multi-cell PUA characters centered, matching behavior on other
|
||||
platforms
|
||||
|
||||
|
||||
0.17.2 [2020-03-29]
|
||||
--------------------
|
||||
|
@ -505,10 +505,10 @@
|
||||
Region src = {.bottom=cell_height, .right=canvas_width}, dest = {.bottom=cell_height, .right=canvas_width};
|
||||
render_alpha_mask(render_buf, canvas, &src, &dest, canvas_width, canvas_width);
|
||||
}
|
||||
if (num_cells > 1) {
|
||||
// center glyphs
|
||||
CGFloat delta = canvas_width - br.size.width;
|
||||
if (delta > 1) right_shift_canvas(canvas, canvas_width, cell_height, (unsigned)(delta / 2.f));
|
||||
if (num_cells && (center_glyph || (num_cells == 2 && *was_colored))) {
|
||||
// center glyphs (two cell emoji and PUA glyphs)
|
||||
CGFloat delta = (((CGFloat)canvas_width - br.size.width) / 2.f) - br.origin.x;
|
||||
if (delta >= 1.f) right_shift_canvas(canvas, canvas_width, cell_height, (unsigned)(delta));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user