aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakamichi Horikawa <takamichiho@gmail.com>2017-02-12 11:11:28 +0900
committerTakamichi Horikawa <takamichiho@gmail.com>2017-02-12 11:11:28 +0900
commit943aece1739caab20af5e6d82f9159e107a2f908 (patch)
tree5cea7b85f1f7ef9fff753d55c5388ff7127307da
parent70740cb91024ea9d2eef79e37ea8a757e60ae13b (diff)
winfont: doublebyte halfwidth characters
-rw-r--r--win32/winfont.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/win32/winfont.c b/win32/winfont.c
index fb98ccd..226f4df 100644
--- a/win32/winfont.c
+++ b/win32/winfont.c
@@ -73,7 +73,12 @@ static const void *winfont_get(const struct fmdsp_font *font,
TextOut(fw->dc, 0, 0, text, 1);
break;
case FMDSP_FONT_JIS_LEFT:
- text[0] = jis2uni(c);
+ if (c>>8 == 0x29) {
+ // doublebyte halfwidth
+ text[0] = jis2unih(c & 0xff);
+ } else {
+ text[0] = jis2uni(c);
+ }
TextOut(fw->dc, 0, 0, text, 1);
break;
case FMDSP_FONT_JIS_RIGHT: