# Text alignment issue when Auto-Scaling Variable-text to fit within a bounding box

**URL:** <https://forum.lightburnsoftware.com/t/text-alignment-issue-when-auto-scaling-variable-text-to-fit-within-a-bounding-box/172598>\
**Category:** LightBurn Software Questions\
**Tags:** text, variable-text\
**Created:** [May 29, 2025, 10:14am UTC](https://forum.lightburnsoftware.com/t/text-alignment-issue-when-auto-scaling-variable-text-to-fit-within-a-bounding-box/172598 "2025-05-29T10:14:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bille](https://forum.lightburnsoftware.com/user_avatar/forum.lightburnsoftware.com/bille/32/83792_2.png) [@bille](https://forum.lightburnsoftware.com/u/bille)\
**Post date:** [May 29, 2025, 10:14am UTC](https://forum.lightburnsoftware.com/t/text-alignment-issue-when-auto-scaling-variable-text-to-fit-within-a-bounding-box/172598/1 "2025-05-29T10:14:17Z")

</div>

I’m trying to center and uniformly scale a variable-length text string within a fixed bounding box in LightBurn. The goal is for the text to scale down as needed to fit within the box, without distortion, and remain centered both horizontally and vertically.

Here’s what I’ve done:

1. Created a rectangle on the **T1 layer** at center position **X:150, Y:150** with **width 70mm** and **height 40mm**. This serves as a visual bounding box.
2. Added a text element with the content **”%0”** on **Layer 01** , also centered at **X:150, Y:150**.

- Font height is set to **52**.
- The text is aligned **X: middle** , **Y: middle**.
- The shape properties are: Squeeze = Off, Max Width = 70.
- The actual dimensions of the text shape are **W:69.648mm, H:39.235mm**.
- The text is configured as a **Merge/CSV** field.

1. I have created a 2x2 array of the elements to make it easy to visualize the result for different string lengths

**Expected behavior:**

Regardless of the text length, the scaled result should remain centered both horizontally and vertically inside the rectangle.

**Actual results:**

- For short strings like “0”, everything works as expected — the text is centered in both directions.
- For longer strings like “test-001”, the text is scaled correctly in width to fit the bounding box, but **in the Y direction, it aligns to the top** rather than the center — even though both Align Y: middle and center position Y:150 are specified.

This leads me to believe that vertical alignment is not being respected when auto-scaling is applied.

Is this a bug or is there something I’m missing in the configuration?

Thanks in advance!

Bille

[lightburn-bug-variable-text-vertical-alignment.lbrn2](https://forum.lightburnsoftware.com/uploads/short-url/1QlhFK4ncx6eD77yOYlslI2UDUh.lbrn2) (29.1 KB)

 ![lightburn-bug-variable-text-vertical-alignment_small](https://forum.lightburnsoftware.com/uploads/default/original/3X/6/5/6556caa225218c139ff15dd479f0bf9fe2eb1164.jpeg)

---

<div class="post-metadata">

**Author:** ![system](https://forum.lightburnsoftware.com/user_avatar/forum.lightburnsoftware.com/system/32/64335_2.png) [@system](https://forum.lightburnsoftware.com/u/system)\
**Post date:** [June 28, 2025, 10:15am UTC](https://forum.lightburnsoftware.com/t/text-alignment-issue-when-auto-scaling-variable-text-to-fit-within-a-bounding-box/172598/2 "2025-06-28T10:15:01Z")

</div>

Closed on June 28, 2025, 10:15am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
