Search code examples
cvips

How to add spacing between characters in text using VIPS?


I'm using the VIPS library for manipulating images and adding text to them. I want to know how to add spacing to characters in text?

The following image is an example of what I'm talking about.

Tracking and kerning


Solution

  • You can use pango markup. For example:

    vips text x.png '<span letter_spacing="10000">Hello!</span>' --dpi 300
    

    To make:

    enter image description here