row_modes[col] = m;
row_glyphs[col] = font_glyph(st, c,
- (m & TMODE_GFX) != 0);
+ (m & TMODE_GFX) != 0, false);
/* XOR text cursor handling */
if (st->cursor_disabled_ticks == 0 &&
* uint8_t *[FONT_WIDTH], uint8_t *, ...
*/
void *
-font_glyph(state_t *state, uint32_t c, bool decgfx)
+font_glyph(state_t *state, uint32_t c, bool decgfx, bool raw)
{
/* Default to unknown glyph */
uint8_t (*glyph)[FONT_WIDTH] = state->font_unknown->glyphs[0];
font_t *font;
ftable_t *table;
+ if (raw)
+ goto raw;
+
/*
* Map unsupported glyphs to supported ones where relevant.
* XXX May need a more generic mapping table eventually.
else if (cfg_uppercaseview && c > 96 && c < 123)
c -= 32;
+raw:
+
/* Glyph order character tables */
for (table = state->ftable; table != NULL; table = table->next) {
/* Check for possible empty user table */
int i;
/* Can never be NULL but can be "unknown" */
- if ((gl = font_glyph(state, c, false)) ==
+ if ((gl = font_glyph(state, c, false, true)) ==
state->font_unknown->glyphs[0]) {
/*
* Unknown, create new user glyph.
void font_init(state_t *, screen_t *);
void font_cleanup(state_t *);
void font_reset(state_t *);
-void *font_glyph(state_t *, uint32_t, bool);
+void *font_glyph(state_t *, uint32_t, bool, bool);
void font_edit(state_t *, uint32_t, int, int);