static void dochar(char const data[YSIZE], unsigned flags);
static void dochar_plotter(char const data[YSIZE], unsigned flags);
static void domosaic(unsigned code, bool sep);
+static void domosaic4(unsigned code);
static void dopanose(void);
static void glyph_complement(void);
int unicode;
char const *name;
unsigned int flags;
-#define SC 0x01 /* Character has a small-caps variant. */
-#define MOS 0x02 /* Mosaic graphics character */
+#define SC 0x01 /* Character has a small-caps variant. */
+#define MOS 0x02 /* Mosaic graphics character */
+#define MOS4 0x04 /* 4-cell mosaic graphics character */
} const glyphs[] = {
/*
* The first batch of glyphs comes from the code tables at the end of
{{012,012,012,033,000,033,012,012,012}, 0x256c, "SF440000" },
/* Block elements */
- {{037,037,037,037,037,000,000,000,000}, 0x2580, "upblock" },
- {{000,000,000,000,037,037,037,037,037}, 0x2584, "dnblock" },
+ {{ 3}, 0x2580, "upblock", MOS4 }, {{12}, 0x2584, "dnblock", MOS4 },
{{0x5f}, 0x2588, "block", MOS },
- {{0x15}, 0x258c, "lfblock", MOS },
- {{0x4a}, 0x2590, "rtblock", MOS },
+ {{0x15}, 0x258c, "lfblock", MOS }, {{0x4a}, 0x2590, "rtblock", MOS },
{{025,000,012,000,025,000,012,000,025}, 0x2591, "ltshade" },
{{022,011,004,022,011,004,022,011,004}, 0x2592, "shade" },
{{025,037,012,037,025,037,012,037,025}, 0x2593, "dkshade" },
+ {{ 4}, 0x2596, NULL, MOS4 }, {{ 8}, 0x2597, NULL, MOS4 },
+ {{ 1}, 0x2598, NULL, MOS4 }, {{13}, 0x2599, NULL, MOS4 },
+ {{ 9}, 0x259a, NULL, MOS4 }, {{ 7}, 0x259b, NULL, MOS4 },
+ {{11}, 0x259c, NULL, MOS4 }, {{ 2}, 0x259d, NULL, MOS4 },
+ {{ 6}, 0x259e, NULL, MOS4 }, {{14}, 0x259f, NULL, MOS4 },
/* Geometric shapes */
{{037,021,021,021,021,021,037,000,000}, 0x25a1, "H22073" },
if (glyphs[i].flags & MOS)
domosaic(glyphs[i].data[0],
(glyphs[i].data[0] & 0x20) != 0);
+ else if (glyphs[i].flags & MOS4)
+ domosaic4(glyphs[i].data[0]);
else {
if (plottermode)
dochar_plotter(glyphs[i].data, glyphs[i].flags);
emit_path();
}
+static void
+domosaic4(unsigned code)
+{
+
+ clearpath();
+ if (code & 1) tile(0, 6, 3, 11);
+ if (code & 2) tile(3, 6, 6, 11);
+ if (code & 4) tile(0, 1, 3, 6);
+ if (code & 8) tile(3, 1, 6, 6);
+ clean_path();
+ emit_path();
+}
+
static int
byunicode(const void *va, const void *vb)
{