chiark / gitweb /
Add U+0149, "napostrophe".
authorBen Harris <bjh21@bjh21.me.uk>
Wed, 9 Aug 2017 21:03:56 +0000 (22:03 +0100)
committerBen Harris <bjh21@bjh21.me.uk>
Wed, 9 Aug 2017 21:03:56 +0000 (22:03 +0100)
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.

bedstead.c

index 9bfad09a4065e9edbd25dc7f0f2b0d57a8781fc4..aecc904b1c5768c5c01ce9062db94ca4ef10b807 100644 (file)
@@ -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);
+                               }
                        }
                }
        }