NSX (QFont)
From Blood Wiki
(Difference between revisions)
Line 122: | Line 122: | ||
− | == | + | == Glyph font face group == |
− | Attributes of font face for | + | Attributes of font face for glyph font renderer. |
{| border="1" cellpadding="3" cellspacing="0" style="border-collapse: collapse; width:100%" | {| border="1" cellpadding="3" cellspacing="0" style="border-collapse: collapse; width:100%" | ||
Line 131: | Line 131: | ||
! width=83% | Description | ! width=83% | Description | ||
|- | |- | ||
− | | | + | |respath |
− | |'' | + | |''path'' |
− | | | + | |Absolute path that overrides default font resources path. |
+ | |- | ||
+ | |glyph | ||
+ | |''pic'' [kern ''left'' ''right''] codes ''code1'' ''code2'' ''codeX'' | ||
+ | | | ||
|} | |} | ||
[[Category:File formats]] | [[Category:File formats]] |
Revision as of 20:43, 2 July 2012
Contents |
Introduction
.QFONT files are .NSX scripts that holds parameters for NetherMenu font draw module.
Example of .QFONT file contents:
[qfont] type=FT face=default brightness=0.8 width=1.2 [default] file=./big.ttf sizes=38 glyphs=abcdefghijklmnopqrttuvwxyz0123456789 r_shadow=0.8 r_shadowblur=1 r_shadowofs=0 0.5 0.5
Structure
[qfont] group
Should be the first groups of file, it sets font drawer and face group.
Key | Value | Description |
---|---|---|
type | x | Type of font drawer, each of it has it's advantages and disadvantages:
Possible values:
|
face | string | Font face. For freetype and glyph font renderers this is name of group. For Ascii it's a path to conchars texture. |
brightness | value | Floating point value of brightness scale. 1 is nothing, 0.1 is 10% etc. |
scale | x y | Two floating point values storing horizontal and vertical scale of font chars. |
width | x | X component of scale. |
height | y | Y component of scale. |
respath | y | Path to font resources. Could be relative (if begins with ./) or absolute (from gamedir). Default is subfolder named as font file. |
Freetype font face group
Attributes of font face for freetype font renderer.
Key | Value | Description |
---|---|---|
file | path | Path to .OTF/.TTF font file. Could be relative to respath (if begins with ./) or absolute (from gamedir root). |
slot | slotname | Engine font slot. Used to replace fontmaps that was already initialized.
Darkplaces engine have this fixed slots: default, console, sbar, notify, chat, centerprint, infobar, menu, user0, user1, user2, user3, user4, user5, user6, user7. |
glyphs | string | Engine font slot. Used to replace fontmaps that was already initialized.
Engine will render font pages containing this string chars (others will be rendered on demand). |
r_antialias | 0/1 | Toggles antialiasing for font pages renderer. |
r_hinting | 0/1/2/3 | Toggles hinting for font pages renderer. 0 - no hinting, 1 - light autohintinh, 2 - full autohinting, 3 - full hinting. |
r_shadow | strength | Outline shadow strength (could be more than 1). |
r_shadowblur | strength | Outline shadow blur. |
r_shadowofs | x y z | Outline shadow offset. X and Y applied during rendering. Z is applied during blur. |
r_charcushion | x | Characters vertical offset in percents (1 - 100%, 0.1 - 10%). |
r_charscale | x | Characters uniform scale. |
Glyph font face group
Attributes of font face for glyph font renderer.
Key | Value | Description |
---|---|---|
respath | path | Absolute path that overrides default font resources path. |
glyph | pic [kern left right] codes code1 code2 codeX |