-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
various small svg fixes #5424
various small svg fixes #5424
Conversation
fontSize = parentFontSize = parentAttributes.fontSize || fabric.Text.DEFAULT_SVG_FONT_SIZE; | ||
if (ownAttributes['font-size']) { | ||
fontSize = parseUnit(ownAttributes['font-size'], parentFontSize); | ||
} |
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.
@rikkarv the idea here is that
- parseUnit should be used always.
- if the current fontSize is specified in EM ( i think is sort of legit ) we must reference the parent fontsize
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.
ok this is not good needs additional tweaking as per the uploaded test.
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.
I have already tested your changes and
ownAttributes['font-size'] = fontSize = parseUnit(ownAttributes['font-size'], parentFontSize);
is really doing his job. Now i have fontSize as a number instead of a string and the following maths doesn't break.
Thank you very much for your effort
* various small svg fixes * no debugger * fontsize parsing fix - again * added a visual test * use min 9px * added comment
close #5412
close #5414
close #5415
close #5417