The FXScript Reference

For Final Cut Pro created by Joe Maller

DrawStringPlain

DrawStringPlain(string, poly, image, color, aspect)

Additional Notes

DrawStringPlain Bugs in 4.0

There are several problems with DrawStringPlain in FCP4. Apparently FCP4 introduced a completely new type rendering engine, unfortunately this new engine came with a few new bugs, almost all of which appear in DrawStringPlain.

Text justification options do not work when the containing box is larger than it's contained text. In this case, all text will be left justified regardless of the SetTextJustify setting (kRightJustify, kLeftJustify or kCenterJustify). Using a zero-width box causes justification settings to work properly.

Aspect Ratios are all assumed to be fullframe. When rendering with fields, the doubled aspect ratio (derived from aspectOf) will squash text to half-height.

Containing Boxes

DrawStringPlain uses a containing box for placement of the text. MeasureStringPlain can be used to measure the intended contents of the box for size.

Strings that are larger than the containing box will simply exceed the box. A box with zero size will work fine for DrawStringPlain, text will just be based on the upper-left corner (point zero in a four-point array). In pre-4.0 versions justification settings will cause oversized text to flow out of either side depending on the setting. A bug in FCP4 only allows text to flow over the right edge of containing boxes.

Baselines shifted in 4.0

Another bug with 4.0 causes the baseline of text from DrawStringPlain to be shifted downwards.

Speed vs DrawString

DrawStringPlain renders 30-40% faster than DrawString. (10 second clip rendered in 37 seconds with DrawStringPlain vs. 52 seconds with DrawString)