}
if (event->type == GDK_KEY_PRESS) {
- /*
- * NYI: Compose key (!!! requires Unicode faff before even trying)
- */
-
/*
* If Alt has just been pressed, we start potentially
* accumulating an Alt+numberpad code. We do this by
int char_width(Context ctx, int uc)
{
/*
- * Under X, any fixed-width font really _is_ fixed-width.
- * Double-width characters will be dealt with using a separate
- * font. For the moment we can simply return 1.
- *
- * FIXME: but is that also true of Pango?
+ * In this front end, double-width characters are handled using a
+ * separate font, so this can safely just return 1 always.
*/
return 1;
}
{
struct draw_ctx *dctx = (struct draw_ctx *)ctx;
struct gui_data *inst = dctx->inst;
- int ncombining, combining;
+ int ncombining;
int nfg, nbg, t, fontid, shadow, rlen, widefactor, bold;
int monochrome =
gdk_visual_get_depth(gtk_widget_get_visual(inst->area)) == 1;
rlen*widefactor*inst->font_width, inst->font_height);
draw_set_colour(dctx, nfg);
- for (combining = 0; combining < ncombining; combining++) {
+ if (ncombining > 1) {
+ assert(len == 1);
+ unifont_draw_combining(&dctx->uctx, inst->fonts[fontid],
+ x*inst->font_width+inst->window_border,
+ (y*inst->font_height+inst->window_border+
+ inst->fonts[0]->ascent),
+ text, ncombining, widefactor > 1,
+ bold, inst->font_width);
+ } else {
unifont_draw_text(&dctx->uctx, inst->fonts[fontid],
x*inst->font_width+inst->window_border,
- y*inst->font_height+inst->window_border+inst->fonts[0]->ascent,
- text + combining, len, widefactor > 1,
+ (y*inst->font_height+inst->window_border+
+ inst->fonts[0]->ascent),
+ text, len, widefactor > 1,
bold, inst->font_width);
}
" -ut, +ut Do(default) or do not update utmp\n"
" -ls, +ls Do(default) or do not make shell a login shell\n"
" -sb, +sb Do(default) or do not display a scrollbar\n"
-" -log PATH Log all output to a file\n"
+" -log PATH, -sessionlog PATH Log all output to a file\n"
" -nethack Map numeric keypad to hjklyubn direction keys\n"
" -xrm RESOURCE-STRING Set an X resource\n"
" -e COMMAND [ARGS...] Execute command (consumes all remaining args)\n"
errmsg);
messagebox(inst->window, "Font setup error", msgboxtext,
string_width("Could not change fonts in terminal window:"),
- "OK", 'o', +1, 1,
+ FALSE, "OK", 'o', +1, 1,
NULL);
sfree(msgboxtext);
sfree(errmsg);