(from <Someone>)
- changed splash screen fonts to measure in logical pixels rather that points. Points are 1/72 inch regardless of screen resolution. If screen resolution changes so does visible image size. If font is measured in points then its visible size remains the same. The text is getting cut off (or becomes to small for the image) as a result.
This commit is contained in:
+2
-2
@@ -26,7 +26,7 @@ void mswin_init_splashfonts(HWND hWnd)
|
|||||||
HFONT fnt = NULL;
|
HFONT fnt = NULL;
|
||||||
LOGFONT lgfnt;
|
LOGFONT lgfnt;
|
||||||
ZeroMemory( &lgfnt, sizeof(lgfnt) );
|
ZeroMemory( &lgfnt, sizeof(lgfnt) );
|
||||||
lgfnt.lfHeight = -60*GetDeviceCaps(hdc, LOGPIXELSY)/72; // height of font
|
lgfnt.lfHeight = -80; // height of font
|
||||||
lgfnt.lfWidth = 0; // average character width
|
lgfnt.lfWidth = 0; // average character width
|
||||||
lgfnt.lfEscapement = 0; // angle of escapement
|
lgfnt.lfEscapement = 0; // angle of escapement
|
||||||
lgfnt.lfOrientation = 0; // base-line orientation angle
|
lgfnt.lfOrientation = 0; // base-line orientation angle
|
||||||
@@ -41,7 +41,7 @@ void mswin_init_splashfonts(HWND hWnd)
|
|||||||
lgfnt.lfPitchAndFamily = DEFAULT_PITCH; // pitch and family
|
lgfnt.lfPitchAndFamily = DEFAULT_PITCH; // pitch and family
|
||||||
NH_A2W( "Times New Roman", lgfnt.lfFaceName, LF_FACESIZE);
|
NH_A2W( "Times New Roman", lgfnt.lfFaceName, LF_FACESIZE);
|
||||||
version_splash_font = CreateFontIndirect(&lgfnt);
|
version_splash_font = CreateFontIndirect(&lgfnt);
|
||||||
lgfnt.lfHeight = -12*GetDeviceCaps(hdc, LOGPIXELSY)/72; // height of font
|
lgfnt.lfHeight = -16; // height of font
|
||||||
extrainfo_splash_font = CreateFontIndirect(&lgfnt);
|
extrainfo_splash_font = CreateFontIndirect(&lgfnt);
|
||||||
ReleaseDC(hWnd, hdc);
|
ReleaseDC(hWnd, hdc);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user