FontName plug-in: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
m (Updated author links.)
m (FontName plug-in warning)
 
(21 intermediate revisions by 10 users not shown)
Line 1: Line 1:
{|align=right
{{PageAuthor|Vytautas}}
|<small>Author: [[{{ns:2}}:Vytautas|Vytautas]] ([[{{ns:3}}:Vytautas|talk]], [[{{ns:-1}}:Contributions/Vytautas|contrib]])</small>
 
|}
<div style="border: 1px solid #808040; background-color:#f8f880; color:#000; padding:0.3em;"><b>Warning: </b>The FontName plug-in does not support Unicode, consider using the [[FontInfo plug-in]] instead.</div>
<br style="clear:both;">
 
 
== Links ==
* <attach>FontName-0.7.zip</attach> (ANSI only)
* [[File:Exe.gif]] [http://www.vytux.com/joomla/projects?func=startdown&id=1] (77 KB) [http://www.vytux.com Vytautas' Website]
 
== Description ==
== Description ==
This plugin will retrieve the Display name from a TTF font file.  I wrote it to make it easier to register TTF fonts in windows. The Installer and zipped versions of the plugin can be found [http://vytautas.mine.nu/nsis.php here.]
'''Version:''' 0.7.
 
This plugin will retrieve the Display name from a TTF font file.  I wrote it to make it easier to register TTF fonts in windows.
 
Note: This plugin could only get the English name of a font file. If the file contains more localised names, you may want to get the name of current language of your system. More information at: http://nsis.sourceforge.net/Get_localised_font_name.


== How To Use ==
== How To Use ==
Line 28: Line 37:


== Notes ==
== Notes ==
Please note that the font file MUST exist for the plugin to work, so you should check that before calling the plugin. For a more detailed example of the plugin's usage check out the [[Font Registration]] and [[Advanced Font Installation]] pages created by me.
Please note that the font file MUST exist for the plugin to work, so you should check that before calling the plugin. For a more detailed example of the plugin's usage check out the [[Register Fonts]] and [[Advanced Font Installation]] pages created by me.
 
Un.installation part for this plug in generate error nd wont work but other things work correct.


== Version History ==
== Version History ==
'''[UPDATE: 2005-08-03]'''
Added more translations. The installer now also installs the latest font registration header files.
'''[UPDATE: 2004-02-19]'''
'''[UPDATE: 2004-02-19]'''
Added french translation to distribution. Optimized source code somewhat.
Added french translation to distribution. Optimized source code somewhat.
'''[UPDATE: 2004-02-10]'''
'''[UPDATE: 2004-02-10]'''
Used a different compiler, reduced the plugin's file size from 32kb to just 9kb.
Used a different compiler, reduced the plugin's file size from 32kb to just 9kb.
'''[UPDATE: 2004-01-29]'''
'''[UPDATE: 2004-01-29]'''
Added an include file so that you need only use the macros provided.  Now the plugin is translatable if your language is not included please add it to the list [http://forums.winamp.com/showthread.php?s=&threadid=162550 in this forum.]  Changed error reporting prefix to enable better international support.
Added an include file so that you need only use the macros provided.  Now the plugin is translatable if your language is not included please add it to the list [http://forums.winamp.com/showthread.php?s=&threadid=162550 in this forum.]  Changed error reporting prefix to enable better international support.
'''[UPDATE: 2003-11-27]'''
'''[UPDATE: 2003-11-27]'''
Added error reporting functionality.  Check for 'error:' at the start of the returned string on the stack.
Added error reporting functionality.  Check for 'error:' at the start of the returned string on the stack.
'''[UPDATE: 2003-11-26]'''
'''[UPDATE: 2003-11-26]'''
Fixed plugin crash in Win9x Family.
Fixed plugin crash in Win9x Family.
'''[UPDATE: 2003-11-18]'''
'''[UPDATE: 2003-11-18]'''
Fixed problem with plugin reporting 'FontFamily' instead of 'FontName' affecting certain fonts, e.g. Arial Bold and Arial were both being reported as Arial.
Fixed problem with plugin reporting 'FontFamily' instead of 'FontName' affecting certain fonts, e.g. Arial Bold and Arial were both being reported as Arial.


Vytautas
Vytautas
[[Category:Plugins]]

Latest revision as of 00:10, 17 October 2022

Author: Vytautas (talk, contrib)


Warning: The FontName plug-in does not support Unicode, consider using the FontInfo plug-in instead.


Links

Description

Version: 0.7.

This plugin will retrieve the Display name from a TTF font file. I wrote it to make it easier to register TTF fonts in windows.

Note: This plugin could only get the English name of a font file. If the file contains more localised names, you may want to get the name of current language of your system. More information at: http://nsis.sourceforge.net/Get_localised_font_name.

How To Use

This is an extract from the included readme showing an example of usage:

...

To use the plugin simply include the FontName.nsh file into your script then use one of the following macros:

!insertmacro FontName "fontfile.ttf"

Now the stack contains the name of the Font or if the errors flag was set, the error message translated to your current language, or English if the translation is not yet available.

!insertmacro FontNameVer

This macro will push to the stack the translated version string for the FontName Plugin.

...

Notes

Please note that the font file MUST exist for the plugin to work, so you should check that before calling the plugin. For a more detailed example of the plugin's usage check out the Register Fonts and Advanced Font Installation pages created by me.

Un.installation part for this plug in generate error nd wont work but other things work correct.

Version History

[UPDATE: 2005-08-03] Added more translations. The installer now also installs the latest font registration header files.

[UPDATE: 2004-02-19] Added french translation to distribution. Optimized source code somewhat.

[UPDATE: 2004-02-10] Used a different compiler, reduced the plugin's file size from 32kb to just 9kb.

[UPDATE: 2004-01-29] Added an include file so that you need only use the macros provided. Now the plugin is translatable if your language is not included please add it to the list in this forum. Changed error reporting prefix to enable better international support.

[UPDATE: 2003-11-27] Added error reporting functionality. Check for 'error:' at the start of the returned string on the stack.

[UPDATE: 2003-11-26] Fixed plugin crash in Win9x Family.

[UPDATE: 2003-11-18] Fixed problem with plugin reporting 'FontFamily' instead of 'FontName' affecting certain fonts, e.g. Arial Bold and Arial were both being reported as Arial.

Vytautas