Difference between revisions of "Fonts.dat"
(Created page with "{{Research}} {{I|Information regarding additional indentation with outlines is unverified and may be unreliable.|This article was machine-translated from another language and...") |
m |
||
(One intermediate revision by the same user not shown) | |||
Line 9: | Line 9: | ||
[[File:pururin-fonts.jpg|thumb|250px]] | [[File:pururin-fonts.jpg|thumb|250px]] | ||
− | ‘Proportional values’ are numerical values that define the width of each character in the '''fonts.txd''' atlas, which contains all the font characters’ [[wikipedia:Sprite_(computer_graphics)|sprites]]. These values indicate the pixel distance from the left edge of the character to its right edge, including padding, which provides space for the subsequent character. | + | ‘Proportional values’ are numerical values that define the width of each character in the '''fonts.txd''' [[wikipedia:Texture_atlas|texture atlas]], which contains all the font characters’ [[wikipedia:Sprite_(computer_graphics)|sprites]]. These values indicate the pixel distance from the left edge of the character sprite to its right edge, including padding, which provides space for the subsequent character. |
Despite the tile width being 32 pixels, a proportional value can exceed this figure without encroaching on the next sprite in the [[wikipedia:Texture_atlas|texture atlas]]. In addition to the padding provided by proportional values, the text has additional spacing between characters, equivalent to the thickness of these characters’ outlines. | Despite the tile width being 32 pixels, a proportional value can exceed this figure without encroaching on the next sprite in the [[wikipedia:Texture_atlas|texture atlas]]. In addition to the padding provided by proportional values, the text has additional spacing between characters, equivalent to the thickness of these characters’ outlines. |
Latest revision as of 21:31, 30 April 2024
Article issues | |||
---|---|---|---|
|
fonts.dat — this data file first appeared in GTA SA (Grand Theft Auto: San Andreas) and contains information about the “proportional values for fonts,” as referred to in Rockstar’s code comments. These settings allow characters to occupy varying amounts of space, making the text more compact and aesthetically pleasing. More details are described below.
Contents
Proportional values
‘Proportional values’ are numerical values that define the width of each character in the fonts.txd texture atlas, which contains all the font characters’ sprites. These values indicate the pixel distance from the left edge of the character sprite to its right edge, including padding, which provides space for the subsequent character.
Despite the tile width being 32 pixels, a proportional value can exceed this figure without encroaching on the next sprite in the texture atlas. In addition to the padding provided by proportional values, the text has additional spacing between characters, equivalent to the thickness of these characters’ outlines.
In fonts.dat, the pixel distance for characters is applied at the scale they appear in the original fonts.txd, approximately 32 pixels in width and 39 in height, based on the texture atlas’s resolution of 512x512 pixels divided into 16 columns and 13 rows.
In addition to the unique proportional values associated with each of the characters, the file also contains values that will be used in monospace text mode and the width value for the special character in the subfont.
Format
The file is in plain text format, allowing it to be opened with any text editor (like Notepad). Line comments are marked by the character #
(number sign), and the inclusion of empty lines is permitted.
This section is incomplete. You can help by fixing and expanding it.
Tools
This section is incomplete. You can help by fixing and expanding it.