Skip to content

Tab-strip icons (settings/help/new-tab) render at the wrong x-position on some Macs; hit-targets stay correct #3

Description

@kingb

Summary

On one user's Mac, the tab-strip chrome icons (the + new-tab, ? help, and ⚙ settings glyphs) render on the left side of a tab instead of at their normal right-aligned positions. The click targets are unaffected: clicking where the icons should be still works. So the quad/hit-box math is right and only the shaped glyph positions are off.

Second data point: another Mac (macOS 26.3) renders them correctly.

Suspected cause

Those chrome glyphs ( U+FF0B, /?, U+2699) are not covered by every monospace font, so they shape through cosmic-text's font fallback. On a different macOS release (or a Mac with different fonts installed), fallback can resolve to a different font with different advances, shifting where glyphs land in the shaped run, while our hit-boxes are computed independently from cell metrics. A glyph-cluster/advance mismatch in the tab-strip's shaped text would produce exactly "drawn in the wrong place, clickable in the right place".

Needed to reproduce

  • macOS version of the affected machine
  • Screenshot of the tab strip
  • Output of launching with font diagnostics: EMBER_FONT_DEBUG=1 /Applications/Ember.app/Contents/MacOS/ember-term 2>font.log and attach the log (it records which fonts cosmic-text actually resolved)

Where to look

  • Tab-strip shaping and the icon hit-boxes are computed in separate places by design; the fix likely pins the chrome glyphs to explicit sprite/atlas rendering (the box-drawing path already does this for exactly this reason) or measures the shaped run instead of assuming cell-width multiples.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions