TEXT
Renders a text.
Properties
align
align
-
- Type
- align / stdWrap
- Default
- left
angle
angle
-
- Type
- integer
- Default
- 0
- Range
- -90 to 90
The rotation degree of the text.
Note
The angle is not available, if spacing / wordSpacing is set.
antiAlias
antiAlias
-
- Type
- boolean
- Default
- 1 (true)
breakSpace
breakSpace
-
- Type
- float
- Default
- 1.0
Defines a value that is multiplied by the line height of the current element.
breakWidth
breakWidth
-
- Type
- integer / stdWrap
Defines the maximum width for an object, overlapping elements will force an automatic line break.
doNotStripHTML
doNotStripHTML
-
- Type
- boolean
- Default
- 0 (false)
If set, HTML tags inserted in the text are not removed. Any other HTML code will be removed by default!
emboss
emboss
-
- Type
- GIFBUILDER object ->EMBOSS
fontColor
fontColor
-
- Type
- Colors in TypoScript GIFBUILDER / stdWrap
- Default
- black
The font color.
fontFile
fontFile
-
- Type
- resource / stdWrap
- Default
- Nimbus (Arial clone)
The font face (TrueType
*.
and OpenTypettf *.
fonts can be used).otf
fontSize
fontSize
-
- Type
- positive integer / stdWrap
- Default
- 12
The font size.
hide
hide
iterations
iterations
-
- Type
- positive integer / stdWrap
- Default
- 1
maxWidth
maxWidth
-
- Type
- positive integer / stdWrap
Sets the maximum width in pixels, the text must be. Reduces the fontSize, if the text does not fit within this width.
Does not support setting alternative font sizes in splitRendering options.
niceText
niceText
-
- Type
- boolean / stdWrap
This is a very popular feature that helps to render small letters much nicer than the FreeType library can normally do. But it also loads the system very much!
The principle of this function is to create a black/white image file in twice or more times the size of the actual image file and then print the text onto this in a scaled dimension. Afterwards GraphicsMagick/ImageMagick scales down the mask and masks the fontColor down on the original image file through the temporary mask.
The fact that the font is actually rendered in the double size and scaled down adds a more homogeneous shape to the letters. Some fonts are more critical than others though. If you do not need the quality, then do not use the function.
after
niceText.after
-
GraphicsMagick/ImageMagick parameters after scale.
before
niceText.before
-
GraphicsMagick/ImageMagick parameters before scale.
scaleFactor
niceText.scaleFactor
-
- Type
- integer (2-5)
The scaling factor.
sharpen
niceText.sharpen
-
- Type
- integer (0-99)
The sharpen value for the mask (after scaling). This enables you to make the text crisper, if it is too blurred!
offset
offset
outline
outline
-
- Type
- GIFBUILDER object ->OUTLINE
shadow
shadow
-
- Type
- GIFBUILDER object ->SHADOW
spacing
spacing
-
- Type
- positive integer / stdWrap
- Default
- 0
The pixel distance between letters. This may render ugly!
splitRendering
splitRendering
-
- Type
- integer / (array of keys)
Split the rendering of a string into separate processes with individual configurations. By this method a certain range of characters can be rendered with another font face or size. This is very useful if you want to use separate fonts for strings where you have latin characters combined with, for example, Japanese and there is a separate font file for each.
You can also render keywords in another font / size / color.
[array]
splitRendering.[array]
-
- Type
- integer
With keyword being [charRange, highlightWord].
- splitRendering.[array] = keyword with keyword being [charRange, highlightWord]
-
splitRendering.[array] {
- fontFile: Alternative font file for this rendering.
- fontSize: Alternative font size for this rendering.
- color: Alternative color for this rendering, works only without niceText.
- xSpaceBefore: x space before this part.
- xSpaceAfter: x space after this part.
- ySpaceBefore: y space before this part.
- ySpaceAfter: y space after this part.
}
Keyword: charRange
split
= Comma-separated list of character ranges (for example,Rendering. [array]. value 100-
) given as Unicode character numbers. The list accepts optional starting and ending points, for example,200 - 200
or200 -
and single values, for example,65, 66, 67
.Keyword: highlightWord
split
= Word to highlight, makes a case sensitive search for this.Rendering. [array]. value Limitations:
- The pixel compensation values are not corrected for scale factor used
with niceText. Basically this means
that when
nice
is used, these values will have only the half effect.Text - When word spacing is used the
highlight
mode does not work.Word - The color override works only without
nice
.Text
Example:
10.splitRendering.compX = 2 10.splitRendering.compY = -2 10.splitRendering.10 = charRange 10.splitRendering.10 { value = 200-380 , 65, 66 fontSize = 50 fontFile = EXT:core/Resources/Private/Font/nimbus.ttf xSpaceBefore = 30 } 10.splitRendering.20 = highlightWord 10.splitRendering.20 { value = TheWord color = red }
Copied!
compX
splitRendering.compX
-
- Type
- integer
Additional pixel space between parts, x direction.
compY
splitRendering.compY
-
- Type
- integer
Additional pixel space between parts, y direction.
text
text
-
- Type
- string / stdWrap
This is text on the image file. The item is rendered only, if this string is not empty.
The
$c
array is loaded with the page record, if, for example, theObj->data GIFBUILDER
object is used in TypoScript.
textMaxLength
textMaxLength
-
- Type
- integer
- Default
- 100
The maximum length of the text. This is just a natural break that prevents incidental rendering of very long texts!