kanagavel2win / svg-android

Automatically exported from code.google.com/p/svg-android
0 stars 0 forks source link

text node isn't processed #20

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
your library lacks support of text nodes and text output
below is the patch enabling that functionality

Original issue reported on code.google.com by volkov.r...@gmail.com on 23 Dec 2011 at 9:08

Attachments:

GoogleCodeExporter commented 8 years ago
How do I use this patch?

Original comment by the.sle...@hotmail.com on 29 Dec 2011 at 5:14

GoogleCodeExporter commented 8 years ago
Here's what I did but it's still not working
I copied the java files from the open source and created a package under src 
folder.
Then I renamed the patch file where #P svgandroid to #P my app name
Apparently I think it has been successfully patched.
but when I ran the app, text nodes still isn't processing.
Any idea?
Thanks

Original comment by the.sle...@hotmail.com on 29 Dec 2011 at 5:42

GoogleCodeExporter commented 8 years ago
Hey, if you are not used to these kind of patches, the fastest and simplest way 
to apply them is to do it yourself. You can open this as text file, then find 
the places mentioned, remove the lines that have minus sign if there are any, 
and add the lines that have plus sign. I won't mention any tools because there 
are so many of them...

Original comment by volkov.r...@gmail.com on 31 Dec 2011 at 10:11

GoogleCodeExporter commented 8 years ago
Hi, sorry. It's my fault. I didn't read through the patch properly. Please 
pardon my ignorance.

The patch offers text rendering for text nodes if it has x="" y="" font-size="" 
values. I was using illustrator to export my SVG hence the text nodes 
attributes do not have all of that, but rather the SVG gives an attribute of 
transform with a matrix as a value. Any idea what I can do to either make the 
SVG text nodes saved with x, y, font-size without tspan or tweak the patch so 
that it can read the matrix?

Thanks.

By the way for others not sure, I'm using eclipse to program. So after i rename 
the line #P in the patch file as described above, I right click the package 
explorer and go to Team > Apply Patch, select the file and go on from there ;)

Original comment by the.sle...@hotmail.com on 31 Dec 2011 at 1:17

GoogleCodeExporter commented 8 years ago
managed to tweak some stuff here and there. finally able to render the SVG.
Now figuring out to use custom fonts.

Original comment by the.sle...@hotmail.com on 31 Dec 2011 at 4:43

GoogleCodeExporter commented 8 years ago
I'm glad my patch helped somebody. 
I'm afraid fonts will be a problem since droid devices don't have the fonts 
windows or apple have, they are limited to three afaik

Original comment by volkov.r...@gmail.com on 31 Dec 2011 at 5:07

GoogleCodeExporter commented 8 years ago
How could I use this patch in the Eclipse to show text on the android?

Original comment by rogers...@gmail.com on 9 Mar 2012 at 12:50

GoogleCodeExporter commented 8 years ago
If someone will merge the patch 'enableText' posted above, please note that it 
works incorrectly on texts with transformations, and uses a hack with '\n' 
symbol for multiline strings - normally contents of the text tag are trimmed 
(all leading and trailing spaces are eliminated, linefeeds ignored), according 
to some public implementations, such as in WebKit engine. For multiline strings 
Inkscope uses tspan tag.

Original comment by mo...@tushino.ru on 28 May 2012 at 10:01