1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-15 06:04:49 +01:00

Add min_font_size setting

This commit is contained in:
andrews05 2023-09-16 10:08:15 +12:00
parent 02d70d9afd
commit 3c264e2077
2 changed files with 9 additions and 0 deletions

View File

@ -370,6 +370,7 @@ static void cfg_create_ini()
"non_anti_aliased_fonts=true\n"
"custom_width=0\n"
"custom_height=0\n"
"min_font_size=0\n"
"\n"
"\n"
"\n"

View File

@ -935,6 +935,14 @@ HFONT WINAPI fake_CreateFontA(
if (cfg_get_bool("non_anti_aliased_fonts", TRUE))
fdwQuality = NONANTIALIASED_QUALITY;
int minFontSize = cfg_get_int("min_font_size", 0);
if (nHeight < 0) {
nHeight = min(-minFontSize, nHeight);
}
else {
nHeight = max(minFontSize, nHeight);
}
return
real_CreateFontA(
nHeight,