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

Update js/cufon.js #223

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Update js/cufon.js #223

wants to merge 2 commits into from

Conversation

Devolv
Copy link

@Devolv Devolv commented Dec 5, 2011

Update padding top when Device Ratio is greater than 1, padding is also multiplied by PixelRatio to prevent insufficient padding.

@Devolv
Copy link
Author

Devolv commented Dec 5, 2011

This is in relation to previous issue: #222

With Retina devices - padding within the canvas elements are incorrect. Padding unit used within the Canvas element is pixels, and when using the device-pixel-ratio=2 doubles the padding as well, but this creates too much padding on the Retina devices. Text height alignment is off as well, so vertically centering Cufon text on a header consistently would be impossible for both Retina and Non-Retina devices. Characters such as "g", "j" etc are also being clipped off the edge of the canvas element.

@Devolv
Copy link
Author

Devolv commented Dec 5, 2011

My patch seems to work a lot better, but there is still bottom padding that I could not remove.

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.

1 participant