Difference between revisions of "LGUI2:Fonts"

From Lavish Software Wiki
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
A Font specifies the size and appearance of text.
+
A [[LavishGUI 2]] Font specifies the size and appearance of text.
  
 
== Defining a Font ==
 
== Defining a Font ==
Line 5: Line 5:
  
 
{| border="1" style="border-collapse:collapse" cellpadding="5"
 
{| border="1" style="border-collapse:collapse" cellpadding="5"
!colspan="2"|Base Element styles
+
!colspan="2"|Font properties
 
|-
 
|-
 
! face
 
! face
Line 18: Line 18:
 
! height
 
! height
 
| An integer value (whole number) specifying the font height in points, e.g. with 12 being a 12pt font as opposed to 12 pixels (they are different!).
 
| An integer value (whole number) specifying the font height in points, e.g. with 12 being a 12pt font as opposed to 12 pixels (they are different!).
 +
|-
 +
! heightOffset
 +
| An integer value (whole number) specifying the font height in points, relative to its parent Font
 +
|-
 +
! heightFactor
 +
| A floating point value specifying the height factor for the font. The actual height will be heightOffset+(heightFactor*parentHeight)
 
|}
 
|}
  
Line 27: Line 33:
 
  }
 
  }
  
  ; 14-point Comic Sans
+
  ; 14-point Comic Sans MS
 
  {
 
  {
   "face":"Comic Sans",
+
   "face":"Comic Sans MS",
 
   "height":14
 
   "height":14
 
  }
 
  }
  
 +
{{LGUI2:Topic}}
 
[[Category:LavishGUI 2]]
 
[[Category:LavishGUI 2]]
 +
[[Category:LavishGUI 2 Fonts]]

Latest revision as of 03:29, 5 February 2019

A LavishGUI 2 Font specifies the size and appearance of text.

Defining a Font

A Font is defined by a JSON object.

Font properties
face The name of the Font face, such as "Arial"
fixed A boolean value (true or false) specifying whether to use a fixed-width font if possible
bold A boolean value (true or false) specifying whether to Bold the font
height An integer value (whole number) specifying the font height in points, e.g. with 12 being a 12pt font as opposed to 12 pixels (they are different!).
heightOffset An integer value (whole number) specifying the font height in points, relative to its parent Font
heightFactor A floating point value specifying the height factor for the font. The actual height will be heightOffset+(heightFactor*parentHeight)

Examples

; 12-point Arial
{
 "face":"Arial",
 "height":12
}
; 14-point Comic Sans MS
{
  "face":"Comic Sans MS",
  "height":14
}

LavishGUI 2 Topics