|
|
#1 |
|
Senior Member
Join Date: Feb 2005
Location: London
Posts: 193
|
System Font
Is there a risk in changing the font of the installer?
Normally the default font "MS Shell Dlg" on Windows XP resolves as Tahoma. For "subjective" reasons I believe Microsoft Sans Serif looks better. What would happen if the local target system does not have Microsoft Sans Serif? |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
All systems should have Sans Serif. This is so because in CSS, sans-serif is on the list of 'certified fonts' that must exist on all systems as specified by W3C.
Anyway, I'm sure that if the font you specify does not exist, then the default Windows font will be used anyway. -Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Feb 2005
Location: London
Posts: 193
|
There are about three different Sans Serif fonts installed into the Windows Font folder.
Microsoft Sans Serif is not necessarily one of them. I recently found this on the internet: These are the only *.ttf fonts you will absolutely need... arial.ttf arialbd.ttf arialbi.ttf ariali.ttf courbd.ttf lucon.ttf marlett.ttf micross.ttf tahoma.ttf tahomabd.ttf times.ttf timesbd.ttf verdana.ttf verdanab.ttf verdanai.ttf verdanaz.ttf Just now I've been experimenting with Vogue. I disable Vogue (in Adobe Type Manager) and the installer substitutes it with an illegible font. This suggests you need to install and register fonts. Is that true, and is there an easy script for it? I'm too lazy to search the board, I guess. |
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Feb 2005
Location: London
Posts: 193
|
I had to make sure I wasn't spreading any lies.
I have a backup image of Windows 95 and the Fonts folder does not include micross.ttf = Microsoft Sans Serif. That's the truth. And I found this piece of code on the message board: PHP Code:
Last edited by bnicer; 13th February 2005 at 14:19. |
|
|
|
|
|
#5 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Feb 2005
Location: London
Posts: 193
|
Thank you, Stu,
I visited your link. Windows XP has: Microsoft Sans Serif Modern MS Sans Serif And Windows 95 only has: MS Sans Serif That might be a problem. As to using code or a plug-in to register the font, others have more experience than I do. I consider this a good point to ask: Can you register a font before an installation so it shows up during the installation? |
|
|
|
|
|
#7 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
There's this cool plugin you can use on here (fonts.dll):
http://nsis.sourceforge.net/archive/download.php You could try calling this in your installer's .onInit function, and then it should appear on your installer. -Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#8 |
|
Senior Member
Join Date: Feb 2005
Location: London
Posts: 193
|
Thanks. The plug-in is worth a shot.
I tested my installer on Windows 95. A version of the installer where I changed the font to Microsoft Sans Serif replaced the missing font with a typeface that was too large. The size of the setup window increased from 503x386 to 668x469 pixels, and bold page headers did not become bigger. I will spare you the screenshot. I noticed something else in Windows 95. My code has a glitch, but I can't see what's wrong. I'm trying to hide a checkbox from non-NT Windows. PHP Code:
Should I put this in a new topic under a new post, or is everyone okay with it? |
|
|
|
|
|
#9 |
|
Senior Member
Join Date: Feb 2005
Location: London
Posts: 193
|
continued from previous
RE: a compatibility issue when asking for the account type on computers which don't have user accounts, Windows 9x and ME. The proposed work-around, to run an NT check before querying the account type, doesn't work either. I omitted that from the code excerpt. Here is the first function again with the part I left out: PHP Code:
|
|
|
|
|
|
#10 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
I think the reason that it's hidden on 9x is because of this:
ClearErrors UserInfo::GetName IfErrors next ; an error occurs under Windows 9x! Am I correct to assume you generally want those without user accounts enabled (ie Win95) to have access... so you could change your code around a little if that is the case... code: -Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#11 |
|
Senior Member
Join Date: Feb 2005
Location: London
Posts: 193
|
I'd like to hide the checkbox. When a user ticks it, the shortcut folder will be put in the common startmenu folder for all users.
That part of the code should be skipped by Windows 95, 98 and Windows ME. $ACCOUNT should equal "" on those systems; "access" should be defined for Administrators and Power Users only. Maybe this is a topic for a new post. Better news on the original topic. If you change the installer font to "MS Sans Serif" instead of "Microsoft Sans Serif", it displays correctly in Windows 95, and Windows XP! |
|
|
|
|
|
#12 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
Have you used my code?
-Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#13 |
|
Senior Member
Join Date: Feb 2005
Location: London
Posts: 193
|
Sorry, no.
I wasn't paying attention. Your code is better than mine, isn't it? I haven't tried it yet. I'll get on it. Thanks. ps: this should take about half an hour, if you want to hang around. |
|
|
|
|
|
#14 |
|
Senior Member
Join Date: Feb 2005
Location: London
Posts: 193
|
I'll be out of commission for a few days I have a feeling.
Either my motherboard short-circuited or the CPU. The whole computer is dead. No condolence messages, please. I might be up and running again sooner than you think. Then again, maybe not. ps: I'm sending this from a laptop in case you're wondering. pps: Be careful when you switch those harddisks. |
|
|
|
|
|
#15 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
It's practically the same except I've allowed those without user accounts (ie with no User Name) access for your check-box.
-Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#16 |
|
Senior Member
Join Date: Feb 2005
Location: London
Posts: 193
|
Stu, I'm back. In part.
UserInfo::GetName fails to return an error... despite your slight variation. Thanks for the input (above). I think there is something perverse about the UserInfo plug-in. Wish I could put my finger on it. - Tom |
|
|
|
|
|
#17 | |
|
Major Dude
Join Date: Mar 2003
Posts: 569
|
Quote:
UserInfo::GetName returns the Windows login name UserInfo::GetAccountType returns "Admin" The source code for the plugin shows that GetAccountType will return "Admin" if used on Win9x systems. I think an earlier version of the UserInfo plugin did return an error but that was a long time ago (the current source code file is dated November 2003). |
|
|
|
|
|
|
#18 |
|
Senior Member
Join Date: Feb 2005
Location: London
Posts: 193
|
It's supposed to return an error (and skip to next). On Windows 9x there are no users. GetUserName is followed by the IfErrors line.
Concerning the source code, I agree with you. UserInfo::GetAccountType returns "Admin" on Win 9x systems. Again, why doesn't it just return "", which would be more accurate? |
|
|
|
|
|
#19 | |||
|
Major Dude
Join Date: Mar 2003
Posts: 569
|
Quote:
Quote:
Quote:
|
|||
|
|
|
|
|
#20 |
|
Senior Member
Join Date: Feb 2005
Location: London
Posts: 193
|
I am referring to the example.nsi. I took for granted that an error would be returned.
I thought GetAccountType would detect the type of user account on NT-based OSes. There should be a plug-in to find out whether the user is on a non-NT-based OS. |
|
|
|
|
|
#21 |
|
Senior Member
Join Date: Feb 2005
Location: London
Posts: 193
|
I prefer happy endings and practical solutions.
A solution to what? Well, if you have been following this thread, you will be aware that the example script for the UserInfo plug-in is somewhat outdated and somewhat misleading. I was misled into believing you could adopt the script in order to hide a checkbox under Windows 9x and Windows ME. You can't, but here's what you can do: 1. Create a custom page (see ..\NSIS\Contrib\InstallOptions\Readme.html - "InstallOptions 2") 2. Create a checkbox field (edit the INI file) 3. Label the checkbox, for example: Make shortcuts available to all users 4. Insert the code below into your *.nsi script Disclaimer: I'm only a junior member. I make mistakes.code: THE END |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|