0

I'm generating an SVG from a NSString* on iOS. I can't center a text around a (x, y) coordinate. I've tried the following:

text-alignment="middle"  
text-anchor="middle" 
style="text-anchor:middle"
style="text-alignment:middle"

but I couldn't make it work.

Didn't find anything helpful on the webs either.
Thank you!

Arun
  • 3,406
  • 4
  • 30
  • 55
StinkyCat
  • 1,236
  • 1
  • 17
  • 31

1 Answers1

0

Given your tag set, I assume you are using SVGKit (https://github.com/SVGKit) to do your rendering? It appears from searching their source repo, that they do not support the text-anchor property. So more than likely, that will be your problem.

Paul LeBeau
  • 97,474
  • 9
  • 154
  • 181
  • according to the tags and the question's title lol anyway I saw one [example where they used it](https://github.com/SVGKit/SVGKit/blob/master/Demo-Samples/SVG/Text.svg) that's why I got confused.. – StinkyCat Sep 17 '13 at 18:01