discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Puzzled by text spacing parameter

SL
Steve Lelievre
Mon, Mar 2, 2026 6:44 PM

Hi everyone,

By using the spacing parameter, I've tried to make some text have bigger
gaps between letters but it doesn't give the result that I expected. In
the example below when I use spacing greater than 1, the lowercase
letters seem to space out okay but the gap after uppercase letters seems
a bit too wide, like after the H, U and M (and after i the spacing seems
relatively small. From a few tests, it seems that the 'wrong' gaps show
up only after certain letters, and they seem to be more noticeable when
there is a change of case in a word. I realise that rules for letter
spacing are complicated so perhaps those in the know would expect this
result, but to me it is unexpected.

translate([0,  10]) text("Hoot Unicorn Mouse Sunset", font = "Calisto MT", size = 10, halign = "center", valign = "center", spacing = 2); // test case

translate([0, -10]) text("Hoot Unicorn Mouse Sunset", font = "Calisto MT", size = 10, halign = "center", valign = "center", spacing = 1); // normal spacing

For my present project, an adequate circumvention involves using normal
spacing with space characters added between letters, but I'd still like
to know: is the issue a bug, or just a feature of the way these things work?

Cheers,

Steve

Hi everyone, By using the spacing parameter, I've tried to make some text have bigger gaps between letters but it doesn't give the result that I expected. In the example below when I use spacing greater than 1, the lowercase letters seem to space out okay but the gap after uppercase letters seems a bit too wide, like after the H, U and M (and after i the spacing seems relatively small. From a few tests, it seems that the 'wrong' gaps show up only after certain letters, and they seem to be more noticeable when there is a change of case in a word. I realise that rules for letter spacing are complicated so perhaps those in the know would expect this result, but to me it is unexpected. translate([0,  10]) text("Hoot Unicorn Mouse Sunset", font = "Calisto MT", size = 10, halign = "center", valign = "center", spacing = 2); // test case translate([0, -10]) text("Hoot Unicorn Mouse Sunset", font = "Calisto MT", size = 10, halign = "center", valign = "center", spacing = 1); // normal spacing For my present project, an adequate circumvention involves using normal spacing with space characters added between letters, but I'd still like to know: is the issue a bug, or just a feature of the way these things work? Cheers, Steve
JB
Jordan Brown
Mon, Mar 2, 2026 9:22 PM

On 3/2/2026 10:44 AM, Steve Lelievre via Discuss wrote:

By using the spacing parameter,

The answer is unfortunately really simple:  Don't.

See issue #3859 https://github.com/openscad/openscad/issues/3859 for
examples and a partial workaround.

On 3/2/2026 10:44 AM, Steve Lelievre via Discuss wrote: > > By using the spacing parameter, > The answer is unfortunately really simple:  Don't. See issue #3859 <https://github.com/openscad/openscad/issues/3859> for examples and a partial workaround.
AM
Adrian Mariano
Mon, Mar 2, 2026 9:44 PM

If you want a workaround, you can use BOSL2's path_text with a straight
path in a dev version that has textmetrics, e.g.,

include<BOSL2/std.scad>
path_text([[0,0],[80,0]], "Example text", size=5, textmetrics=true, kern=2);

[image: image.png]

On Mon, Mar 2, 2026 at 4:23 PM Jordan Brown via Discuss <
discuss@lists.openscad.org> wrote:

On 3/2/2026 10:44 AM, Steve Lelievre via Discuss wrote:

By using the spacing parameter,

The answer is unfortunately really simple:  Don't.

See issue #3859 https://github.com/openscad/openscad/issues/3859 for
examples and a partial workaround.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

If you want a workaround, you can use BOSL2's path_text with a straight path in a dev version that has textmetrics, e.g., include<BOSL2/std.scad> path_text([[0,0],[80,0]], "Example text", size=5, textmetrics=true, kern=2); [image: image.png] On Mon, Mar 2, 2026 at 4:23 PM Jordan Brown via Discuss < discuss@lists.openscad.org> wrote: > On 3/2/2026 10:44 AM, Steve Lelievre via Discuss wrote: > > By using the spacing parameter, > > > The answer is unfortunately really simple: Don't. > > See issue #3859 <https://github.com/openscad/openscad/issues/3859> for > examples and a partial workaround. > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
SL
Steve Lelievre
Tue, Mar 3, 2026 6:07 PM

Jordan, Adrian,

Thanks for the advice/suggestions.

Steve

On 2026-03-02 1:22 p.m., Jordan Brown wrote:

On 3/2/2026 10:44 AM, Steve Lelievre via Discuss wrote:

By using the spacing parameter,

The answer is unfortunately really simple:  Don't.

See issue #3859 https://github.com/openscad/openscad/issues/3859 for
examples and a partial workaround.

Jordan, Adrian, Thanks for the advice/suggestions. Steve On 2026-03-02 1:22 p.m., Jordan Brown wrote: > On 3/2/2026 10:44 AM, Steve Lelievre via Discuss wrote: >> >> By using the spacing parameter, >> > > The answer is unfortunately really simple:  Don't. > > See issue #3859 <https://github.com/openscad/openscad/issues/3859> for > examples and a partial workaround. > >