Editing NSX (QFont)

Jump to: navigation, search

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:
[[NSX|NSX scripts]] that holds parameters for [[NetherMenu]] font draw module.
+
= 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 ==
+
= Structure =
 +
 
 +
== [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; width:100%"
 
{| border="1" cellpadding="3" cellspacing="0" style="border-collapse: collapse; width:100%"
! width=6% | Key pair
+
! width=5% | Key
 +
! width=6%  | Value
 
! width=83% | Description
 
! width=83% | Description
 
|-
 
|-
| '''[qfont]'''
+
|type
| Should be the first groups of file.
+
|''x''
|-
+
|'''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
+
* ''ft'' - Darkplaces vector fonts using freetype library
* ASCII - Quake ascii conchars (256 chars on a 16*16 table)
+
* ''ascii'' - Quake ascii conchars (256 chars on a 16*16 table)
* GLYPH - QuakeC glyph font renderer (each char is separate picture)
+
* ''glyph'' - QuakeC glyph font renderer (each char is separate picture).
 
|-
 
|-
|'''face'''=''string''
+
|face
 +
|''string''
 
|Font face. For freetype and glyph font renderers this is name of group. For Ascii it's a path to conchars texture.
 
|Font face. For freetype and glyph font renderers this is name of group. For Ascii it's a path to conchars texture.
 
|-
 
|-
|'''brightness'''=''value''
+
|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.
 
|-
 
|-
|'''scale'''=''x'' ''y''
+
|scale  
 +
|''x'' ''y''
 
|Two floating point values storing horizontal and vertical scale of font chars.
 
|Two floating point values storing horizontal and vertical scale of font chars.
 
|-
 
|-
|'''width'''=''x''
+
|width  
 +
|''x''
 
|X component of scale.
 
|X component of scale.
 
|-
 
|-
|'''height'''=''y''
+
|height
 +
|''y''
 
|Y component of scale.
 
|Y component of scale.
 
|-
 
|-
|'''respath'''=''path''
+
|respath  
|Path to font resources. Could be relative (if begins with ./) or absolute (from gamedir). Default is subfolder named as font file (i.e if font file is gfx/myfont.qfont, it's default resources directory will be ''gfx/myfont/'').
+
|''y''
 +
|Path to font resources. Could be relative (if begins with ./) or absolute (from gamedir). Default is subfolder named as font file.
 
|}
 
|}
  
{{hidden begin | Freetype font face group }}
+
 
 +
 
 +
== Freetype font face group ==
  
 
Attributes of font face for freetype font renderer.
 
Attributes of font face for freetype 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%"
! width=6% | Key pair
+
! width=5% | Key
 +
! width=6% | Value
 
! width=83% | Description
 
! width=83% | Description
 
|-
 
|-
|'''file'''=''path''
+
|file
 +
|''path''
 
|Path to .OTF/.TTF font file. Could be relative to respath (if begins with ./) or absolute (from gamedir root).
 
|Path to .OTF/.TTF font file. Could be relative to respath (if begins with ./) or absolute (from gamedir root).
 
|-
 
|-
|'''slot'''=''slotname''
+
|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''
+
|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''
+
|r_antialias
 +
|''0/1''
 
|Toggles antialiasing for font pages renderer.
 
|Toggles antialiasing for font pages renderer.
 
|-
 
|-
|'''r_hinting'''=''0/1/2/3''
+
|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.
 
|-
 
|-
|'''r_shadow'''=''strength''
+
|r_shadow
 +
|''strength''
 
|Outline shadow strength (could be more than 1).
 
|Outline shadow strength (could be more than 1).
 
|-
 
|-
|'''r_shadowblur'''=''strength''
+
|r_shadowblur
 +
|''strength''
 
|Outline shadow blur.
 
|Outline shadow blur.
 
|-
 
|-
|'''r_shadowofs'''=''x y z''
+
|r_shadowofs
 +
|''x y z''
 
|Outline shadow offset. X and Y applied during rendering. Z is applied during blur.
 
|Outline shadow offset. X and Y applied during rendering. Z is applied during blur.
 
|-
 
|-
|'''r_charcushion'''=''x''
+
|r_charcushion
 +
|''x''
 
|Characters vertical offset in percents (1 - 100%, 0.1 - 10%).
 
|Characters vertical offset in percents (1 - 100%, 0.1 - 10%).
 
|-
 
|-
|'''r_charscale'''=''x''
+
|r_charscale
 +
|''x''
 
|Characters uniform scale.
 
|Characters uniform scale.
 
|}
 
|}
{{hidden end}}
 
  
{{hidden begin | Glyph font face group }}
+
 
 +
 
 +
== Glyph font face group ==
  
 
Attributes of font face for glyph font renderer.
 
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%"
! width=6% | Key pair
+
! width=5% | Key
 +
! width=6% | Value
 
! width=83% | Description
 
! width=83% | Description
 
|-
 
|-
|'''respath'''=''path''
+
|respath
 +
|''path''
 
|Absolute path that overrides default font resources path.
 
|Absolute path that overrides default font resources path.
 
|-
 
|-
|'''glyph'''=''variable''
+
|glyph
|Value is a string of: ''picture'' kern ''left'' ''right'' '''codes''' ''code1'' ''code2'' ''codeX''. Kern parmeter is optional. One pic may have many ASCII codes.
+
|''pic'' [kern ''left'' ''right''] codes ''code1'' ''code2'' ''codeX''
 +
|
 
|}
 
|}
{{hidden end}}
 
  
 
[[Category:File formats]]
 
[[Category:File formats]]
 
__NOTOC__
 

Please note that all contributions to Blood Wiki are considered to be released under the Creative Commons Attribution Share Alike (see BloodWiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)

Templates used on this page:

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox