Skip to content
⌘ NSIS Forum Archive

Information about the font file

10 posts

stass#

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?
kichik#
For the name, you can use the FontName plug-in. I'm not sure what you mean by the font version...

stass#
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 ...
kichik#
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.
stass#
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 ? 🙂
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.
jpderuiter#
I think you should be able to get this data with GetFontData using System::Call:


Don't ask me the syntax, but someone familiar with the System::Call system should be able to tell you.
stass#
No idea how to get the version the font file?
Function GetFontData is not suitable for this ...
Anders#
I believe the normal version functions used on dlls works on font files (Maybe thats just for .fon?)