Editing NSX (QFont)
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | + | = Introduction = | |
− | Example QFONT file: | + | .QFONT files are [[NSX|.NSX scripts]] that holds parameters for [[NetherMenu]] font draw module. |
+ | |||
+ | Example of .QFONT file contents: | ||
''[qfont]'' | ''[qfont]'' | ||
Line 17: | Line 19: | ||
r_shadowofs=0 0.5 0.5 | r_shadowofs=0 0.5 0.5 | ||
− | + | = Structure = | |
− | {| border="1" cellpadding="3" cellspacing="0" style="border-collapse: collapse | + | == [qfont] group == |
− | ! | + | |
− | ! | + | Should be the first groups of file, it sets font drawer and face group. |
+ | |||
+ | {| border="1" cellpadding="3" cellspacing="0" style="border-collapse: collapse" | ||
+ | !Key | ||
+ | !Value | ||
+ | !Description | ||
|- | |- | ||
− | | | + | |type |
− | | | + | |''x'' |
− | + | ||
− | + | ||
|Type of font drawer, each of it has it's advantages and disadvantages: | |Type of font drawer, each of it has it's advantages and disadvantages: | ||
Possible values: | Possible values: | ||
− | * | + | * ''ft'' - Darkplaces vector fonts using freetype library |
− | * | + | * ''ascii'' - Quake ascii conchars (256 chars on a 16*16 table) |
− | * | + | * ''glyph'' - QuakeC glyph font renderer (each char is separate picture). |
|- | |- | ||
− | | | + | |face |
− | | | + | |''string'' |
+ | |Path to the font face group. | ||
|- | |- | ||
− | | | + | |brightness |
+ | |''value'' | ||
|Floating point value of brightness scale. 1 is nothing, 0.1 is 10% etc. | |Floating point value of brightness scale. 1 is nothing, 0.1 is 10% etc. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | Applies to all renderer types. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
|- | |- | ||
− | | | + | |slot |
+ | |''slotname'' | ||
|Engine font slot. Used to replace fontmaps that was already initialized. | |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. | 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 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). | 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. | |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. | |Toggles hinting for font pages renderer. 0 - no hinting, 1 - light autohintinh, 2 - full autohinting, 3 - full hinting. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} | ||
− | |||
− | |||
− | |||
− | + | ||
− | + | ||
− | + | ||
− | + | if (key == "r_antialias") { r_antialias = stof(val); continue; } | |
− | + | if (key == "r_hinting") { r_hinting = stof(val); continue; } | |
− | + | if (key == "r_shadow") { r_outline = stof(val); continue; } | |
− | + | if (key == "r_shadowblur") { r_outlineblur = stof(val); continue; } | |
− | + | if (key == "r_shadowofs") { r_outlineofs = stov(val); continue; } | |
− | + | if (key == "r_charcushion"){ r_charcushion = stof(val); continue; } | |
− | + | if (key == "r_charscale") { r_charscale = stof(val); continue; } | |
− | { | + | |
[[Category:File formats]] | [[Category:File formats]] | ||
− | |||
− |