FXY File Format: Difference between revisions
m (added wiki links, typos, boldness) |
mNo edit summary |
||
Line 5: | Line 5: | ||
The [[OFP]] and [[ArmA]] engines use a limited set of bit mapped fonts developed by Bohemia Interactive for the engine. They are bitmaps and each glyph within is treated as a texture. | The [[OFP]] and [[ArmA]] engines use a limited set of bit mapped fonts developed by Bohemia Interactive for the engine. They are bitmaps and each glyph within is treated as a texture. | ||
A character set (such as Ascii) is a series of 'glyphs' (characters) where any one of these characters is always identified by the same index value. For example the letter '''A''' is always hex '''41''' and so on. Regardless of the font set employed, the character set within it, is set-in-concrete. Hex 41 always renders a glyph that 'looks like' the letter A. Be it '''bold''', ''italic'', or fills the entire screen, it is the letter 'A'. | A character set (such as [http://en.wikipedia.org/wiki/ASCII Ascii]) is a series of 'glyphs' (characters) where any one of these characters is always identified by the same index value. For example the letter '''A''' is always hex '''41''' and so on. Regardless of the font set employed, the character set within it, is set-in-concrete. Hex 41 always renders a glyph that 'looks like' the letter A. Be it '''bold''', ''italic'', or fills the entire screen, it is the letter 'A'. | ||
The character set for all BI fonts approximates [http://en.wikipedia.org/wiki/Code_page_437 US-Ascii codepage 437]. | The character set for all BI fonts approximates [http://en.wikipedia.org/wiki/Code_page_437 US-Ascii codepage 437]. |
Revision as of 02:07, 24 November 2006
Introduction
The OFP and ArmA engines use a limited set of bit mapped fonts developed by Bohemia Interactive for the engine. They are bitmaps and each glyph within is treated as a texture.
A character set (such as Ascii) is a series of 'glyphs' (characters) where any one of these characters is always identified by the same index value. For example the letter A is always hex 41 and so on. Regardless of the font set employed, the character set within it, is set-in-concrete. Hex 41 always renders a glyph that 'looks like' the letter A. Be it bold, italic, or fills the entire screen, it is the letter 'A'.
The character set for all BI fonts approximates US-Ascii codepage 437.
A font set is a collection of displayable characters (termed glyphs) that have a common appearance. Eg all glyphs in THIS set are bold, or all the glyphs are italic, all the glyphs are Times Roman (seriffed).
Individual font sets exist for Tahoma, Garamond, and so on.
The glyphs within these sets, are contained in .paa files. Generally, the entire font set = one, paa file.
And, because these are bitmapped fonts, eg fixed dimensions, non-scaleable, there are unique font sets, for, unique sizes.
For example, in Resistance engine, the popular Tahoma font is in three different font sets. 24 point, 36 point, 48 point.
A 'point' approximates 1/72th of an inch. Thus the Tahoma fonts available (for Resistance) are approximately a third, a half, and two thirds of an inch tall when displayed.
Description
An fxy file is the 'character set' index. It is, the codepage.
An fxy file is implicitly associated with one or more paa files within the same folder. The fxy file is the header entry for these files, it describes the position in the paa file and the size to be rendered on screen, for a 'glyph'.
Association of files between fxy and paa is implicit. The CourierNewB64.fxy is implicitly associated with the CourierNewB64-xx.paa file(s). xx indicating one of several CourierNewB64 paa's.
Struct
The fxy is a contiguous series of 12 byte entries. Each entry can be described in the following struct
struct FxyEntry { ushort AsciiCode; // 0x41 = 'A' ushort PaaFileNumber; // 01 ushort X,Y // Top-left Corner of char on the texture in pels ushort Width,Height; // 10,14 in bytes. };
PaaFileNumber -number of texture file: This is simply a convenience to allow large fonts to be spread across several paa's.
font name is "CourierNewB64" Fxy file is "CourierNewB64.fxy", First texture file is "CourierNewB64-01.paa", second is "CourierNewB64-02.paa".
.paa files used for the font must be in 8080 format: (Alpha luminosity) 8bit - Brightness (all with 255 value - "white"); 8bit - Alpha (255 for character, 0 for space);