Skip to content

NBSP in lyrics can render with zero width depending on selected font #34121

Description

@christianhofmanncodes

Issue type

Engraving bug (incorrect score rendering)

Description with steps to reproduce

When entering lyrics, MuseScore Studio uses U+00A0 NO-BREAK SPACE as the reserved space character, for example when pressing Option+Space on macOS. This works correctly at the input/storage level: the U+00A0 character is inserted and saved in the score.

However, depending on the selected lyrics font, U+00A0 may render with no visible advance width. In that case, pressing Option+Space appears to do nothing in the score, even though the character is actually present in the .mscx file.

I found this with the Delicious font. A normal space U+0020 has visible width in this font, but U+00A0 does not. With other fonts, the same U+00A0 character displays correctly.

Steps to reproduce

  1. Open MuseScore Studio 4.7.4 on macOS.
  2. Create a new score or open an existing one.
  3. Set the lyrics font to Delicious.
  4. Select a note and enter lyrics mode with Cmd+L.
  5. Type foo.
  6. Press Option+Space to insert a reserved space.
  7. Type bar.

Expected result

MuseScore inserts U+00A0 NO-BREAK SPACE and renders it with visible spacing, similar to a normal space U+0020, while still keeping the text within the same lyric syllable.

The lyrics should appear visually as:

foo bar

Actual result

The U+00A0 character is inserted and stored correctly in the .mscx file, but it has no visible spacing in the score when the lyrics font is set to Delicious.

The lyrics appear visually as:

foobar

Verification

I confirmed that Option+Space does insert U+00A0 correctly. After saving the score, unpacking the .mscz file, and inspecting the .mscx file, the U+00A0 character is present in the lyrics text.

I also compared U+0020 and U+00A0 with the same font:

U+0020 SPACE has visible width.
U+00A0 NO-BREAK SPACE has no visible width.
With other fonts, U+00A0 displays correctly.

System information

MuseScore Studio 4.7.4
macOS: macOS Tahoe Version 26.5.1
Keyboard layout: German (QWERTZ)
Lyrics fonts: Delicious

Possible cause

This seems to be a font-specific rendering or metrics issue. The selected font may lack a usable U+00A0 glyph or define incorrect metrics for it.

However, because U+00A0 is part of MuseScore’s documented lyrics input workflow, MuseScore may need to handle this case more robustly, for example by falling back to the advance width of U+0020 SPACE when rendering U+00A0 NO-BREAK SPACE in lyrics.

Additional notes

This is not a keyboard shortcut issue. Option+Space works and the character is stored correctly. The problem is that the stored U+00A0 may not be visibly rendered depending on the lyrics font.

Supporting files, videos and screenshots

  1. Unzip the test-space.zip file
  2. Open the test-space.mscx file in an editor / IDE
  3. Search for the text 1. This (U+00A0 NO-BREAK SPACE) and the text test space (U+0020 SPACE)

test-space.zip

To view the score:

  1. Please download the font "Delicious"
  2. Open the test-space.mscx file in MuseScore Studio 4

In which versions of MuseScore Studio is this issue present?

4.7.4

Regression

I was unable to check

Operating system

macOS Tahoe Version 26.5.1

Additional context

Current workaround

  1. In lyrics mode: Goto "Add symbols"
  2. Navigate to the tab "Unicode symbols"
  3. On the left choose "Basic Latin"
  4. Click on the empty character (Space, 0x00020)

Note: The current workaround uses U+0020 SPACE, which gives visible spacing with Delicious, but it is not semantically equivalent to U+00A0 NO-BREAK SPACE / reserved lyrics space.

Checklist

  • This report follows the guidelines for reporting bugs and issues
  • I have verified that this issue has not been logged before, by searching the issue tracker for similar issues
  • I have attached all requested files and information to this report
  • I have attempted to identify the root problem as concisely as possible, and have used minimal reproducible examples where possible

Metadata

Metadata

Labels

engravingShape, position, or ability to notate musical symbols & text in the scoreneeds reviewThe issue needs review to set priority, fix version or change status etc.

Type

Fields

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions