X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unix%2Fgtkwin.c;h=b1c86dd896aff5e5423f4a4146a402bcfacfa725;hb=a454399ec8d841e627d9d5e05ac977536e776754;hp=88eadeb40def92c7e03c2a7ecdaf06491dfd5f5d;hpb=4df5d56f3df09398c1ffe8773c20cc4fecf3b102;p=PuTTY.git diff --git a/unix/gtkwin.c b/unix/gtkwin.c index 88eadeb4..b1c86dd8 100644 --- a/unix/gtkwin.c +++ b/unix/gtkwin.c @@ -819,10 +819,6 @@ gint key_event(GtkWidget *widget, GdkEventKey *event, gpointer data) } 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 @@ -3095,11 +3091,8 @@ void do_beep(void *frontend, int mode) 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; } @@ -3397,7 +3390,7 @@ void do_text_internal(Context ctx, int x, int y, wchar_t *text, int len, { 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; @@ -3494,11 +3487,20 @@ void do_text_internal(Context ctx, int x, int y, wchar_t *text, int len, 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); } @@ -3747,7 +3749,7 @@ static void help(FILE *fp) { " -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"