Use Consolas font if it exists, special Japanese font if required
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7244 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
3fd700e56c
commit
72dd0e4f72
7 changed files with 38 additions and 2 deletions
|
@ -1118,6 +1118,20 @@ HFONT CreateFontHelper(INT_PTR Data, int Height, DWORD p1, LPCTSTR Face)
|
|||
return CreateFont(Height, 0, 0, 0, w, FALSE, FALSE, FALSE, cs, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, paf, Face);
|
||||
}
|
||||
|
||||
BOOL CALLBACK FontExistsCallback(const LOGFONT*pLF, const TEXTMETRIC*pTM, DWORD Type, LPARAM Cookie)
|
||||
{
|
||||
*((BOOL*) Cookie) = TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
BOOL FontExists(LPCTSTR Face)
|
||||
{
|
||||
BOOL ret = FALSE;
|
||||
HDC hDC = GetDC(0);
|
||||
EnumFonts(hDC, Face, FontExistsCallback, (LPARAM) &ret);
|
||||
ReleaseDC(0, hDC);
|
||||
return ret;
|
||||
}
|
||||
|
||||
BOOL FillRectColor(HDC hDC, const RECT &Rect, COLORREF Color)
|
||||
{
|
||||
COLORREF orgclr = SetBkColor(hDC, Color);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue