OrcaSlicer icon indicating copy to clipboard operation
OrcaSlicer copied to clipboard

Emboss Text - character not working

Open twdlup opened this issue 3 months ago • 4 comments

Is there an existing issue for this problem?

  • [x] I have searched the existing issues

Snapmaker_Orca Version

2.3.5

Operating System (OS)

macOS

OS Version

26.6.2 (25G83)

Additional system information

CPU: M4 Pro Memory: 24 GB

Font character is not working in slicer. I checked the font in Font Book, there are no issues. Reinstalled the font, still not working in SnOrca

Printer

U1

How to reproduce

  1. Add Text
  2. Choose font "Natural Coffee"
  3. Type "3I"
  4. Shows a box instead of the characters 3 and capital I

Actual results

  1. Shows a box instead of the characters 3 and capital I

Expected results

  1. Should be the characters "3" and "I"

Project file & Debug log uploads

logs_20260827_092154.zip

Embossed text - font issue - Natural Coffee.3mf.zip

Natural Coffee.otf.zip

Checklist of files to include

  • [x] Log file
  • [x] Project file

Anything else?

Image

twdlup avatar Aug 27 '26 14:08 twdlup

Issue also exists in Orca Slicer v2.4.2

twdlup avatar Aug 27 '26 14:08 twdlup

Orca bot: this issue is stale because it has been open for 90 days with no activity.

github-actions[bot] avatar Nov 26 '26 00:11 github-actions[bot]

I triaged this against the v2.4.1 source (I'm Muse, an AI assistant, doing this triage under Marlena and Breandan Sharpe's direction). I couldn't confirm the root cause yet, because the font file itself wasn't verified — but here's the likely mechanism and what's needed to confirm it:

Emboss uses stb_truetype (imstb_truetype.h, Emboss.cpp:12); stbtt_FindGlyphIndex returns 0 for a missing glyph, which renders as a box. stb_truetype does not support CFF-based .otf fonts (PostScript outlines) — if "Natural Coffee" is a CFF .otf, its glyphs can't be read at all. But whether this font is CFF-based (vs a TrueType .otf with genuinely missing "3"/"I" glyphs, vs a cmap issue) is unconfirmed, since the attached font file wasn't inspected here. A CFF fix would need FreeType integration — a feature, not a one-line fix.

Could you confirm the font's outline format — CFF vs TrueType — e.g. via Font Book's font info, or otfinfo — and whether other characters in the same font render? That would settle whether this is the CFF limitation or something else.

creat3dworld avatar Nov 27 '26 00:11 creat3dworld

Correction to my earlier comment — I tested the attached font myself and the CFF theory does not hold up, so please ignore that part.

I downloaded your Natural Coffee.otf and checked it against the repo's own vendored stb_truetype: the font IS CFF-based (OTTO, CFF table, no glyf), but stb_truetype reads it fine — FindGlyphIndex returns real indices for '3' (23) and 'I' (45), GetGlyphShape returns outlines matching the true glyph bounding boxes, and flattening succeeds. The charstrings use only plain rmoveto/rrcurveto, nothing exotic. So a CFF/font-engine change would be a false fix.

What I did find: rendering your 3MF, 60+ glyphs from this same font emboss correctly — only '3' and 'I' come out as hollow rectangles, sized to each glyph's own bounding box (not the .notdef box). That means the corruption happens downstream of shape extraction, in the glyph-to-polygon path (flattening / polygon healing) for exactly these two glyphs. I could not identify the corrupting step by reading the code alone.

So what would actually move this forward is a build reproduction: run Emboss::letter2glyph on this font and inspect the healed polygons for '3' and 'I' against a working glyph. That is on my side to do next — I am not asking you for anything more here.

(I am Muse, the AI assistant, doing the triage and testing under Marlena and Breandan's direction.)

creat3dworld avatar Nov 27 '26 01:11 creat3dworld