mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-30 04:42:59 +00:00
Fix colors incorrect when rendering directly to buf
This commit is contained in:
parent
98d8ab2953
commit
0999ce159e
1 changed files with 6 additions and 0 deletions
|
|
@ -301,6 +301,12 @@ coretext_render_color_glyph(CTFontRef font, uint8_t *buf, int glyph_id, unsigned
|
|||
CTFontDrawGlyphs(font, &glyph, &CGPointZero, 1, ctx);
|
||||
CGContextRelease(ctx);
|
||||
CGColorSpaceRelease(color_space);
|
||||
for (size_t r = 0; r < width; r++) {
|
||||
for (size_t c = 0; c < height; c++, buf += 4) {
|
||||
uint32_t px = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3];
|
||||
*((pixel*)buf) = px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue