Overview
Sources
Libraries
Images API

Text Font Size text-size

Specify the size of the font in font points.

Values

This parameter accepts integer values in the range 1 to 500:

  • 1: minimum font size.
  • 500: maximum font size.

The default value for this parameter is 20, defining a size of 20 font size points.

Examples

Not specifying a text-size parameter will result in using a default of 20 font size points.

GET
https://assets.imglab-cdn.net/particles.jpeg
Rendering text over image using text-size parameter with a value of 20 points.
x px

Using a size value of 40 points with text-size=40:

GET
https://assets.imglab-cdn.net/particles.jpeg?text-size=40
Rendering text over image using text-size parameter with a value of 40 points.
x px

Notice that text could overflow image boundaries if the font size is big enough. In this case we are using a font size of 60 points with parameter text-size=60:

GET
https://assets.imglab-cdn.net/particles.jpeg?text-size=60
Rendering text over image using text-size parameter with a value of 60 points.
x px

To avoid text overflowing the source image you can take a look at text-width and text-height parameters. These parameters can help you define specific dimensions for the text.