We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The library unsupported vertical alignment text
SVG
<?xml version='1.0' encoding='utf-8'?> <svg height='40' width='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'> <rect x="0" y="0" width="40" height="40" fill="white" stroke="black"/> <path d="M 0 20 H 40" stroke="black"/> <path d="M 20 0 V 40" stroke="black"/> <text x='20' y='20' text-anchor='middle' alignment-baseline='middle' dominant-baseline='middle' font-size='14'>Test</text> </svg>
The resulting picture
Picture in browser
The text was updated successfully, but these errors were encountered:
I'm not sure that this is going to be possible. I don't think the current Android APIs provide a way to control the typeface baseline table..
Sorry, something went wrong.
Maybe support only three values: hanging, middle, baseline? And do it in the same way as an text-anchor
hanging
middle
baseline
text-anchor
if (anchor != Style.TextAnchor.Start) { float textWidth = calculateTextWidth(obj); if (anchor == Style.TextAnchor.Middle) { x -= (textWidth / 2); } else { x -= textWidth; // 'End' (right justify) } }
Yes. Some values could be emulated/approximated.
No branches or pull requests
The library unsupported vertical alignment text
SVG
The resulting picture
Picture in browser
The text was updated successfully, but these errors were encountered: