FONT (File Format): Difference between revisions

no edit summary
>Aruki
imported>Antidote
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 42: Line 42:
| u32
| u32
| 4
| 4
| '''Vertical offset'''
| '''Vertical offset''' ''(note: not present in version 1)''
|-
|-
| 0x14
| 0x14
Line 50: Line 50:
|-
|-
| 0x18
| 0x18
| bool
| 1
| {{unknown|'''Unknown'''}}
|-
| 0x19
| bool
| 1
| {{unknown|'''Unknown'''}}
|-
| 0x1A
| u32
| u32
| 4
| 4
| {{unknown|'''Unknown'''}} ''(note: not present in version 1)''
| {{unknown|'''Unknown'''}}  
|-
| 0x1C
| u16
| 2
| {{unknown|'''Unknown'''}}
|-
|-
| 0x1E
| 0x1E
Line 112: Line 117:
The kerning index value is the index of the first kerning table entry for the given character. Since the table is sorted in alphabetical order, this can be used to speed up lookup time.
The kerning index value is the index of the first kerning table entry for the given character. Since the table is sorted in alphabetical order, this can be used to speed up lookup time.


This section of the file changes somewhat from version 2 to 4. Starting in version 4, glyphs are able to be encoded to only one particular RGBA channel, which allows multiple glyphs to be encoded in the same space on the texture. A "channel index" value was introduced to track which channel the glyph is on. Additionally, a lot of 32-bit values were reduced to 8- or 16-bit. Aside from that, though, the actual layout is still the same, with the same values in the same places.
This section of the file changes somewhat from version 2 to 4. Starting in version 4, font textures are able to be split up into multiple layers, which allows multiple glyphs to be encoded in the same space on the texture. A "layer index" value was introduced to track which layer the glyph is on. Additionally, a lot of 32-bit values were reduced to 8- or 16-bit. Aside from that, though, the actual layout is still the same, with the same values in the same places.


==== Version 2 (Metroid Prime NTSC) ====
==== Version 2 (Metroid Prime NTSC) ====
Line 180: Line 185:
| u32
| u32
| 4
| 4
| '''Kerning index'''
| '''Kerning start index'''
|-
|-
| 0x2E
| 0x2E
Line 222: Line 227:
| u8
| u8
| 1
| 1
| '''RGBA channel index'''
| '''Layer index'''
|-
|-
| 0x13
| 0x13
Line 257: Line 262:
| u16
| u16
| 2
| 2
| '''Kerning index'''
| '''Kerning start index'''
|-
|-
| 0x1B
| 0x1B
Anonymous user