Make the shadow bold offset configurable, after discovering that
[u/mdw/putty] / unix / pterm.c
index 5af9ba1..a459958 100644 (file)
@@ -432,9 +432,9 @@ gint key_event(GtkWidget *widget, GdkEventKey *event, gpointer data)
        output[31] = '\0';
        end = strlen(output);
        if (event->state & GDK_MOD1_MASK)
-           start = 0;
+           start = end = 0;
        else
-           start = 1;
+           start = end = 1;
 
        /* Control-` is the same as Control-\ (unless gtk has a better idea) */
        if (!event->string[0] && event->keyval == '`' &&
@@ -1296,16 +1296,9 @@ void do_text_internal(Context ctx, int x, int y, char *text, int len,
                  y*inst->font_height+cfg.window_border+inst->fonts[0]->ascent,
                  text, len);
 
-    /*
-     * X fonts seem to be pretty consistent about leaving the
-     * _left_ pixel of the cell blank rather than the right. Hence
-     * I'm going to hard-code shadow bolding as displaying one
-     * pixel to the left rather than try to work out whether it
-     * should be left or right.
-     */
     if (shadow) {
        gdk_draw_text(inst->pixmap, inst->fonts[fontid], gc,
-                     x*inst->font_width+cfg.window_border - 1,
+                     x*inst->font_width+cfg.window_border + cfg.shadowboldoffset,
                      y*inst->font_height+cfg.window_border+inst->fonts[0]->ascent,
                      text, len);
     }
@@ -1733,6 +1726,11 @@ int do_cmdline(int argc, char **argv, int do_everything)
        } else if (!strcmp(p, "-name")) {
            EXPECTS_ARG;
            app_name = val;
+
+       } else if (!strcmp(p, "-xrm")) {
+           EXPECTS_ARG;
+           provide_xrm_string(val);
+
        }
     }