...
This commit is contained in:
parent
38a2633f20
commit
e25390724e
1 changed files with 2 additions and 2 deletions
|
|
@ -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) {
|
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;
|
Face *self = (Face*)f;
|
||||||
bool is_emoji = *was_colored; *was_colored = is_emoji && self->has_color;
|
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;
|
ProcessedBitmap bm;
|
||||||
unsigned int canvas_width = cell_width * num_cells;
|
unsigned int canvas_width = cell_width * num_cells;
|
||||||
GlyphColorType colored;
|
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;
|
y = (float)positions[i].y_offset / 64.0f;
|
||||||
if (debug_placement) printf("%d: x=%f canvas: %u", i, x_offset, canvas_width);
|
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) {
|
if ((*was_colored || self->face->glyph->metrics.width > 0) && bm.width > 0) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue