- /*
- * The stuff we've just generated is assumed to be
- * ISO-8859-1! This sounds insane, but `man XLookupString'
- * agrees: strings of this type returned from the X server
- * are hardcoded to 8859-1. Strictly speaking we should be
- * doing this using some sort of GtkIMContext, which (if
- * we're lucky) would give us our data directly in Unicode;
- * but that's not supported in GTK 1.2 as far as I can
- * tell, and it's poorly documented even in 2.0, so it'll
- * have to wait.
- */
- lpage_send(inst->ldisc, CS_ISO8859_1, output+start, end-start, 1);
+ if (!inst->direct_to_font) {
+ /*
+ * The stuff we've just generated is assumed to be
+ * ISO-8859-1! This sounds insane, but `man
+ * XLookupString' agrees: strings of this type returned
+ * from the X server are hardcoded to 8859-1. Strictly
+ * speaking we should be doing this using some sort of
+ * GtkIMContext, which (if we're lucky) would give us
+ * our data directly in Unicode; but that's not
+ * supported in GTK 1.2 as far as I can tell, and it's
+ * poorly documented even in 2.0, so it'll have to
+ * wait.
+ */
+ lpage_send(inst->ldisc, CS_ISO8859_1, output+start, end-start, 1);
+ } else {
+ /*
+ * In direct-to-font mode, we just send the string
+ * exactly as we received it.
+ */
+ ldisc_send(inst->ldisc, output+start, end-start, 1);
+ }