Difference between revisions of "NML:Add font glyphs"

From GRFSpecs
Jump to navigationJump to search
(add nav template)
m (There's no 'TILE' compression in NML anymore)
Line 13: Line 13:
 
Parameter three <code style="color:darkgreen">&lt;image-file&gt;</code> is a literal (quoted) string that specifies the file where the sprites are located.
 
Parameter three <code style="color:darkgreen">&lt;image-file&gt;</code> is a literal (quoted) string that specifies the file where the sprites are located.
   
<code style="color:darkgreen">&lt;real-sprites&gt;</code> should be a list of real sprites. The first real sprite will be used for the character with code <code style="color:darkgreen">base-char;</code>, the second for <code style="color:darkgreen">base-char + 1</code> and so on. These sprites should only use colour palette indices 0 (transparent), 1 (foreground), and 2 (shadow). If the shadow colour is used, sprite compression flag 'TILE' must NOT be set.
+
<code style="color:darkgreen">&lt;real-sprites&gt;</code> should be a list of real sprites. The first real sprite will be used for the character with code <code style="color:darkgreen">base-char;</code>, the second for <code style="color:darkgreen">base-char + 1</code> and so on. These sprites should only use colour palette indices 0 (transparent), 1 (foreground), and 2 (shadow).

Revision as of 07:46, 12 October 2011

Block Syntax

A font-glpyh block makes it possible to provide sprites for glyphs that don't have sprites in normal TTD. The syntax is as follows:

font_glpyh (<font-size>, <base-char>, <image-file>) {
	list of realsprites
}

The first parameter (<font-size>) should be an identifier of the font size to use. Valid values are SMALL, NORMAL and LARGE.

The second parameter (<base-char>) is the number corresponding to the first character to provide a sprite for. Valid values are all unicode code points in the Basic Multilingual Plane (0-0xFFFF)

Parameter three <image-file> is a literal (quoted) string that specifies the file where the sprites are located.

<real-sprites> should be a list of real sprites. The first real sprite will be used for the character with code base-char;, the second for base-char + 1 and so on. These sprites should only use colour palette indices 0 (transparent), 1 (foreground), and 2 (shadow).