Syntax FACTORY_DEF TextStrokerFactory [FACTORY_NAME ] [INPUT FEATURE_TYPE [ ]* []*]* [REJECT_INVALID_GEOM ] [TEXT_STRING_ATTR ] [TEXT_FONT ] [TEXT_FONT_WIDTH_MULTIPLIER ] [TEXT_FONT_HEIGHT ] [TEXT_PADDING ] [TEXT_ROTATION ] [TEXT_START_X ] [TEXT_START_Y ] [BUILD_POLYGONS ] [TEXT_FONT_PATH ] [OUTPUT (STROKED|UNTOUCHED) FEATURE_TYPE [ ]* []*]* Overview Note: This factory uses software from the FreeType Project (c) 1996-2000 by David Turner, Robert Wilhelm, and Werner Lemberg. This factory is used to stroke text into polygons based on TrueType font definitions from an input feature and text string. The factory accepts features with point geometry and replaces the geometry with an aggregate of polygons that visually represent the text. Any feature received that does not have a POINT geometry, or has a text string consisting of zero characters or all space characters, is output by the UNTOUCHED output tag. The resulting text has several additional attributes taken from the input feature and other values passed into the factory. The text height, width and padding are given in ground units and determine the size and spacing of the text. The rotation is given in degrees. The font name defaults to Arial, but can be set to any valid TrueType font. On non-Windows systems, the path to the font file can be specified in the mapping file using the TEXT_FONT_PATH keyword. The font name supplied must then be the filename for the requested font (for example, bkant.ttf). Assumptions The features to be stroked are assumed to enter the factory with all required attributes (text_font, text_padding, build_polygons) set. If any feature does not contain values for these attributes, and the values are not supplied, then default values will be used. The font supplied is assumed to be a valid TrueType font installed on the system. If an attribute is used for the font name instead of a literal, the attribute must contain the font's style information. The resulting string must have the following format (entries in square brackets are optional): ,[BOLD],[ITALIC],[] The origin (justification) of the resulting text outline is always the lower left-hand corner. Clauses REJECT_INVALID_GEOM When REJECT_INVALID_GEOM is Yes, the factory will output invalid features to Rejected port. TEXT_STRING_ATTR Specifies the name of the feature attribute that holds the text string. Default: fme_text_string Example: TEXT_STRING_ATTR @Value(Text) TEXT_FONT The name of the font in addition to its style and character set. On Windows systems, this must be a valid TrueType font (note that this is not necessarily the name of the font file). Default: Arial Example 1: TEXT_FONT Georgia,,ITALIC, Example 2: TEXT_FONT Garamond,BOLD,ITALIC,2 Example 3: TEXT_FONT @Value(Font) TEXT_FONT_HEIGHT Specifies the name of the feature attribute that holds the font height in ground units. A value of zero indicates that the font height is equal to the font width. Default: fme_text_size Example: TEXT_FONT_HEIGHT 1 TEXT_FONT_WIDTH_MULTIPLIER Specifies the name of the feature attribute that holds the font width in ground units. A value of zero indicates that the font width is equal to the font height. Default: 1.0 Example: TEXT_FONT_WIDTH_MULTIPLIER 1.5 TEXT_PADDING Specifies the text padding (extra spacing between characters) in ground units. Default: 0 Example: TEXT_PADDING 0 TEXT_ROTATION Specifies the name of the feature attribute that holds the text rotation, measured in degrees counterclockwise from horizontal. Default: fme_text_rotation Example 1: TEXT_ROTATION 45 Example 2: TEXT_ROTATION @Value(Rot) BUILD_POLYGONS Specifies whether the stroked text should be output as polygons or lines. Default: Polygon features Example: BUILD_POLYGONS YES Output Tags The TextStrokerFactory supports the following output tags. STROKED This tag outputs aggregate polygon features constructed by the factory. UNTOUCHED This tag outputs unprocessed features. TO BE RESOLVED TEXT_START_X and TEXT_START_Y clauses added to Syntax section above, but not documented. These clauses are not processed in the source.