- gpps(sesskey, "Font", "XXX", cfg->font, sizeof(cfg->font));
- gppi(sesskey, "FontIsBold", 0, &cfg->fontisbold);
- gppi(sesskey, "FontCharSet", 0, &cfg->fontcharset);
- gppi(sesskey, "FontHeight", 10, &cfg->fontheight);
-#ifdef _WINDOWS
- if (cfg->fontheight < 0) {
- int oldh, newh;
- HDC hdc = GetDC(NULL);
- int logpix = GetDeviceCaps(hdc, LOGPIXELSY);
- ReleaseDC(NULL, hdc);
-
- oldh = -cfg->fontheight;
- newh = MulDiv(oldh, 72, logpix) + 1;
- if (MulDiv(newh, logpix, 72) > oldh)
- newh--;
- cfg->fontheight = newh;
- }
-#endif