Svg Text TSpan align different font sizes

#1

Is there a way to align multiple TSpan’s with different font sizes? When my TSpan’s have the same font size, the text lines up fine, but if I make a TSpan with a smaller font size the positioning is weird. It does not line up at the bottom or even the top for that matter, it kind of floats above.

Here is a snack demonstrating the same behavior I’m getting in my app.
https://snack.expo.io/HJ4QyJomM

I noticed in react-native-svg’s commits that they recently did: Implement getAlignmentBaseline and getBaselineShift in ios.

I’m not sure if this is in Expo’s version yet and there’s no documentation for baseline on their GitHub yet, so I am not sure how to use this or if it works.

closed #2

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.