Text formatting text-formatting
Image Serving provides several alternatives to render text, accessible with the text= and textPs= commands.
textPs=
provides a high level of similarity with text rendered with Adobe Photoshop and Illustrator. text=
is reasonably compatible with text rendered with Windows Wordpad.
text=
produces subtle differences in the rendered text when compared with textPs=
. For example, underlines do not have the same thickness and position and synthesized italics are rendered at a slightly different angle. If text does not fit into the available space, text=
may partially crop the last line, while textPs=
only renders complete lines.All text commands accept formatted text based on a subset of the RTF (Rich Text Format) specification. Each text layer may specify a different text command.
The following table lists the key features available for each text command:
Copy-Fitting
,
\copyfit
,
\copyfitlines
,
\copyfitmaxlines
\margl
,
\margr
,
\margt
,
\margb
\qj
RTF-compliant strings can be assembled manually or by formatting the desired text in a text editor or word processor capable of saving RTF files. The RTF file may then be opened in a plain text editor, and the relevant raw RTF content of the file copied to the request URL.
Some word processors generate rather large files, which include substantial preambles that are not used by Dynamic Media Image Serving. It is recommended to remove the unused RTF elements from the string before passing the string to the text commands.
Language-encoding based on UTF-8 and ISO standards is supported in RTF strings as an alternative to the standard RTF character encoding mechanisms. This allows applications to send non-English text to the server without knowledge of RTF encoding.
All non-HTTP compliant characters must be properly escaped, if the string is to be transmitted by way of http. Only ‘=’, ‘&’, and ‘%’ need to be escaped if the string is incorporated into the catalog::Modifiers
field of an image catalog record. Control characters, including <CR>
, <LF>
, and <TAB>
should always be removed.
The Image Serving text engines interpret a sub-set of commands defined by the Rich Text Format (RTF) Specification, version 1.6. This sub-set is focused on font/character formatting, simple paragraph formatting, and support for international fonts and character sets. More advanced formatting constructs, such as style sheets and tables, are not supported at this time.
Familiarity with the Rich Text Format (RTF) Specification, as published by Microsoft, is required when attempting to construct RTF-encoded text strings manually.