Skip to content

Set bold” / “Set italic” buttons have no effect on the generated text (macOS, .ttc fonts) #1009

Open

Description

@Roonster78

Is there an existing issue for this problem?

  • I have searched the existing issues

Snapmaker_Orca Version

2.4.1 beta (Build 01.10.01.50)

Operating System (OS)

macOS

OS Version

macOS 27.2, Apple Silicon (M4 Max)

Additional system information

No response

Printer

Snapmaker U1 (0.4 nozzle), the printer does not matter

How to reproduce

  1. Prepare tab, add any object (e.g. a 20 mm cube) and select it.
  2. Open the Text tool (toolbar “T”). The default font is “Helvetica”.
  3. Click the B (Set bold) button next to the font combo.
  4. Click the I (Set italic) button.

Actual results

The buttons toggle their state (undo arrow at “Font”, style shows Normal*, tooltip changes to “Unset bold”/”Unset italic”), but the text geometry on the plate does not change at all. It stays Helvetica Regular. “Advanced” shows the Collection index stays at 0. Same for every macOS system font that stores its styles in a TrueType collection (.ttc), which is almost all of them (Helvetica, Helvetica Neue, Avenir, Menlo, …).

Expected results

Bold / italic text geometry, like in the old text tool of Snapmaker Orca 2.3.x.

Project file & Debug log uploads

Testfile_Bold_Italic_issue.3mf.zip

Checklist of files to include

  • Log file
  • Project file

Anything else?

Root cause (from reading the code)
The compiled text tool is the Emboss gizmo (GLGizmoEmboss). On macOS the bold/italic variants of a family are stored as different fonts inside one collection file, e.g. /System/Library/Fonts/Helvetica.ttc (index 0 Regular, 1 Bold, 2 Oblique, 3 BoldOblique). Core Text resolves “Helvetica, bold” to the same file, only to another face index. WxFontUtils::set_bold()/set_italic() load that file again, but nothing ever sets FontProp::collection_number, so index 0 is always rendered.

Two related defects: Emboss::FontFile::operator== compares descent/linegap with == instead of !=, so identical font files are never detected and the synthetic boldness/skew fallback never fires (all platforms, inherited from PrusaSlicer). And after the gizmo reloads the text volume, wxWidgets reports the italic/bold font (serialized as PostScript name, e.g. Helvetica-Oblique) as “normal” style/weight, so button states are wrong and italic gets lost when bold is toggled afterwards. The same code is in upstream OrcaSlicer.

Fix
I have a tested fix (verified on a self-built 2.4.1 on macOS: bold, italic, both combined in either order, unset, and reload after reselecting the text volume all work with the real .ttc faces). Pull request follows: resolve the face index the OS selected (macOS: Core Text PostScript name; Windows: GDI full name; Linux: fontconfig FC_INDEX) and store it in collection_number, fix operator==, and restore style/weight from the matched Core Text font when loading a serialized wx font descriptor.

Files: Not needed, reproducible with any object and the default font. Before/after screenshots attached.

Image Image Image Image

Activity

  1. added
    bug
    on Oct 13, 2026
  2. creat3dworld commented on Nov 14, 2026

    @creat3dworld

    Partial fix for the reported defect. Verified in source: Emboss::FontFile::operator== compares descent/linegap with == instead of !=, so identical font files are never detected and the synthetic bold/skew fallback never fires. Fixed to != — a clear cross-platform correctness fix.

    The main .ttc defect (the collection number is never set from the OS-resolved face index, so index 0 is always rendered) is not fixed here — it needs your macOS Core Text fix, which you said you tested and will PR. If your PR lands first, this one can be dropped in favour of it.

    PR: #1204

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions