XML:TSFF: Difference between revisions
Jump to navigation
Jump to search
m (+cat) |
Paradox-01 (talk | contribs) (OniBrowser for the win) |
||
Line 1: | Line 1: | ||
You can visualize the data in [http://mods.oni2.net/node/256 OniBrowser.] Be sure to also install the XNA package from the Microsoft site. | |||
===File structure=== | ===File structure=== | ||
Revision as of 21:45, 2 September 2017
You can visualize the data in OniBrowser. Be sure to also install the XNA package from the Microsoft site.
File structure
TSFF file | +-- TSFF instance | +-- TSFT instance (x15, for different styles and sizes) | +-- TSGA instance
List of available Tahoma sizes and styles.
- id 2, FontSize 7, FontStyle 1
- id 3, FontSize 7, FontStyle 0
- id 4, FontSize 7, FontStyle 2
- id 5, FontSize 14, FontStyle 1
- id 6, FontSize 14, FontStyle 0
- id 7, FontSize 14, FontStyle 2
- id 8, FontSize 10, FontStyle 1
- id 9, FontSize 10, FontStyle 0
- id 10, FontSize 10, FontStyle 2
- id 11, FontSize 12, FontStyle 1
- id 12, FontSize 12, FontStyle 0
- id 13, FontSize 12, FontStyle 2
- id 14, FontSize 9, FontStyle 1
- id 15, FontSize 9, FontStyle 0
- id 16, FontSize 9, FontStyle 2
TSFF tags
XML tag | content type | description |
---|---|---|
<TSFF> | - | parent tag |
<Language> | link | link to TSFL file |
<Fonts> | - | parent tag, instance link list |
<Link> | # + instance number |
TSFT tags
XML tag | content type | description |
---|---|---|
<TSFT> | ||
<FontSize> | int16 | |
<FontStyle> | int16 |
|
<AscenderHeight> | int16 | |
<DescenderHeight> | int16 | |
<LeadingHeight> | int16 | |
<Offset_001A> | int16 | |
<Glyphs> | parent tag, array | |
<Link> | ||
<GlyphBitmaps> | parent tag, array | |
<Int32> | int32 | Has to be converted back to 4 bytes, each byte can be read as a hex color code for a pixel |
TSGA tags
XML tag | content type | description |
---|---|---|
<TSGA> | ||
<Glyphs> | glyph array for character codes 0-255 (ASCII) | |
<TSGAGlyph> | ||
<Index> | int16 | |
<Width> | int16 | What is the difference of Width and GlyphWidth?? Picture please. |
<GlyphWidth> | int16 | |
<GlyphHeight> | int16 | |
<GlyphXOrigin> | int16 | |
<GlyphYOrigin> | int16 | |
<GlyphBitmapOffset> | int32? |
Every TSGA file contains 256 elements. One element stands for one of the 256 signs of the ASCII table. The first 32 signs are reserved control characters, so these elements are always complete zero.
A glyph is basically a monochrome bitmap width * height pixels in size. Each pixel is stored in one byte in the TSFT file (fonts are antialiased so shades of gray are needed rather than storing each pixel in one bit) so each element in the TSFT file contains 4 pixels. Rows of pixels are not 4 bytes aligned so a row can start inside an element.