From: Ben Harris Date: Thu, 20 Nov 2025 23:22:48 +0000 (+0000) Subject: Tolerable rendering of variation sequences in glyph complement X-Git-Tag: bedstead-3.261~9 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~bjharris/git?a=commitdiff_plain;h=d418809b34e0b35378d5a8dfe70f681bbb064195;p=bedstead.git Tolerable rendering of variation sequences in glyph complement I think I probably want a nice way to write "<= 0x10ffff" though. --- 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) {