Skip to content

fix: preserve chord accidentals in score PDF exports - #586

Closed
chengzuopeng wants to merge 1 commit into
timoncool:mainfrom
chengzuopeng:fix/score-pdf-accidentals
Closed

chengzuopeng wants to merge 1 commit into
timoncool:mainfrom
chengzuopeng:fix/score-pdf-accidentals

Conversation

@chengzuopeng

Copy link
Copy Markdown
Contributor

Fixes #583.

The score preview renders musical accidentals, but the PDF exporter writes chord text with built-in PDF fonts that cannot encode ♭, ♮, and ♯. For example, B♭ is displayed as B&m.

Embed a 1.8 KB, licensed font subset only when needed, and use it for accidental characters in chord labels. Keep the score in vector form and the accidentals as selectable Unicode text.

Verification: Clicked the score PDF button in headless Chromium using an ABC score with B♭, E♭maj7, F♯7/C♯, and Dm. Poppler extracts the expected symbols from the new PDF instead of &m and &o, and pdffonts reports the embedded font with a Unicode map. All 508 app tests passed. The Windows Tauri Save dialog and model generation were not tested.

@timoncool

Copy link
Copy Markdown
Owner

Thank you — this is in 5.5.0 as your own commit: score PDFs keep chord sharps and flats, with the font's licence next to the others. Closing because it landed through the release branch. https://github.com/timoncool/YuE2-Studio/releases/tag/v5.5.0

@timoncool timoncool closed this Dec 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PDF export (PDF button above the generated score): chord symbols containing the

2 participants