auto-scaling text to fit into a box?

pfriedl
pfriedl Unconfirmed, Member Posts: 2
edited January 2023 in Developer APIs

Hi all, so I'm pulling reviews from GMB, adding the review text to an image, and then posting it to social channels.

What I need to do is wrap the text, but also make sure it scales to fit an area, vertically centered.

Any idea on the transform parameters for that?

Tagged:

Comments

  • DannyFromCloudinary
    DannyFromCloudinary Member, Cloudinary Staff Posts: 150

    Hey @pfriedl. Thanks for your question!

    The best thing to do would be to use c_fit on your text to constrain it within a certain width, and then position it accordingly with the gravity options. This blog post should help you achieve what you're looking for.

    Let us know if you have any further questions and we'll be happy to assist.

    Danny @ Cloudinary Support