Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(platform): fix measureText can't recognize decimal font size#1077

Merged
plainheart merged 2 commits into
ecomfe:masterfrom
Unlasting1:fix/platform-fontSize-reg
May 14, 2024
Merged

fix(platform): fix measureText can't recognize decimal font size#1077
plainheart merged 2 commits into
ecomfe:masterfrom
Unlasting1:fix/platform-fontSize-reg

Conversation

@Unlasting1
Copy link
Copy Markdown
Contributor

I am using echarts in a react native environment.
Which uses rem adaptation, so a similar code appears
fontSize: rem(12) => fontSize: 11.5
I found a problem.When fontSzie is set to decimal it causes some rendering exceptions.
After troubleshooting I found out that it is an issue with a regularity in measureText in zrender. This regular expression was causing abnormal behavior when parsing decimals.

@plainheart plainheart changed the title fix: platform-fontSize-reg fix(platforn): fix measureText can't recognize decimal font size May 14, 2024
@plainheart plainheart changed the title fix(platforn): fix measureText can't recognize decimal font size fix(platform): fix measureText can't recognize decimal font size May 14, 2024
Copy link
Copy Markdown
Collaborator

@plainheart plainheart left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution!

@plainheart plainheart merged commit 4783a86 into ecomfe:master May 14, 2024
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