SetFontStyle(style[, t])
SetFontStyle(#SHADOW, color, distance, direction) (V2.5) SetFontStyle(#BORDER, color, size) (V2.5)
style
which must be any combination of the following text styles:
#NORMAL:
#BOLD:
#ITALIC:
#UNDERLINED:
#ANTIALIAS:
#SHADOW:
#BORDER:
To combine multiple font styles in a single call simply bit-or them
with another, e.g. a call to SetFontStyle(#BOLD|#ITALIC)
will
set the font style to bold and italic. Obviously, the style #NORMAL
is mutually exclusive and cannot be combined with any other style.
Starting with Hollywood 9.0, SetFontStyle()
uses a new syntax
that accepts an optional table argument that supports the
following tags:
ShadowDir:
#SHADOW
style has been set (see above). (V9.0)
ShadowColor:
#SHADOW
style has been set (see above). (V9.0)
ShadowSize:
#SHADOW
style has been set (see above). (V9.0)
BorderColor:
#BORDER
style has been set (see above). (V9.0)
BorderSize:
#BORDER
style has been set (see above). (V9.0)
Please note that TrueType fonts often have separate font faces for
their respective styles. In that case, you should always use these
specifically designed font faces because SetFontStyle()
will create bold
and italic styles using a custom algorithm that often does not look as
good as hand-crafted bold or italic font faces do. Thus, if you are
planning to use Arial in bold style, you should better use "Arial Bold"
when calling SetFont() (or OpenFont() / @FONT) than using "Arial" and
calling SetFontStyle()
with #BOLD
set afterwards.
SetFontStyle(#BOLD|#ITALIC)The above code sets the font style to bold and italic.
SetFontStyle(#SHADOW, {ShadowColor = ARGB(128, $939393), ShadowSize = 16, ShadowDir = #SHDWSOUTHEAST})The above code enables a half-transparent grey shadow which will be positioned 16 pixels to the south-east of the main text.