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 #23090: Added style option to use expression font for dynamics #25750

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

HemantAntony
Copy link
Contributor

@HemantAntony HemantAntony commented Dec 6, 2024

Resolves: #23090

Within Format > Style:

  1. Combines pages for Dynamics and Hairpins into a single Dynamics & hairpins page (requested by @avvvvve).
  2. Adds a new option in Dynamics & hairpins to display dynamics in the Expression text font (an accessibility feature).

image

New style parameter: dynamicsUseExpressionFont (accessibility feature)

When enabled, dynamic symbols (p, mf, etc.) are rendered in the same font as surrounding text.

Disabled (default) Enabled (new)
Traditional Accessible

The option can be enabled or disabled at any time to convert existing scores to and from the accessible rendering.

Editing dynamics

While editing, dynamics always use the traditional rendering so that users know which characters are "special".

Editing Not editing
image image
  • I signed the CLA
  • The title of the PR describes the problem it addresses
  • Each commit's message describes its purpose and effects, and references the issue it resolves
  • If changes are extensive, there is a sequence of easily reviewable commits
  • The code in the PR follows the coding rules
  • There are no unnecessary changes
  • The code compiles and runs on my machine, preferably after each commit individually
  • I created a unit test or vtest to verify the changes I made (if applicable)

@shoogle

@HemantAntony HemantAntony force-pushed the 23090-option_to_use_expression_font_dynamics branch 5 times, most recently from 59ae355 to a69a6f0 Compare December 8, 2024 19:44
Copy link
Contributor

@shoogle shoogle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Behaves exactly as requested, thanks!

src/engraving/dom/harppedaldiagram.cpp Outdated Show resolved Hide resolved
src/engraving/dom/dynamic.cpp Outdated Show resolved Hide resolved
This changes the way TextFragments are stored in TextBlock from a list of TextFragment to a list of TextFragment shared pointers. This is necessary because the new DynamicFragment cannot be stored in the earlier list because of object slicing.

tmp
This changes the way to access text in TextFragment from a variable to a getter/setter model. This is necessary to handle when DynamicFragment text is changed.

Update textbase.h
@HemantAntony HemantAntony force-pushed the 23090-option_to_use_expression_font_dynamics branch from a69a6f0 to dd49c24 Compare December 20, 2024 08:15
@avvvvve
Copy link

avvvvve commented Dec 20, 2024

@HemantAntony Thanks for working on this!

Small request: the height of the dropdown next to "Choose font" is too short (24px). It should be 30px to match the standard dropdowns we use everywhere else
image

…namics

This commit introduces a new class DynamicFragment which inherits the TextFragment class. This is used to handle the changes for Dynamics.
@HemantAntony HemantAntony force-pushed the 23090-option_to_use_expression_font_dynamics branch from dd49c24 to a784154 Compare December 20, 2024 16:05
@HemantAntony
Copy link
Contributor Author

@avvvvve I have updated the PR. Does it look good now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

Add style option to use text font for dynamics
3 participants