void os_beep (int);
int os_char_width (zchar);
+int os_check_unicode (int, zword);
void os_display_char (zchar);
void os_display_string (const zchar *);
void os_draw_picture (int, int, int);
};
extern zword object_name (zword);
+extern zword get_window_font (zword);
static zchar decoded[10];
static zword encoded[3];
else if (c >= 0xa1 && c <= 0xff)
store (3);
#else
- else if (c >= 0xa1)
- /* being optimistic, we can print all unicode characters
+ else if (c >= 0xa1) {
+ /* being optimistic, we can print all unicode characters supported
* and input the ones with zscii representation
*/
- store ((unicode_to_zscii (c) != 0) ? 3 : 1);
+ zword mask = (unicode_to_zscii (c) != 0) ? 3 : 1;
+ store (mask & os_check_unicode (get_window_font(cwin), c));
+ }
#endif
else
store (0);
}/* os_display_string */
+/*
+ * os_check_unicode
+ *
+ * Return with bit 0 set if the Unicode character can be
+ * displayed, and bit 1 if it can be input.
+ *
+ */
+int os_check_unicode(int font, zword c)
+{
+/* Assume full input and output. */
+ return 3;
+}
/*
* os_char_width
return screen_changes + r * h_screen_cols;
}
+int os_check_unicode(int font, zword c)
+{
+/* Only UTF-8 output, no input yet. */
+ return 1;
+}
+
int os_char_width (zchar z)
{
if (plain_ascii && z >= ZC_LATIN1_MIN) {