static int DrawCB(TableEvent *event) { fonttool_ui *ui = (fonttool_ui *) event->anydata; unsigned char c; Pixmap pixmap; c = 16*event->row + event->col; if (ui->font_id == BAD_FONT_ID) { pixmap = 0; } else { pixmap = char_to_pixmap(event->w, ui->font_id, c, ui->csize); } if (pixmap || c == ' ') { ui->valid_chars[c] = TRUE; } else { ui->valid_chars[c] = FALSE; } if (pixmap) { event->value_type = TABLE_CELL_PIXMAP; event->pixmap = pixmap; } return TRUE; }
static p_char * make_character (p_state *state, int c) { p_char *pc = (p_char *) malloc (sizeof (*pc)); pc->name = (unsigned char) c; pc->width = state->scale * state->char_width; pc->height = state->scale * state->char_height; char_to_pixmap (state, pc, c); return pc; }