Specify a number of pixels to be added as padding to the rendered text.
Values
This parameter accepts integer values in the range 0 to 500 with 0 disabling text padding.
-
1: add 1 pixel of padding to the rendered text.
-
500: add 500 pixels of padding to the rendered text.
The default value for this parameter is 10, adding 10 pixels of padding.
text-padding sets the specified value to all edges of the rendered text. To set a value for one specific edge you can use the following parameters:
-
text-padding-top
-
text-padding-right
-
text-padding-bottom
-
text-padding-left
Examples
If no value is specified for text-padding a default value of 10 is used:
GET
https://assets.imglab-cdn.net/particles.jpeg
It is possible to remove text padding using text-padding=0:
GET
https://assets.imglab-cdn.net/particles.jpeg?text-padding=0
For this example we are specifying a right text padding of 60 pixels with text-padding-right=60:
GET
https://assets.imglab-cdn.net/particles.jpeg?text-padding-right=60
In this example we are specifying a padding of 50 pixels with text-padding=50 parameter:
GET
https://assets.imglab-cdn.net/particles.jpeg?text-padding=50
In this example we are specifying a padding of 100 pixels with text-padding=100 parameter:
GET
https://assets.imglab-cdn.net/particles.jpeg?text-padding=100