macOS: no longer render emoji 20% below the baseline. This causes some emoji to be cut-off and also look misaligned with very high cells
Fixes #2873
This commit is contained in:
parent
1af426bf84
commit
1bb6242020
@ -58,6 +58,9 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
|
|||||||
|
|
||||||
- Add support for legacy DECSET codes 47, 1047 and 1048 (:pull:`2871`)
|
- Add support for legacy DECSET codes 47, 1047 and 1048 (:pull:`2871`)
|
||||||
|
|
||||||
|
- macOS: no longer render emoji 20% below the baseline. This causes some emoji
|
||||||
|
to be cut-off and also look misaligned with very high cells (:iss:`2873`)
|
||||||
|
|
||||||
|
|
||||||
0.18.1 [2020-06-23]
|
0.18.1 [2020-06-23]
|
||||||
--------------------
|
--------------------
|
||||||
|
|||||||
@ -409,7 +409,7 @@ render_color_glyph(CTFontRef font, uint8_t *buf, int glyph_id, unsigned int widt
|
|||||||
CGContextSetTextDrawingMode(ctx, kCGTextFill);
|
CGContextSetTextDrawingMode(ctx, kCGTextFill);
|
||||||
CGGlyph glyph = glyph_id;
|
CGGlyph glyph = glyph_id;
|
||||||
CGContextSetTextMatrix(ctx, transform);
|
CGContextSetTextMatrix(ctx, transform);
|
||||||
CGContextSetTextPosition(ctx, -boxes[0].origin.x, MAX(2, height - 1.2f * baseline)); // lower the emoji a bit so its bottom is not on the baseline
|
CGContextSetTextPosition(ctx, -boxes[0].origin.x, MAX(2, height - baseline));
|
||||||
CGPoint p = CGPointMake(0, 0);
|
CGPoint p = CGPointMake(0, 0);
|
||||||
CTFontDrawGlyphs(font, &glyph, &p, 1, ctx);
|
CTFontDrawGlyphs(font, &glyph, &p, 1, ctx);
|
||||||
CGContextRelease(ctx);
|
CGContextRelease(ctx);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user