From d418809b34e0b35378d5a8dfe70f681bbb064195 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Thu, 20 Nov 2025 23:22:48 +0000 Subject: [PATCH] Tolerable rendering of variation sequences in glyph complement I think I probably want a nice way to write "<= 0x10ffff" though. --- bedstead.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/bedstead.c b/bedstead.c index f535969..684894d 100644 --- a/bedstead.c +++ b/bedstead.c @@ -5263,19 +5263,23 @@ glyph_complement() col = 0; newcol = true; } - if (newcol && g->unicode != NU) { + if (newcol && g->unicode != NU && !(g->unicode & U_HASVS)) { printf("gsave %d 0 translate (%03lX) colnum grestore\n", col * 40, unicol); newcol = false; } printf("gsave %d %d translate ", (col * 40), - (int)-((g->unicode == NU ? + (int)-((g->unicode == NU || (g->unicode & U_HASVS) ? row++ : (int)(g->unicode % nrow)) * 40)); - if (g->unicode != NU) - printf("(U+%04lX)", (unsigned long)g->unicode); - else + if (g->unicode == NU) printf("()"); + else if (g->unicode & U_HASVS) + printf("()", + (unsigned long)GET_UV(g->unicode), + (unsigned long)GET_UVS(g->unicode)); + else + printf("(U+%04lX)", (unsigned long)g->unicode); printf("/%s ", g->name); printf("exemplify "); if (g->flags & COMPAT) { -- 2.30.2