Old 17th September 2004, 04:38   #1
Venu
Junior Member
 
Join Date: Sep 2004
Location: England
Posts: 48
How to increase the text size appearing on MUI Pages

Hi all,

Can any one tell me how can I increase the size of the text appearing on MUI_WELCOMEPAGE. The text I want to display using MUI_WELCOMEPAGE_TEXT seems to be small. Is there any way to increase its font size.

Thanks
Venu
Venu is offline   Reply With Quote
Old 17th September 2004, 15:30   #2
Comm@nder21
Major Dude
 
Join Date: Jul 2003
Location: germany, b-w
Posts: 734
Send a message via ICQ to Comm@nder21
see the documentation
there's a define to do that.
search the readme.html for "3LINES"
Comm@nder21 is offline   Reply With Quote
Old 4th January 2007, 12:47   #3
fluidz91
Member
 
Join Date: Jun 2006
Location: Paris - FR
Posts: 58
Hi,

i use :
code:

!define MUI_WELCOMEPAGE_TITLE_3LINES
!insertmacro MUI_PAGE_WELCOME



and it works perfectly due to answer in this thread ! ^^

I have a custom page with title that is too long to display entirely, can i and how i use the _3LINES statment in this case ?

code:

Page custom CustomPageA CustomPageALeave
...
Function CustomPageA
!insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "setup.ini"
FunctionEnd



Thank you
fluidz91 is offline   Reply With Quote
Old 4th January 2007, 15:25   #4
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
Re: How to increase the text size appearing on MUI Pages

Quote:
Originally posted by Venu
Hi all,

Can any one tell me how can I increase the size of the text appearing on MUI_WELCOMEPAGE. The text I want to display using MUI_WELCOMEPAGE_TEXT seems to be small. Is there any way to increase its font size.

Thanks
Venu
code:
!include mui.nsh
!include WinMessages.nsh
###################################

!define MUI_PAGE_CUSTOMFUNCTION_SHOW wel_show
!insertmacro MUI_PAGE_WELCOME

##################################
Function wel_show
FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $1 $0 1202
CreateFont $0 "$(^Font)" "10" ""
SendMessage $1 ${WM_SETFONT} $0 0
FunctionEnd


Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 16th December 2008, 20:44   #5
michaelmross
Junior Member
 
Join Date: Jun 2004
Posts: 19
Only works going forward

This code works when the Welcome page appears. But if you click Back from the next page, it reverts to normal. (BTW I think it's kind of ridiculous that one has to jump through hoops to bold some text on the welcome page - this is such a common requirement.)
michaelmross is offline   Reply With Quote
Old 16th December 2008, 21:06   #6
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
seems to work fine for me..

code:

!include mui.nsh
!include WinMessages.nsh

!define MUI_PAGE_CUSTOMFUNCTION_SHOW wel_show
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_WELCOME

!insertmacro MUI_LANGUAGE "English"

OutFile "c:\testsetup.exe"

Function wel_show
FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $1 $0 1202
CreateFont $0 "$(^Font)" "10" ""
SendMessage $1 ${WM_SETFONT} $0 0
FunctionEnd

Section
SectionEnd



It's not really that many hoops - you can easily abstract the function to something like ${SetTextSize} <control> <size>. Of course if you just want to define your Welcome page using e.g. Word and define the markup of elements there... perhaps NSIS is not the most appropriate solution.
Animaether is offline   Reply With Quote
Old 17th July 2019, 11:38   #7
DivyaArun
Junior Member
 
Join Date: Jul 2019
Posts: 30
How to increase the text size of Welcome Page Text

Hello All,

I wanted to make the text size slightly bigger in the Welcome Page Text. I assume it now uses Tahoma 8. When I set font using SetFont "Tahoma" 10", the dialogs height and width also becomes larger and all the pages fonts change. I have also tried the code from the link

https://nsis-dev.github.io/NSIS-Foru.../t-193848.html

But I am facing the same issue mentioned in the link - "This code works when the Welcome page appears. But if you click Back from the next page, it reverts to normal."

Please help!!!
DivyaArun is offline   Reply With Quote
Old 17th July 2019, 19:55   #8
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,153
Quote:
Originally Posted by DivyaArun View Post
Please help!!!
MUI 1 or 2?

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 18th July 2019, 04:41   #9
DivyaArun
Junior Member
 
Join Date: Jul 2019
Posts: 30
Quote:
Originally Posted by anders View Post
mui 1 or 2?
mui1
DivyaArun is offline   Reply With Quote
Old 18th July 2019, 20:34   #10
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,153
FindWindow might find the wrong window, you should be using $MUI_HWND.

You can also read the HWND from the .ini
PHP Code:
Var WizNormFont

Function wel_show
    StrCmp 
"" $WizNormFont "" +2
    CreateFont $WizNormFont 
"$(^Font)" "10" ""
    
!insertmacro INSTALLOPTIONS_READ $"ioSpecial.ini" "Field 3" "HWND" #GetDlgItem $1 $MUI_HWND 1202
    
SendMessage $${WM_SETFONT$WizNormFont 0
FunctionEnd 

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 23rd July 2019, 09:05   #11
DivyaArun
Junior Member
 
Join Date: Jul 2019
Posts: 30
Quote:
Originally Posted by Anders View Post
FindWindow might find the wrong window, you should be using $MUI_HWND.

You can also read the HWND from the .ini
PHP Code:
Var WizNormFont

Function wel_show
    StrCmp 
"" $WizNormFont "" +2
    CreateFont $WizNormFont 
"$(^Font)" "10" ""
    
!insertmacro INSTALLOPTIONS_READ $"ioSpecial.ini" "Field 3" "HWND" #GetDlgItem $1 $MUI_HWND 1202
    
SendMessage $${WM_SETFONT$WizNormFont 0
FunctionEnd 
Hi,

The given code has helped me to change the font of first page. I have a question related to changing font globally.

When I set font as - SetFont "Tahoma" 9, though this changes the font in all pages, at the same time the installer pages width and height is also increased. I think the default font is 8. So I suppose changing from 8 -> 9 should not increase the dimensions of the installer window. Can anyone clarify?
DivyaArun is offline   Reply With Quote
Old 23rd July 2019, 11:00   #12
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,153
Dialogs use something called dialog units, not pixels, when it first displays the dialog. Dialog units are based on the font size.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump