Difference between revisions of "Extra Fonts (MenuQue)"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Scruggs
(add a note about extra fonts not being usable in books yet)
imported>Kyoma
m
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Using Extra Fonts with MenuQue ==
== Using Extra Fonts with MenuQue ==
MenuQue allows modders to use additional fonts in UI .xml files using the '''font''' tag. Each extra font has a unique integer ID from 7 through 63. Font (.fnt) files and their associated .texture (.tex) files should be placed in Oblivion\Data\Fonts. The .fnt file must be named in a specific way, as "EXTRA_##<whatever>.fnt", where ## is the font's unique two-digit ID and <whatever> is any string of zero or more characters (preferably including the name of the mod to which the font belongs so that users can easily identify a font's origin). For example, "EXTRA_07_MyFont.fnt" is a valid font filename. The .tex file should be named according to however it is defined in the .fnt file; MenuQue doesn't care about that.
MenuQue allows modders to use additional fonts in UI .xml files using the '''font''' tag. When the game starts it will attempt to load each extra and give them a unique ID between 7 and 31. The Font (.fnt) files and their associated .texture (.tex) files should be placed in Oblivion\Data\Fonts\Extra. The .tex file should be named according to however it is defined in the .fnt file; MenuQue doesn't care about that.
 
Because font IDs must be unique, modders should claim a font ID before using it in a released mod.
 
Within a UI .xml file extra fonts can be specified by ID the same way that the default fonts are, for example:
<pre>
<font> 15 </font>
</pre>
Scripts can check if a specific font is installed by calling:
<pre>
<pre>
(isLoaded:bool) IsExtraFontIDLoaded fontID:int
(fontID:int) GetFontLoaded fontName:formatString
</pre>
</pre>
All extra fonts are initialized to point to the default font with an ID of 1, so if an extra font specified in a UI file is not present the default will be used in its place.
If the font is loaded (either as a default font or as an extra one) the returned value will be above zero. It can then be used with any of the UI functions to change an element's font. Because ID assignment is dynamic it may not be the same between two sessions, or even between two installments. It all depends on what other fonts are placed in the folder.


'''Note''': Extra fonts cannot currently be used in books.
== Notes ==
* Extra fonts cannot currently be used in books.
* Do not use a value above 5 directly in an XML file, the game may crash when trying to display the XML should MenuQue '''not''' be installed.
* The user may choose to disable the loading of extra fonts, in which case GetFontLoaded will simply return 0 for those fonts.


== Registered Font IDs ==
== See Also ==
To claim a font to be used in a released mod, please edit this page below to indicate the font ID claimed along with the name and author of the mod.
*[[Extra_Strings_(MenuQue)|Extra Strings]]


[[Category:MenuQue]]
[[Category:MenuQue]]

Latest revision as of 05:08, 7 March 2011

Using Extra Fonts with MenuQue[edit | edit source]

MenuQue allows modders to use additional fonts in UI .xml files using the font tag. When the game starts it will attempt to load each extra and give them a unique ID between 7 and 31. The Font (.fnt) files and their associated .texture (.tex) files should be placed in Oblivion\Data\Fonts\Extra. The .tex file should be named according to however it is defined in the .fnt file; MenuQue doesn't care about that.

	(fontID:int) GetFontLoaded fontName:formatString

If the font is loaded (either as a default font or as an extra one) the returned value will be above zero. It can then be used with any of the UI functions to change an element's font. Because ID assignment is dynamic it may not be the same between two sessions, or even between two installments. It all depends on what other fonts are placed in the folder.

Notes[edit | edit source]

  • Extra fonts cannot currently be used in books.
  • Do not use a value above 5 directly in an XML file, the game may crash when trying to display the XML should MenuQue not be installed.
  • The user may choose to disable the loading of extra fonts, in which case GetFontLoaded will simply return 0 for those fonts.

See Also[edit | edit source]