Merge pull request #242 from andrews05/minfontsize
Add min_font_size setting
This commit is contained in:
commit
2e22226caf
2 changed files with 9 additions and 0 deletions
|
@ -370,6 +370,7 @@ static void cfg_create_ini()
|
||||||
"non_anti_aliased_fonts=true\n"
|
"non_anti_aliased_fonts=true\n"
|
||||||
"custom_width=0\n"
|
"custom_width=0\n"
|
||||||
"custom_height=0\n"
|
"custom_height=0\n"
|
||||||
|
"min_font_size=0\n"
|
||||||
"\n"
|
"\n"
|
||||||
"\n"
|
"\n"
|
||||||
"\n"
|
"\n"
|
||||||
|
|
|
@ -935,6 +935,14 @@ HFONT WINAPI fake_CreateFontA(
|
||||||
if (cfg_get_bool("non_anti_aliased_fonts", TRUE))
|
if (cfg_get_bool("non_anti_aliased_fonts", TRUE))
|
||||||
fdwQuality = NONANTIALIASED_QUALITY;
|
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
|
return
|
||||||
real_CreateFontA(
|
real_CreateFontA(
|
||||||
nHeight,
|
nHeight,
|
||||||
|
|
Loading…
Reference in a new issue