When a text overlay is applied to an image, it is first rendered and trimmed separately, and only then placed on the base image. Therefore, this process may sometimes result in the following behavior (notice the changing heights of the semi-transparent bars):
Unless instructed otherwise, Cloudinary will always trim the text container. As a result, different bar sizes may appear when using letters that extend above or below the line.
Adding the text_no_trim
flag (fl_text_no_trim
for URLs) to the text overlay transformation will override this behavior and will keep the margins around the text, for example:
Below is another use case example where two independent text layers need to be aligned. In the first example, you can see how "San Francisco" and "Golden City" are misaligned but using "fl_text_no_trim" (in the second example) resolves this.
More on text_no_trim: https://cloudinary.com/documentation/transformation_reference#fl_text_no_trim
Comments
0 comments
Please sign in to leave a comment.