Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #315897: unreadable chord symbols with custom description file #7370

Merged
merged 1 commit into from
Feb 3, 2021

Commits on Feb 1, 2021

  1. fix #315897: unreadable chord symbols with custom description file

    Resolves: https://musescore.org/en/node/315897
    
    There is a style setting to allow custom chord description files,
    which is an advanced feautr eused by few today
    but was the the standard/supported way of getting "jazz" chords
    in older versions.
    Scores using this option will have chord symbols rendering info
    embedded within the score, in a ChordList tag.
    Thus far, at the point where this tag was encountered,
    the score's chord list was empty, and reading the chord list
    worked as expected.
    Now, however, the reading of the style defaults file for the score
    results int he chord list having three "font" entries
    before the actual chord list is read.
    This results in the font references all being off,
    meaning that the various special symbols used in chord symbols
    get rendered as nonsense characters because they are in fonts
    that do not support these special symbols.
    
    Solution is unload the existing chord list
    when we encounter a ChordList tag, before reading the list.
    Previously there was a clear() call, but that's not enough,
    we need to clear the fonts and other settings too.
    
    Also, to be safe, I changed the initiation of of the font index
    in ChordList::read() so that if there *are* any fonts
    already present in the list, they are accounted for,
    at least partially.
    
    I also set the customChordList flag to make sure
    we always write the chord lsit when it is custom,
    and don't write it when not.
    This was previously not being set when changing style
    via the dialog - only on read.
    As a result, a custom chord list didn't get written
    until after save / load / save,
    and was being written inappropriately after changing
    back to a built-in (standard or jazz) style.
    MarcSabatella committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    f385e1b View commit details
    Browse the repository at this point in the history