'Trouble with font and text extrusion

So, I'm doing some odd things with text extrusion and (perhaps not surprisingly) having some odd issues in OpenSCAD.

This is part of a much larger project, but I've been able to simplify the problem down to the following snippet of code.

use<RingbearerMedium-51mgZ.ttf>

Text = "b";
Font = "Ringbearer:style=Medium";
segment_count = 2;
segment_width = 2;
text_height = 5;
text_thickness = 1;

// Iterate over each "segment" of text
for (segment_number = [0: segment_count - 1])
{
    // Calculate the x offset of the current "segment" of text
    segment_x_offset = segment_number * segment_width;

    // Extrude the "segment" of text to the requested thickness
    linear_extrude(text_thickness)

    // Grab the current "segment" of text
    intersection()
    {
        text(Text, font=Font, size=text_height);
        translate([segment_x_offset, 0])
            square([segment_width, text_height]);
    }
}

All this does is generate a line of text (just "b", in this case), cuts it into "segments", then extrudes each segment in-place. It's not much use in this example, but in the larger one, I'm translating and rotating each segment.

OpenSCAD's F5 preview renders fine. Here's a screenshot:

F5 Preview

However, the F6 preview always drops the left side of the letter "b" and displays the error "ERROR: The given mesh is not closed! Unable to convert to CGAL_Nef_Polyhedron". Here's a screenshot:

F6 Preview

This effects other letters as well, but only seems to be a problem with the "Ringbearer" font I'm trying to use. I don't know if I can upload the font, but it's available for download for free from here: Link to Ringbearer Font. Extruding and rendering the font without breaking it into segments works just fine. It's just when I try to segment this particular font that OpenSCAD fails.

Now, the obvious answer is to use a font that works, which is fine, as far as it goes, but I'm genuinely curious why this is happening. Is it an error with the font or is this a limitation of OpenSCAD? Is this a known issue that I'm just not aware of?

I appreciate any insight I can get.



Solution 1:[1]

Within OpenScad, go to help->font list. I think the font you are using isn't supported.

Yet I had a similar problem with a supported font. I changed the font few times until I found one that works for me well, and look nice as well.

It also depends on the font size. Sometimes same font fails at a smaller size, and works well on a larger size.

Anyway, you can see this on the slicer, before going to the printing. Take a close look at the slicing layers of the text, it will save you some printing time and frustration.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Yigal B