Text formatting
- Topics:
- Dynamic Media Classic,SDK/API
CREATED FOR:
- Developer
- User
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:
Feature | text= | textPs= | See also |
---|---|---|---|
Adobe Photoshop-compatible | no | limited | |
Flow text into arbitrary shapes | no | yes | textFlowPath=, textFlowXPath= |
Flow text along arbitrary paths | no | yes | textPath= |
Copy-fitting | no | yes |
Copy-Fitting ,
,
,
|
Text box margins | no | yes |
,
,
,
|
Full paragraph justification | no | yes |
|
last line justification | no | yes | \lastql, \lastqr, \lastqc, \lastqj |
Paragraph indentation | no | yes | \fi, \li, \ri |
All caps and small caps text | no | yes | \caps, \scaps |
Image Serving colors | no | yes | \*\iscolortbl |
Multiple anti-aliasing modes | no | yes | textAttr= |
top-bottom/right-left text flow | no | yes | \stextFlow |
Photofont® support | no | yes | Font Handling |
Auto-size layer to fit text | yes | yes | text=, textId=, size= |
CMYK support | yes | yes | \cmykcolortbl, \*\iscolortbl |
Right-to-left character flow | yes | no | \rtlch |
Disable word-wrap | yes | no | textAttr= |
Auto-scale text to fit layer (by varying resolution) | yes | no | textAttr= |
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.
Experience Manager
- Dynamic Media Image Serving and Image Rendering API Home
- About this release
- System requirements and prerequisites
- Disk space requirements and recommendations
- Restrictions and known issues
- Technical support
- Document conventions
- Installation
- Image Serving API
- Image Serving API
- Intended audience
- Image Serving components
- Configuration and administration
- Serving static (non-image) contents
- Troubleshooting
- HTTP protocol reference
- HTTP protocol reference overview
- HTTP protocol introduction
- Syntax and features
- Syntax and features
- Image Serving HTTP protocol basic syntax
- Image Serving HTTP protocol command
- Layering
- Layer effects
- Request nesting and embedding
- Substitution variables
- Command macros
- Image catalogs
- Object ID translation
- Text string localization
- SVG support
- Request preprocessing
- Image maps
- Image Serving color management
- Image Serving HTTP encoding
- Request locking
- Request obfuscation
- Watermarks
- Serving static (non-image) content
- Media set requests
- Text formatting
- Data types
- Command reference
- Command reference overview
- align
- anchor
- bfc
- bgc
- bgColor
- blendMode
- cache
- clipPath
- clipXPath
- color
- crop
- cropPathE
- defaultImage
- dpr
- effect
- effectMask
- extend
- fit
- flip
- fmt
- hei
- hide
- icc
- iccEmbed
- id
- imageSet
- jpegSize
- layer
- locale
- map
- mask
- maskUse
- network
- op_blur
- op_brightness
- op_colorbalance
- op_colorize
- op_contrast
- op_grow
- op_growMask
- op_growMaskR
- op_hue
- op_invert
- op_noise
- op_saturation
- op_sharpen
- op_usm
- op_usmR
- opac
- origin
- pathAttr
- pathEmbed
- perspective
- pos
- printRes
- pscan
- qlt
- quantize
- rect
- req
- res
- resMode
- rgn
- rotate
- scale
- scl
- size
- src
- template
- text
- textAngle
- textAttr
- textFlowPath
- textFlowXPath
- textPath
- textPs
- type
- wid
- xmpEmbed
- Response data
- Server behavior
- Templates
- FXG server protocol reference
- Image catalog reference
- Attributes
- Attributes reference
- AllowDirectAccess
- AllowDirectUrls
- ApplyEffectMask
- AudioBitRate
- Bfc
- BkgColor
- CacheValidationPolicy
- ClientAddressFilter
- CatalogFile
- DefaultExpiration
- DefaultExt
- DefaultFont
- DefaultImage
- DefaultImageMode
- DefaultLocale
- DefaultPix
- DefaultThumbPix
- DigimarcId
- DigimarcInfo
- ErrorImage
- ErrorDetail
- Expiration
- FontMapFile
- FullMatch
- HttpAppleStreamingContext
- HttpFlashStreamingContext
- IccBlackPointCompensation
- IccDither
- IccProfileCmyk
- IccProfileGray
- IccProfileMapFile
- IccProfileRgb
- IccProfileSrcCmyk
- IccProfileSrcGray
- IccProfileSrcRgb
- IccRenderIntent
- JpegQuality
- LocaleMap
- LocaleStrMap
- MacroFile
- MaxPix
- NonImgExpiration
- PublishInfo
- PrintResolution
- RequestLock
- RequestObfuscation
- ResMode
- Resolution
- RootId
- RootPath
- RootUrl
- RuleSetFile
- SavePath
- StaticContentCatalogFile
- StaticContentRootPath
- SvgCatalogFile
- SynthesizeFontStyles
- ThumbBkgColor
- ThumbHorizAlign
- ThumbRes
- ThumbType
- ThumbVertAlign
- TimeStamp
- TotalStreamBitRate
- TrustedDomains
- UseLastModified
- VideoBitRate
- VideoSize
- Watermark
- Image/SVG data reference
- Macro definition
- Font map
- ICC profile map reference
- Rule set reference
- Image server proxy
- Responsive Static Image Library
- Image Rendering API
- Image Rendering API
- Configuration
- Server administration
- Server administration
- Server administration preface
- Server administration overview
- Configuring and managing the server
- Configuration settings reference
- HTTP protocol reference
- HTTP protocol reference
- Introduction
- HTTP protocol syntax and features
- HTTP protocol syntax and features
- Image Rendering HTTP protocol basic syntax
- Image Rendering HTTP protocol command overview
- Vignettes
- Materials
- Advanced Render effects
- Request nesting and embedding
- Material catalogs
- Request pre-processing *
- Custom variables
- Command macros *
- Image Rendering color management *
- Color values
- Image Rendering HTTP encoding
- HTTP protocol command reference
- HTTP protocol response data
- Material catalog
- Material catalog
- Introduction
- Material catalog overview
- Attributes reference
- Attributes reference
- AllowDirectURLs
- CacheValidationPolicy
- CatalogFile
- ClientAddressFilter
- DefaultPix
- ErrorDetail
- ErrorImage
- Expiration
- Format
- IccBlackPointCompensation
- IccDither
- IccProfileCmyk
- IccProfileGray
- IccProfileMapFile
- IccProfileRgb
- IccProfileSrcCmyk
- IccProfileSrcGray
- IccProfileSrcRgb
- IccRenderIntent
- JpegQuality
- MacroFile
- MaxPix
- OnFailObj
- OnFailSel
- RenderSettings
- ResMode
- Resolution
- RootId
- RootPath *
- RootUrl *
- RuleSetFile
- Sharp
- Sharpen
- ShowOverlapObjs
- TiffEncoding
- TimeStamp
- TrustedDomains *
- UseLastModified
- VignetteMapFile
- Material data reference
- Vignette map reference
- Macro definition reference
- ICC profile map reference
- Rule set reference
- Utilities