Text rendering rewrite
The rendering of text is being completely rewritten. Among the improvements:
- Correct handling of nested layout with differing text properties (includes fix for #241 etc)
- Proper text shaping. At least for non-txtPath elements
- Correct handling for RTL text
- Support for
writing-modeand vertical text (see #151) - etc
Not yet confirmed:
- Support multi-value text geometry attributes feature request (#248)
- Support alignment-baseline and dominant-baseline feature request (#247)
- textLength attribute is not used feature request (#216)
- support @font-face (#206)
Hey! Any updates here? First of all, thanks for the work, incredible library, it even supports parsing nested svgs, which even standalone utilities, including android studio, cannot do. I'm writing a multi-platform library for chord images runtime generation and I really need a feature with text aligment (dominant-baseline etc). Is there any plans for this in the near future?
Proper *-baseline support is awkward, because Android doesn't provide access to that sort of font metadata.
I have been trying to keep AndroidSVG as minimal as possible. So I am reluctant to add font file parsing to the code, just to access the font's BASE table. Probably the best solution I could achieve would be to use heuristics to estimate the values, as the CSS spec suggests..
Found a workaround for text vertical centering, maybe it will be useful for someone else, so I'll leave it here. Just add dy=".35em" to text element