summaryrefslogtreecommitdiff
path: root/utils/mir_fonts.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/mir_fonts.cpp')
-rw-r--r--utils/mir_fonts.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/utils/mir_fonts.cpp b/utils/mir_fonts.cpp
index 410f936fa3..cb0dba3571 100644
--- a/utils/mir_fonts.cpp
+++ b/utils/mir_fonts.cpp
@@ -12,10 +12,10 @@ int FontService_RegisterFont(const char *pszDbModule, const char *pszDbName, con
fid.cbSize = sizeof(fid);
mir_strncpy(fid.dbSettingsGroup, pszDbModule, sizeof(fid.dbSettingsGroup)); /* buffer safe */
mir_strncpy(fid.prefix, pszDbName, sizeof(fid.prefix)); /* buffer safe */
- mir_tstrncpy(fid.group, pszSection, _countof(fid.group)); /* buffer safe */
- mir_tstrncpy(fid.name, pszDescription, _countof(fid.name)); /* buffer safe */
- mir_tstrncpy(fid.backgroundGroup, pszBackgroundGroup, _countof(fid.backgroundGroup)); /* buffer safe */
- mir_tstrncpy(fid.backgroundName, pszBackgroundName, _countof(fid.backgroundName)); /* buffer safe */
+ mir_wstrncpy(fid.group, pszSection, _countof(fid.group)); /* buffer safe */
+ mir_wstrncpy(fid.name, pszDescription, _countof(fid.name)); /* buffer safe */
+ mir_wstrncpy(fid.backgroundGroup, pszBackgroundGroup, _countof(fid.backgroundGroup)); /* buffer safe */
+ mir_wstrncpy(fid.backgroundName, pszBackgroundName, _countof(fid.backgroundName)); /* buffer safe */
fid.flags = FIDF_ALLOWREREGISTER;
if (bAllowEffects) fid.flags |= FIDF_ALLOWEFFECTS;
fid.order = position;
@@ -28,7 +28,7 @@ int FontService_RegisterFont(const char *pszDbModule, const char *pszDbName, con
if (plfDefault->lfUnderline) fid.deffontsettings.style |= DBFONTF_UNDERLINE;
if (plfDefault->lfStrikeOut) fid.deffontsettings.style |= DBFONTF_STRIKEOUT;
fid.deffontsettings.charset = plfDefault->lfCharSet;
- mir_tstrncpy(fid.deffontsettings.szFace, plfDefault->lfFaceName, _countof(fid.deffontsettings.szFace)); /* buffer safe */
+ mir_wstrncpy(fid.deffontsettings.szFace, plfDefault->lfFaceName, _countof(fid.deffontsettings.szFace)); /* buffer safe */
}
FontRegisterT(&fid);
return 0;
@@ -37,8 +37,8 @@ int FontService_RegisterFont(const char *pszDbModule, const char *pszDbName, con
int FontService_GetFont(const wchar_t *pszSection, const wchar_t *pszDescription, COLORREF *pclr, LOGFONT *plf)
{
FontIDT fid = { 0 };
- mir_tstrncpy(fid.group, pszSection, _countof(fid.group)); /* buffer sfae */
- mir_tstrncpy(fid.name, pszDescription, _countof(fid.name)); /* buffer safe */
+ mir_wstrncpy(fid.group, pszSection, _countof(fid.group)); /* buffer sfae */
+ mir_wstrncpy(fid.name, pszDescription, _countof(fid.name)); /* buffer safe */
*pclr = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)plf); /* uses fallback font on error */
return (int)*pclr == -1;
}
@@ -50,8 +50,8 @@ int FontService_RegisterColor(const char *pszDbModule, const char *pszDbName, co
cid.defcolour = clrDefault;
mir_strncpy(cid.dbSettingsGroup, pszDbModule, sizeof(cid.dbSettingsGroup)); /* buffer safe */
mir_strncpy(cid.setting, pszDbName, sizeof(cid.setting)); /* buffer safe */
- mir_tstrncpy(cid.group, pszSection, _countof(cid.group)); /* buffer safe */
- mir_tstrncpy(cid.name, pszDescription, _countof(cid.name)); /* buffer safe */
+ mir_wstrncpy(cid.group, pszSection, _countof(cid.group)); /* buffer safe */
+ mir_wstrncpy(cid.name, pszDescription, _countof(cid.name)); /* buffer safe */
ColourRegisterT(&cid);
return 0;
}