This patch renders a string as an image using the specified font attributes and text alignment mode.
The “String” input defines the string to be rendered, and “Image Width” and “Image Height” the dimensions of the image in which to render the string. If those dimensions are null, the image will automatically be sized to fit the entire string.
The name of the font to use is defined by the “Font Name” input as a case-sensitive PostScript name (it can also be set from the patch’s settings) and its size is defined by the “Font Size” input. Font leading and kerning can also be modified through the corresponding patch inputs. All these dimensions are expressed in Quartz Composer coordinates system units by default.
This patch outputs the image containing the rendered string (in white over a black background) and the recommended size at which it should be displayed in the rendering destination for optimal visual quality (those values would typically be passed to a Billboard or Sprite patch). It also returns the number of visible text lines and visible text glyphs (this information is useful in case the entire string does not fit in the image).
Note that Image With String can run in mode where dimensions are specified in pixels instead of units (use the patch’s settings to switch to that mode). This mode can be useful if you explicitely want to create an image with given pixels dimensions.