parallax/jsPDF

getTextDimensions return wrong measure when blanck spaces inside text ...

Open

#2,675 opened on Feb 20, 2020

View on GitHub
 (10 comments) (1 reaction) (0 assignees)JavaScript (4,596 forks)batch import
Bugdifficulty:mediumhacktoberfest

Repository metrics

Stars
 (28,280 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Hello,

I have noticed that when Im using getTextDimensions () to know final size of a text, the returnin result is wrong if your text contains "blank spaces".

When you use plain text without "blank spaces" width measure is usualy a little bit higger than real size.

But if you use "blank spaces" then witdh measure is always lower thab reak size.

that make that you miss positioning next text, and they ovelap.

Contributor guide