From: Ben Harris Date: Wed, 9 Aug 2017 21:03:56 +0000 (+0100) Subject: Add U+0149, "napostrophe". X-Git-Tag: bedstead-002.000~73 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~bjharris/git?a=commitdiff_plain;h=6a099893dd938599530e4863b9406aaacc2e9e5f;p=bedstead.git Add U+0149, "napostrophe". That's the only character that Font Library says is missing for supporting Afrikaans, so I may as well implement it even if Unicode does say its use is strongly discouraged. --- diff --git a/bedstead.c b/bedstead.c index 9bfad09..aecc904 100644 --- a/bedstead.c +++ b/bedstead.c @@ -598,6 +598,7 @@ static struct glyph { {{002,004,036,021,021,021,021,000,000}, 0x0144, "nacute" }, {{012,004,021,031,025,023,021,000,000}, 0x0147, "Ncaron" }, {{012,004,036,021,021,021,021,000,000}, 0x0148, "ncaron" }, + {{020,020,026,005,005,005,005,000,000}, 0x0149, "napostrophe" }, {{021,021,031,025,023,021,021,001,016}, 0x014a, "Eng" }, {{000,000,036,021,021,021,021,001,016}, 0x014b, "eng" }, {{016,000,016,021,021,021,016,000,000}, 0x014c, "Omacron" }, @@ -2142,7 +2143,7 @@ dochar(char const data[YSIZE], unsigned flags) } static void -reverse_path(point *a) +reverse_contour(point *a) { point *tmp; @@ -2156,7 +2157,7 @@ reverse_path(point *a) } } -/* Join together two points each at the end of a path */ +/* Join together two points each at the end of a contour */ static void join_ends(point *a, point *b) { @@ -2166,9 +2167,9 @@ join_ends(point *a, point *b) tmp = a; a = b; b = tmp; } if (a->prev == NULL) - reverse_path(a); + reverse_contour(a); if (b->next == NULL) - reverse_path(b); + reverse_contour(b); assert(a->next == NULL); assert(a->prev != NULL); assert(b->prev == NULL); @@ -2242,11 +2243,18 @@ dochar_plotter(char const data[YSIZE], unsigned flags) clearpath(); for (x = 0; x < XSIZE; x++) { for (y = 0; y < YSIZE; y++) { + bool connected = false; + if (GETPIX(x, y)) { if (R) CONNECT(1, 0); if (D) CONNECT(0, -1); if (DR && !D && !R) CONNECT(1, -1); if (DL && !D && !L) CONNECT(-1, -1); + if (!U && !D && !L && !R && + !UL && !UR && !DL && !DR) { + /* draw a dot */ + CONNECT(0, 0); + } } } }