This commit is contained in:
Kovid Goyal 2026-02-23 22:18:13 +05:30
parent 38a2633f20
commit e25390724e
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -966,7 +966,7 @@ bool
render_glyphs_in_cells(PyObject *f, bool bold, bool italic, hb_glyph_info_t *info, hb_glyph_position_t *positions, unsigned int num_glyphs, pixel *canvas, unsigned int cell_width, unsigned int cell_height, unsigned int num_cells, unsigned int baseline, bool *was_colored, FONTS_DATA_HANDLE fg, GlyphRenderInfo *ri) {
Face *self = (Face*)f;
bool is_emoji = *was_colored; *was_colored = is_emoji && self->has_color;
float x = 0.f, y = 0.f, x_offset = 0.f;
float x = 0.f, y = 0.f;
ProcessedBitmap bm;
unsigned int canvas_width = cell_width * num_cells;
GlyphColorType colored;
@ -990,7 +990,7 @@ render_glyphs_in_cells(PyObject *f, bool bold, bool italic, hb_glyph_info_t *inf
}
}
}
x_offset = x + (float)positions[i].x_offset / 64.0f;
float x_offset = x + (float)positions[i].x_offset / 64.0f;
y = (float)positions[i].y_offset / 64.0f;
if (debug_placement) printf("%d: x=%f canvas: %u", i, x_offset, canvas_width);
if ((*was_colored || self->face->glyph->metrics.width > 0) && bm.width > 0) {