-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[MU4] fix 280260: added an option to set the default font for all text types #5816
Conversation
For some styles it is pretty vital that they don't change. Like Figured Bass, Roman Numeral Analysis and Nashville Number System for example. Hmm, maybe only for Roman Numeral Analysis... |
RNA for sure, but indeed maybe only that among the actual "text styles". The other elements that require special fonts don't use the text style mechanism - figured bass, tablature, multimeasure rests, time signatures, etc - and so wouldn't be affected by the change as proposed. |
mscore/editstyle.ui
Outdated
</property> | ||
</widget> | ||
</item> | ||
<item row="2" column="1"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a clever implementation, but I think the UI needs work. Right now it's just a combo box, meaning it isn't meaningful if - as may often be the case - there are a mix of fonts used. Also, after using the combo box to change the fonts, then saving the score and reloading, it will still show FreeSerif, will it not? Really, the control should probably be hidden behind an explicit Change button to make clear the combo box isn't showing you anything in particular relevant to the score. Also, it might be nice if the code to initialize the combo box somehow did present something relevant, like maybe the current value of staff text, or maybe title.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a clever implementation, but I think the UI needs work. Right now it's just a combo box, meaning it isn't meaningful if - as may often be the case - there are a mix of fonts used.
My original idea was to create something like this (see image). In the first box you select the font that you want to change (you can only select one of the fonts that are in use in the current style), in the second box you select the font that you want to replace the first font with. Then you click the 'Change' button. This way you can replace all occurrences of one font with another which is probably better than the original request.
Also, it might be nice if the code to initialize the combo box somehow did present something relevant, like maybe the current value of staff text, or maybe title.
I could initialize the combo box to the most used font in the current style.
These checkboxes are all formatted incorrectly. Please remove the space after each |
c956c51
to
17c30fd
Compare
17c30fd
to
c8aac6c
Compare
I think this PR is good, but it tries to do too much. Judging by the screenshot, it's is basically a glorified find-and-replace feature to find instances of one font in text styles and replace it with another (i.e. find FreeSerif and replace with Ubuntu font). This is a clever way to solve the problem of styles like RNA having a different default to the others, but it is very unintuitive. Instead, I would suggest having only one dropdown for a single default text font. If a new default is selected then any text styles that were using the old value are updated to use the new value, while styles using other values (e.g. RNA) are left unchanged. In terms of file format, the default text font would be saved in the <Style>
<defaultFontFace>Arial</defaultFontFace>
</Style> Note: if the default font face was equal to "Edwin" (the new global default for 3.6) then it would not be written to the file. The font face for individual text styles like Expression text would only be written to the file if it is different to the value in <Style>
<defaultFontFace>Arial</defaultFontFace>
<expressionFontFace>Comic Sans</expressionFontFace>
</Style> As an exception, text styles that have a special default (e.g. Campania for RNA) would have to be written to the file if they are changed to something other than that special default, even if the new value is the same as <Style>
<defaultFontFace>Arial</defaultFontFace>
<romanNumeralFontFace>Arial</romanNumeralFontFace>
</Style> |
Rebase needed, probably to 3.x (easily done directly here on GitHub). |
While I still think my first suggestion is the way to go in the long term, a simpler method for 3.6 would be to not save There would still only be a single dropdown for "Text font" in Format > Style. The initial value of the dropdown would be given by the most common font used across all text styles for the current score, so if most styles are using FreeSerif then the dropdown would initially show FreeSerif. If the dropdown is subsequently changed to Arial then all text styles that were previously using FreeSerif are changed to Arial. No need to alter code for reading or writing MSCX files. If there is a tie for most common font then you can use the one that comes first in whatever data structure you are using to count them (probably a map). You could come up with tie-breaking criteria such as "which font is used in more styles that follow stave size?" but that's probably overkill for a situation that will be pretty rare anyway. Note that even if there was a |
That is indeed pretty simple (I am doing exactly that if I understand what you are saying correctly), but I am still not convinced that this behavior is preferable to the existing one. Checkout the 3.x PR, I added a button which I believe makes this pretty intuitive. Edit: It would be great if we could get a couple more opinions on this matter. |
I would suggest we do this instead. I feel all these fonts named 'text' is utterly confusing for any casual user. Can I remind everyone that Vasily has already announced feature lockdown for 3.6, so this can't go in because it will most likely result in a few more unexpected bugs. It is likely we will need to release a 3.6.1 (for a MuseScore.com fix) and we will consider this change then. But as a rule, from now on, all new features should be proposed and built for V4. |
Closing. |
Resolves: https://musescore.org/en/node/280260
Added the ability to change all the text fonts as requested. The option is at Settings > Style > Score below Musical Text Font.
Edit: Improved the UI, excluded RNA and added a way for the program to give some reasonable default values to the UI elements. Right now the change happens when you change the 2nd box, but I will probably add a button because this is not very intuitive.