This a schema file for the Gorilla .gorilla
file format.
A Gorilla file is a simple text file, each element is organise into a key pair, seperated by a single space. Key/Pairs are organised into sections.
[SectionName]
key value1 value2 value3
key1 value1 value2
A Gorilla is organised into several sections:
- Texture -- Referenced texture and canvas shape UV coords
- Font.x -- Glyphs, Kerning and Glyph information
- Sprite -- Sprite information
Image file to use.
Where a white (RGB 255 255 255) pixel is in the image, for best results the surrounding pixels should be white too.
Where "x" is the font index; i.e. [Font.14]
lineheight 22
Amount of vertical position to move downwards on a new line.
<h> Height in pixels
spacelength 5
Amount of space to move across when a space is needed.
<w> Width in pixels
baseline 18
Distance from the top where the character "sit's" upon. See http://en.wikipedia.org/wiki/Baseline_%28typography%29
<h> Height in pixels
letterspacing -1
Amount of horizontal space to move forwards/backwards when a letter is drawn.
This value is used when no kerning information is found for a character
<r> Kerning value (in pixels)
monowidth 15
Amount of horiziontal space to move fowards when a letter is drawn in monospace mode.
<w> Value (in pixels)
range 33 126
Available glyphs to use, lower is the ascii code for the lowest character available and upper is the highest character available. Typically for a English character set this would be 33 126
<lower> Lowest character
<upper> Highest character
glyph_65 388 0 14 23 13
Glyph image in the texture atlas. All glyph images need to have the same height, but width is variable.
<x> Left position of where the glyph starts
<y> Top position of where the glyph starts
<w> Width of the glyph
<h> Height of the glyph
(advance) Move across this distance when draw (OPTIONAL)
kerning_74 45 1
Kerning value for when a right character is drawn after a left character.
<right_character> ASCII code for the right character
<left_character> ASCII code for the left character
<kerning> Kerning value
verticaloffset_74 10
<character> ASCII code for the character
<offset> Offset value
An offset value in pixels to move the character downwards when drawing. This allows you to pack a font more tightly into the atlas. Characters with space above and a 'decender' can be moved up fit alongside other characters that do not. For example consider 'g' and 'G' are a similar height - 'g' is just drawn lower.
ogrehead 0 464 48 48
A single sprite.
<name> Name of the sprite
<x> Left of the top/left position of the sprite
<y> Top of the top/left position of the sprite
<w> Width of the sprite
<h> height of the sprite