- added BGFont that allows setting the background text font

- made Times New Roman default font for the background text because it should always have support for the locale's language


git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3560 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2004-06-11 15:33:00 +00:00
parent 0799b35cd6
commit b11c65e0f8
9 changed files with 158 additions and 17 deletions

View file

@ -394,6 +394,22 @@ definedlist.add("NSIS_SUPPORT_LANG_IN_STRINGS");
notify_hwnd=0;
#endif
bg_default_font.lfHeight=40;
bg_default_font.lfWidth=0;
bg_default_font.lfEscapement=0;
bg_default_font.lfOrientation=0;
bg_default_font.lfWeight=FW_BOLD;
bg_default_font.lfItalic=TRUE;
bg_default_font.lfUnderline=FALSE;
bg_default_font.lfStrikeOut=FALSE;
bg_default_font.lfCharSet=DEFAULT_CHARSET;
bg_default_font.lfOutPrecision=OUT_DEFAULT_PRECIS;
bg_default_font.lfClipPrecision=CLIP_DEFAULT_PRECIS;
bg_default_font.lfQuality=DEFAULT_QUALITY;
bg_default_font.lfPitchAndFamily=DEFAULT_PITCH;
strncpy(bg_default_font.lfFaceName,"Times New Roman",LF_FACESIZE);
memcpy(&bg_font,&bg_default_font,sizeof(LOGFONT));
defcodepage_set=false;
uDefCodePage=CP_ACP;
@ -2150,6 +2166,14 @@ void CEXEBuild::PreperHeaders(IGrowBuf *hdrbuf)
hdrbuf->add(cur_langtables->get(),cur_langtables->getlen());
cur_header->blocks[NB_CTLCOLORS].offset = hdrbuf->getlen();
hdrbuf->add(cur_ctlcolors->get(),cur_ctlcolors->getlen());
#ifdef NSIS_SUPPORT_BGBG
if (cur_header->bg_color1 != -1)
{
bg_font.lfFaceName[LF_FACESIZE-1]=0;
cur_header->blocks[NB_BGFONT].offset = hdrbuf->getlen();
hdrbuf->add(&bg_font,sizeof(LOGFONT));
}
#endif
memcpy(hdrbuf->get(),cur_header,sizeof(header));
}