Skip to content
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

[Measurer] CachedCharacterMeasurer does not work properly #32

Open
rcchen opened this issue Jun 29, 2015 · 5 comments
Open

[Measurer] CachedCharacterMeasurer does not work properly #32

rcchen opened this issue Jun 29, 2015 · 5 comments
Labels

Comments

@rcchen
Copy link

rcchen commented Jun 29, 2015

Given the string “27.2”, we compare the following:

  • Sum of widths of individual characters: 35.233 (FF), 27.297 (Chrome)
  • Width of string as a whole: 29.233 (FF), 27.25 (Chrome)

Should reevaluate whether there is a correct way of caching computations, or if this is something that cannot be done due to how fonts render on a computer.

@jtlan
Copy link
Contributor

jtlan commented Jun 30, 2015

Does this happen only because of the decimal point, or are there other strings that reproduce this bug?

@rcchen
Copy link
Author

rcchen commented Jun 30, 2015

Looks like it's not just the decimal. With the string "272", we get the following:

  • Sum of widths of individual characters: 29.350 (FF), 23.391 (Chrome)
  • Width of string as a whole: 25.350 (FF), 23.359 (Chrome)

@bluong
Copy link
Contributor

bluong commented Jun 30, 2015

Can you try "27" and "273" when you have the time?

@rcchen
Copy link
Author

rcchen commented Jun 30, 2015

Format is as follows

test string: summed vs actual (browser)

"27": 19.566 vs 17.566 (FF), 15.594 vs 15.578 (Chrome)
"273": 29.350 vs 25.350 (FF), 23.391 vs 23.359 (Chrome)

@themadcreator
Copy link
Contributor

perhaps your font is computing a ligature between 2 and 7?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants