Replies: 3 comments 10 replies
-
The other option would be to omit % as an option entirely and use the textAlign property to achieve the necessary text positioning. I'm starting to prefer this approach actually since it seems to me that having a percentage based startOffset is a poor substitute for proper textAlign support which is lacking in SVG textpaths. Here's a JSFiddle showing text on a path with |
Beta Was this translation helpful? Give feedback.
-
So for sure textAlign left/right/center ( justify ? ) is probably one missing thing that we actually need. We don't have a way to measure a path from right to left, i wonder if with textAlign or at least with RTL we should just flip the path. |
Beta Was this translation helpful? Give feedback.
-
I'm just starting work on adding some additional properties to the textpath implementation beginning with the startOffset property, and am looking for some feedback.
According to the W3 SVG Specs, startOffset should accept either a distance or a percent value. With the current gradient implementation we store the unit (
pixels
|percentage
) in thegradientUnits
property. Should we do something similar forstartOffset
, or should it simply intuit the appropriate unit based on the value being a number or a string containing the % symbol.Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions