Originally Posted by FunkeXMix
You are right, I need to embed the code into html. Forced hyphenation is a part of the design as you see in the picture I attached earlier. That will of course make any search fail since the text is divided. My solution for this is to output it as outlines/graphics instead of text and then add a small piece of svg text code positioned in the read area with the same color so it is invisible but searchable. I am hoping this will work with the VoiceOver feature that iBooks requires to work with their eBooks as stated in the iBooks Assets Guide as well.
I think you're making this way too hard. Searching should work as long as the entire text of a single word or phrase falls within the same <text>
element. You can use more than one <tspan>
element within that element to draw each part of the word. If you do it that way, searching should "just work".
In other words, the easiest way to do what you are doing is this:
<!-- Draw each piece of the word/string -->
<!-- Draw the hyphens -->