+static wchar_t
+fullwidth_of(int ch)
+{
+ return (ch + 0xff10 - '0');
+}
+
+static void
+make_fullwidth_text(wchar_t *target, const char *source)
+{
+ int ch;
+ while ((ch = *source++) != 0) {
+ *target++ = fullwidth_of(ch);
+ }
+ *target = 0;
+}
+
+static void
+make_narrow_text(wchar_t *target, const char *source)
+{
+ int ch;
+ while ((ch = *source++) != 0) {
+ *target++ = ch;
+ }
+ *target = 0;
+}
+
+static void
+make_fullwidth_digit(cchar_t *target, int digit)
+{
+ wchar_t source[2];
+
+ source[0] = fullwidth_of(digit + '0');
+ source[1] = 0;
+ setcchar(target, source, A_NORMAL, 0, 0);
+}
+