Shadow Command

Lightwing can automatically generate drop-shadows for any font used with the Text or Ticker commands. A drop-shadow is a second color (usually black) that differs from the font color and is drawn behind or around the font color. This has the appearance of a shadow and can make fonts easier to read when  displayed over backgrounds which may not have sufficient contrast with the font color. The most common use is when text is displayed over bright images or video with a lot of motion.

The Shadow command requires a font name for the first parameter. A drop-shadow effect is then applied to that font automatically for all pages in the script. Shadow commands must be specified at the top of the script before the first page.

    Example of a Text Command using a Font with a Red Drop-Shadow Effect
     shadow: GalatiaBold_100    offset: 3    color: 1.0, 0.0, 0.0

     page: FirstPage
        text: GalatiaBold_100    type: "Hello World!

Color Option

Defines a color for the drop-shadow.  This may include an optional alpha value to blend the drop-shadow color with the background. The colors can be specified in one of three different formats, float values with a range of 0.0 to 1.0, integer values with a range of 0 to 255 or as a six or eight digit hexadecimal value preceded with a hash symbol (HTML style). For all of these formats, the ordering of the values is red, green, blue and alpha. The alpha parameter is optional. The default drop-shadow color is opaque black (0.0, 0.0, 0.0, 1.0) for all fonts.

Offset Option

Defines the horizontal and vertical pixel offsets for a drop-shadow effect. These are signed integer values which should be a fraction of the height of the font. Drop-shadows are created by drawing the font twice. First, the drop-shadow color is drawn with this offset that is typically offset a few pixels. Then, the same font is drawn again without the offsets and in the font color. This makes the font appear as if it has a shadow behind it, which can make fonts easier to read. The default value for the horizontal offset is zero, which disables the default drop-shadow effect, but not all drop-shadow effects. The vertical offset defaults to the same value as the horizontal offset, if not specified. Negative values will offset the shadows toward the origin (left and/or up), whereas positive values offset the shadows away from the origin (right and/or down).

Effect Option

Defines an effect to be used to draw a font drop-shadow instead of the default drop-shadow effect (Font.pfx). A PFX extension is appended to the end of this name to construct the file name of the effect. Font effects are located in the same folder as image effects, but have file names that begin with Font. Image and font effects are not interchangeable because fonts are stored in a compact 8 bits per pixel format, so only effects that have names beginning with Font can be used with the Shadow command.

Arg0 Option

Defines effect-specific parameters for a selected font effect for a drop-shadow. Up to four floating-point values are passed to the effect to draw the font’s drop-shadow. The meaning of these values depends on the selected font effect. These parameters are required by some font effects, but ignored by the default font effect. To determine the appropriate values for a particular effect, refer to the notes in the individual effect files.

 Example of a Shadow Command with a Font Effect with Arguments
     shadow: GalatiaBold_200    offset: 0    effect: FontShadow    arg0: 0.001, 0.001



<   RSS Command                                             Introduction                                            System Command   >