Old 2nd March 2013, 08:44   #1
stass
Senior Member
 
Join Date: Nov 2012
Posts: 145
Information about the font file

Help please - how do you know the name and version of the font file? For example, TTF...
Can it possible to use API FontResource function? How?
stass is offline   Reply With Quote
Old 3rd March 2013, 06:16   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
For the name, you can use the FontName plug-in. I'm not sure what you mean by the font version...

http://nsis.sourceforge.net/FontName_plug-in

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 3rd March 2013, 13:04   #3
stass
Senior Member
 
Join Date: Nov 2012
Posts: 145
Quote:
Originally Posted by kichik View Post
I'm not sure what you mean by the font version...
For example, the font file arial.ttf - Version 3.00
georgia.ttf - Version 2.12 And so on ...
To update the fonts I need to know the version of the font. How to do it?
FontName plug-in to determine the version of the font can not ...
stass is offline   Reply With Quote
Old 3rd March 2013, 23:55   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
First time I hear about font versions. I can't find anything about it in the Win32 API. If you can find an exported function that does the trick, you can call it using System::Call. I couldn't find anything with a quick Google search... Maybe you'll have to parse the file manually.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 4th March 2013, 05:04   #5
stass
Senior Member
 
Join Date: Nov 2012
Posts: 145
Quote:
Originally Posted by kichik View Post
I couldn't find anything with a quick Google search...
We must somehow get the version information from the table Naming Table ( Name IDs Code 5 Version string )
http://www.microsoft.com/typography/otspec/name.htm
But how?
I wonder how to make a program to view the details of fonts ?
stass is offline   Reply With Quote
Old 4th March 2013, 13:43   #6
T.Slappy
Major Dude
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 531
Send a message via ICQ to T.Slappy
I think the easiest is to write simple plug-in (.dll) which can load this.
Calling API functions from NSIS is not enough in this case.

Cool looking installer with custom design: www.graphical-installer.com
I offer NSIS scripting, C/C++/C#/Delphi programming: www.unsigned.sk
Develop NSIS projects in Visual Studio 2005-2019: www.visual-installer.com
or RAD Studio 2009, 2010, XE-10.3 Rio: www.rad-installer.com
T.Slappy is offline   Reply With Quote
Old 4th March 2013, 14:36   #7
jpderuiter
Major Dude
 
Join Date: Feb 2007
Posts: 672
I think you should be able to get this data with GetFontData using System::Call:
http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx

Don't ask me the syntax, but someone familiar with the System::Call system should be able to tell you.
jpderuiter is offline   Reply With Quote
Old 5th March 2013, 04:34   #8
stass
Senior Member
 
Join Date: Nov 2012
Posts: 145
Unfortunately, I'm not a programmer. And I do not understand ... Therefore asked for help ...
stass is offline   Reply With Quote
Old 11th March 2013, 05:31   #9
stass
Senior Member
 
Join Date: Nov 2012
Posts: 145
No idea how to get the version the font file?
Function GetFontData is not suitable for this ...
stass is offline   Reply With Quote
Old 11th March 2013, 11:35   #10
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,153
I believe the normal version functions used on dlls works on font files (Maybe thats just for .fon?)

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