if (fs.height == 0)
buf = dupprintf("Font: %s, %sdefault height", fs.name, boldstr);
else
- buf = dupprintf("Font: %s, %s%d-point", fs.name, boldstr,
- (fs.height < 0 ? -fs.height : fs.height));
+ buf = dupprintf("Font: %s, %s%d-%s", fs.name, boldstr,
+ (fs.height < 0 ? -fs.height : fs.height),
+ (fs.height < 0 ? "pixel" : "point"));
SetDlgItemText(dp->hwnd, c->base_id+1, buf);
sfree(buf);
}
ret.height = read_setting_i(handle, settingname, INT_MIN);
sfree(settingname);
if (ret.height == INT_MIN) return 0;
- if (ret.height < 0) {
- int oldh, newh;
- HDC hdc = GetDC(NULL);
- int logpix = GetDeviceCaps(hdc, LOGPIXELSY);
- ReleaseDC(NULL, hdc);
-
- oldh = -ret.height;
- newh = MulDiv(oldh, 72, logpix) + 1;
- if (MulDiv(newh, logpix, 72) > oldh)
- newh--;
- ret.height = newh;
- }
*result = ret;
return 1;
}