static struct glyph {
union {
/* Top row (and left column) don't appear in ROM. */
- char data[YSIZE - 1];
+ unsigned char data[YSIZE - 1];
char const *alias_of;
int subr_idx;
};
#define SEP 0x01 /* Separated graphics */
#define MOS6 0x02 /* 6-cell mosaic graphics character */
#define MOS4 0x04 /* 4-cell mosaic graphics character */
+#define MOS8 0x08 /* 8-cell mosaic graphics character */
#define SEP6 (SEP | MOS6)
#define SEP4 (SEP | MOS4)
-#define JOIN_L 0x08 /* Copy left column leftward to join to next character. */
-#define JOIN_U 0x10 /* Copy top row upwards ditto. */
-#define JOIN_R 0x20 /* Pretend column to right is identical to right column. */
-#define JOIN_D 0x40 /* Similarly downwards. */
+#define JOIN_L 0x10 /* Copy left column leftward to join to next character. */
+#define JOIN_U 0x20 /* Copy top row upwards ditto. */
+#define JOIN_R 0x40 /* Pretend column to right is identical to right column. */
+#define JOIN_D 0x80 /* Similarly downwards. */
#define JOIN_H (JOIN_L | JOIN_R)
#define JOIN_V (JOIN_U | JOIN_D)
#define JOIN (JOIN_H | JOIN_V)
static void dochar_plotter(struct glyph *g);
static void domosaic(struct glyph *g);
static void domosaic4(struct glyph *g);
+static void domosaic8(struct glyph *g);
static void dopanose(void);
static void docmap(int pid, int eid, int format);
static void dogsub(void);
static void doglyph(struct glyph *);
static bool
-getpix(char const data[YSIZE - 1], int x, int y, unsigned flags)
+getpix(unsigned char const data[YSIZE - 1], int x, int y, unsigned flags)
{
/*
}
static int
-glyph_footprint(char data[YSIZE - 1])
+glyph_footprint(unsigned char data[YSIZE - 1])
{
int i;
int footprint = 0;
domosaic(g);
else if (g->flags & MOS4)
domosaic4(g);
+ else if (g->flags & MOS8)
+ domosaic8(g);
else if (plottermode)
dochar_plotter(g);
else
emit_path();
}
+static void
+domosaic8(struct glyph *g)
+{
+ unsigned code = g->data[0];
+
+ clearpath();
+ if (code & 1) tile(0, 7, 3, 10);
+ if (code & 2) tile(3, 7, 6, 10);
+ if (code & 4) tile(0, 5, 3, 7);
+ if (code & 8) tile(3, 5, 6, 7);
+ if (code & 16) tile(0, 3, 3, 5);
+ if (code & 32) tile(3, 3, 6, 5);
+ if (code & 64) tile(0, 0, 3, 3);
+ if (code & 128) tile(3, 0, 6, 3);
+ clean_path();
+ record_lsb(g);
+ emit_path();
+}
+
static int
byunicode(const void *va, const void *vb)
{