summaryrefslogtreecommitdiff
path: root/src/modules/fonts
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/fonts')
-rw-r--r--src/modules/fonts/FontOptions.cpp10
-rw-r--r--src/modules/fonts/FontService.cpp8
2 files changed, 8 insertions, 10 deletions
diff --git a/src/modules/fonts/FontOptions.cpp b/src/modules/fonts/FontOptions.cpp
index 6270dd4613..4e33c31cc1 100644
--- a/src/modules/fonts/FontOptions.cpp
+++ b/src/modules/fonts/FontOptions.cpp
@@ -462,7 +462,7 @@ static void ShowEffectButton(HWND hwndDlg, BOOL bShow)
ShowWindow( GetDlgItem(hwndDlg, IDC_EFFECT_STATIC), bShow ? SW_SHOW : SW_HIDE);
}
-TCHAR* ModernEffectNames[] = { _T("<none>"), _T("Shadow at left"), _T("Shadow at right"), _T("Outline"), _T("Outline smooth"), _T("Smooth bump"), _T("Contour thin"), _T("Contour heavy") };
+TCHAR* ModernEffectNames[] = { LPGENT("<none>"), LPGENT("Shadow at left"), LPGENT("Shadow at right"), LPGENT("Outline"), LPGENT("Outline smooth"), LPGENT("Smooth bump"), LPGENT("Contour thin"), LPGENT("Contour heavy") };
static INT_PTR CALLBACK ChooseEffectDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
@@ -540,13 +540,11 @@ static void sttSaveFontData(HWND hwndDlg, FontInternal &F)
mir_snprintf(str, SIZEOF(str), "%sSize", F.prefix);
if (F.flags & FIDF_SAVEACTUALHEIGHT) {
- HDC hdc;
SIZE size;
- HFONT hFont, hOldFont;
CreateFromFontSettings(&F.value, &lf);
- hFont = CreateFontIndirect(&lf);
- hdc = GetDC(hwndDlg);
- hOldFont = (HFONT)SelectObject(hdc, hFont);
+ HFONT hFont = CreateFontIndirect(&lf);
+ HDC hdc = GetDC(hwndDlg);
+ HFONT hOldFont = (HFONT)SelectObject(hdc, hFont);
GetTextExtentPoint32(hdc, _T("_W"), 2, &size);
ReleaseDC(hwndDlg, hdc);
SelectObject(hdc, hOldFont);
diff --git a/src/modules/fonts/FontService.cpp b/src/modules/fonts/FontService.cpp
index 3458c91dfe..f1c7aae4e6 100644
--- a/src/modules/fonts/FontService.cpp
+++ b/src/modules/fonts/FontService.cpp
@@ -90,19 +90,19 @@ int LoadFontserviceModule(void)
// create generic fonts
FontIDT fontid = { sizeof(fontid) };
strncpy(fontid.dbSettingsGroup, "Fonts", sizeof(fontid.dbSettingsGroup));
- _tcsncpy(fontid.group, _T("General"), SIZEOF(fontid.group));
+ _tcsncpy(fontid.group, LPGENT("General"), SIZEOF(fontid.group));
- _tcsncpy(fontid.name, _T("Headers"), SIZEOF(fontid.name));
+ _tcsncpy(fontid.name, LPGENT("Headers"), SIZEOF(fontid.name));
fontid.flags = FIDF_APPENDNAME | FIDF_NOAS | FIDF_SAVEPOINTSIZE | FIDF_ALLOWEFFECTS | FIDF_CLASSHEADER;
strncpy(fontid.prefix, "Header", SIZEOF(fontid.prefix));
FontRegisterT(&fontid);
- _tcsncpy(fontid.name, _T("Generic text"), SIZEOF(fontid.name));
+ _tcsncpy(fontid.name, LPGENT("Generic text"), SIZEOF(fontid.name));
fontid.flags = FIDF_APPENDNAME | FIDF_NOAS | FIDF_SAVEPOINTSIZE | FIDF_ALLOWEFFECTS | FIDF_CLASSGENERAL;
strncpy(fontid.prefix, "Generic", SIZEOF(fontid.prefix));
FontRegisterT(&fontid);
- _tcsncpy(fontid.name, _T("Small text"), SIZEOF(fontid.name));
+ _tcsncpy(fontid.name, LPGENT("Small text"), SIZEOF(fontid.name));
fontid.flags = FIDF_APPENDNAME | FIDF_NOAS | FIDF_SAVEPOINTSIZE | FIDF_ALLOWEFFECTS | FIDF_CLASSSMALL;
strncpy(fontid.prefix, "Small", SIZEOF(fontid.prefix));
FontRegisterT(&fontid);