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

textBaseline Support #11

Closed
wants to merge 7 commits into from
Closed

textBaseline Support #11

wants to merge 7 commits into from

Conversation

KoKuToru
Copy link
Contributor

#9

@KoKuToru KoKuToru closed this Sep 16, 2014
@KoKuToru KoKuToru deleted the dominantbaseline branch September 16, 2014 18:22
//helper function to map canvas-textBaseline to svg-dominantBaseline
function getDominantBaseline(textBaseline) {
//INFO: not supported in all browsers
var mapping = {"alphabetic": "alphabetic", "hanging": "hanging", "top":"text-before-edge", "bottom":"text-after-edge", "middle":"central"};
Copy link
Contributor

Choose a reason for hiding this comment

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

Default text align value in canvas is "alphabetic":

return mapping[textBaseline] || mapping.alphabetic;

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.

None yet

2 participants