From 20f4a9a9427d3f81ca7c90713831ba101d64fd2b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 13 May 2019 20:42:30 +0530 Subject: [PATCH] ... --- kitty/fonts.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kitty/fonts.c b/kitty/fonts.c index 9cef1e509..80ff6bd28 100644 --- a/kitty/fonts.c +++ b/kitty/fonts.c @@ -817,10 +817,10 @@ static inline void shape_run(CPUCell *first_cpu_cell, GPUCell *first_gpu_cell, index_type num_cells, Font *font, bool disable_ligature) { shape(first_cpu_cell, first_gpu_cell, num_cells, harfbuzz_font_for_face(font->face), disable_ligature); #if 0 + static char dbuf[1024]; // You can also generate this easily using hb-shape --show-extents --cluster-level=1 --shapers=ot /path/to/font/file text - hb_buffer_serialize_glyphs(harfbuzz_buffer, 0, group_state.num_glyphs, (char*)canvas, sizeof(pixel) * CELLS_IN_CANVAS * cell_width * cell_height, NULL, harfbuzz_font_for_face(font->face), HB_BUFFER_SERIALIZE_FORMAT_TEXT, HB_BUFFER_SERIALIZE_FLAG_DEFAULT | HB_BUFFER_SERIALIZE_FLAG_GLYPH_EXTENTS); - printf("\n%s\n", (char*)canvas); - clear_canvas(); + hb_buffer_serialize_glyphs(harfbuzz_buffer, 0, group_state.num_glyphs, dbuf, sizeof(dbuf), NULL, harfbuzz_font_for_face(font->face), HB_BUFFER_SERIALIZE_FORMAT_TEXT, HB_BUFFER_SERIALIZE_FLAG_DEFAULT | HB_BUFFER_SERIALIZE_FLAG_GLYPH_EXTENTS); + printf("\n%s\n", dbuf); #endif /* Now distribute the glyphs into groups of cells * Considerations to keep in mind: