Revision: 9549 https://osdn.net/projects/ttssh2/scm/svn/commits/9549 Author: zmatsuo Date: 2021-12-01 00:58:43 +0900 (Wed, 01 Dec 2021) Log Message: ----------- font quality の設定ができなかったので修正 - font property page の lng 参照を Unicode化した Modified Paths: -------------- trunk/teraterm/teraterm/font_pp.cpp trunk/teraterm/teraterm/font_pp.rc -------------- next part -------------- Modified: trunk/teraterm/teraterm/font_pp.cpp =================================================================== --- trunk/teraterm/teraterm/font_pp.cpp 2021-11-30 15:58:34 UTC (rev 9548) +++ trunk/teraterm/teraterm/font_pp.cpp 2021-11-30 15:58:43 UTC (rev 9549) @@ -49,7 +49,7 @@ struct FontPPData { HINSTANCE hInst; - const char *UILanguageFile; + const wchar_t *UILanguageFileW; TTTSet *pts; DLGTEMPLATE *dlg_templ; // LOGFONTA VTFont; @@ -75,10 +75,11 @@ { if (Message == WM_INITDIALOG) { FontPPData *dlg_data = (FontPPData *)(((CHOOSEFONTA *)lParam)->lCustData); - wchar_t uimsg[MAX_UIMSG]; - get_lang_msgW("DLG_CHOOSEFONT_STC6", uimsg, _countof(uimsg), - L"\"Font style\" selection here won't affect actual font appearance.", dlg_data->UILanguageFile); + wchar_t *uimsg; + static const wchar_t def[] = L"\"Font style\" selection here won't affect actual font appearance."; + GetI18nStrWW("Tera Term", "DLG_CHOOSEFONT_STC6", def, dlg_data->UILanguageFileW, &uimsg); SetDlgItemTextW(Dialog, stc6, uimsg); + free(uimsg); SetFocus(GetDlgItem(Dialog,cmb1)); @@ -202,6 +203,14 @@ SetDlgLogFont(GetParent(hWnd), &dlg_data->DlgFont, ts); + // font quality + int cur = (int)SendDlgItemMessageA(hWnd, IDC_FONT_QUALITY, CB_GETCURSEL, 0, 0); + ts->FontQuality = + cur == 0 ? DEFAULT_QUALITY : + cur == 1 ? NONANTIALIASED_QUALITY : + cur == 2 ? ANTIALIASED_QUALITY : + CLEARTYPE_QUALITY; + break; } case PSN_HELP: @@ -262,7 +271,7 @@ FontPPData *Param = (FontPPData *)calloc(sizeof(FontPPData), 1); Param->hInst = inst; - Param->UILanguageFile = pts->UILanguageFile; + Param->UILanguageFileW = pts->UILanguageFileW; Param->pts = pts; PROPSHEETPAGEW_V1 psp = {}; Modified: trunk/teraterm/teraterm/font_pp.rc =================================================================== --- trunk/teraterm/teraterm/font_pp.rc 2021-11-30 15:58:34 UTC (rev 9548) +++ trunk/teraterm/teraterm/font_pp.rc 2021-11-30 15:58:43 UTC (rev 9549) @@ -65,7 +65,7 @@ LTEXT "\x83t\x83H\x83\x93\x83g\x95i\x8E\xBF",IDC_STATIC,19,129,39,8 CONTROL "OS\x82Ŕ\xF1\x95\\x8E\xA6\x82̃t\x83H\x83\x93\x83g\x82\xE0\x83t\x83H\x83\x93\x83g\x83_\x83C\x83A\x83\x8D\x83O\x82̈ꗗ\x82ɕ\\x8E\xA6\x82\xB7\x82\xE9",IDC_LIST_HIDDEN_FONTS, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,194,200,10 - COMBOBOX IDC_FONT_QUALITY,30,141,87,69,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_FONT_QUALITY,30,141,87,69,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "\x95\xB6\x8E\x9A\x95`\x89\xE6\x82Ŏg\x97p\x82\xB7\x82\xE9API",IDC_STATIC,19,50,80,8 CONTROL "\x83v\x83\x8D\x83|\x81[\x83V\x83\x87\x83i\x83\x8B\x83t\x83H\x83\x93\x83g\x82\xE0\x83t\x83H\x83\x93\x83g\x83_\x83C\x83A\x83\x8D\x83O\x82̈ꗗ\x82ɕ\\x8E\xA6\x82\xB7\x82\xE9",IDC_LIST_PRO_FONTS, "Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,7,209,203,10