Skip to content

Conversation

@charlietuna
Copy link
Contributor

Switch from using points to pixels because it seems that font size is specified in points while line height is specified in pixels (at least without unit conversions for line height to preserve points behavior).
Also fix extra "normal" string, and update examples.
This may break users expecting points for font sizes.

…ixes line spacing issues where fonts are specified in points but line heights are specified in pixels. Remove extraneous "normal" string from definitions. TODO: Place both declarations somewhere shared, like FontFace or FontUtils or perhaps make measureText have multiple methods (maybe renamed to TextUtils if that's not confusing)
@mjohnston
Copy link

The fact that we've been using pt for font size and px for line height has already been breaking user expectations. Better to make this change sooner than later. Looks good.

mjohnston pushed a commit that referenced this pull request Feb 23, 2015
Fix for canvas font using points instead of pixels
@mjohnston mjohnston merged commit 5541d3b into master Feb 23, 2015
@charlietuna charlietuna deleted the cying-font-pixels-fix branch February 23, 2015 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants