-
Notifications
You must be signed in to change notification settings - Fork 666
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
Usage of FontFace rather than paths #1479
Conversation
As this is a big PR, it'll take time to properly review. Thanks for looking into this though! Can you write up some extra info in this thread to help us with this review? What are the main tradeoffs? This handles all of our font needs, whether we are using it to render chord symbols or music engraving symbols?? |
The changes are simple and the review will be much quicker than what you anticipate :)
Yes both, and also, to write text. The SMuFL OTF files include characters for many languages (hindi,...) |
I don't ever manipulate the points of the path after its drawn, so that won't be a breaking change to me, but I do tend to change the fill-color (and opacity, etc.) of the SVG. Is that done with the same interface in this PR? It looks like an incredible space savings (especially since I can then load one copy of Bravura [or Gootville] for the whole site instead of two, but I wonder if it's backwards compatible enough to go into v4 or if it's more of a v5 thing? |
Draft until #1476 is resolved, I want to integrate this PR in this one. |
@@ -84,15 +83,15 @@ export class Annotation extends Modifier { | |||
let maxRightGlyphWidth = 0; | |||
for (let i = 0; i < annotations.length; ++i) { | |||
const annotation = annotations[i]; | |||
const textFormatter = TextFormatter.create(annotation.textFont); | |||
const measure = Font.measureText(annotation.text, annotation.textFont!); |
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.
perhaps refactor from measure
to measurement
? measure
has a very specific implication in music applications.
fixes #1127
fixes #1459
Personally I see two main benefits:
StaveNote with two noteheads with one accidental each.