Skip to content

Ensure that fontSize is always a number - #128

Merged
Fuzzyma merged 1 commit into
svgdotjs:masterfrom
facuparedes:patch-1
Oct 7, 2024
Merged

Ensure that fontSize is always a number#128
Fuzzyma merged 1 commit into
svgdotjs:masterfrom
facuparedes:patch-1

Conversation

@facuparedes

Copy link
Copy Markdown
Contributor

When calculating the bounding box of a text node in nodejs, the result returned is often NaN.
This change ensures that the fontSize is always a number, for example by removing the px suffix.

There is a related pull request created a few years ago: #23

@Fuzzyma
Fuzzyma merged commit bc33152 into svgdotjs:master Oct 7, 2024
@Fuzzyma

Fuzzyma commented Oct 7, 2024

Copy link
Copy Markdown
Member

Lets see if that produces any wrong behavior ^^. Thanks for reminding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants