I'd like TCPDF to automatically insert line breaks at hyphens (-) if needed, like in the word 15-year-old. It works in the "year-old" part, but "15-year" never breaks, even when necessary. It seems the system won't let lines break if there are numbers on the left side of the hyphen. (Actually, I'm not sure if it's grammatically proper to break lines this way in English, but it is in Finnish and I'd need it for that)
Here, "15-year-old" is not broken at the first hyphen, but "ab-year-old" is. How can I make words with numbers behave the same way as "ab-year-old"? Before you say it, I have tried the hyphenation functions which are excellent for what they do (add soft hyphens). That doesn't help here (it won't add a soft hyphen after a hard one, and if you do it manually, you get two lines if the line breaks such as "12--
year-old").
I also can't replace all "-"-letters with ­-soft hyphens, because then words like 15-year-old become "15yearold" if they don't happen to be at the end of a line.
I'd like TCPDF to automatically insert line breaks at hyphens (-) if needed, like in the word 15-year-old. It works in the "year-old" part, but "15-year" never breaks, even when necessary. It seems the system won't let lines break if there are numbers on the left side of the hyphen. (Actually, I'm not sure if it's grammatically proper to break lines this way in English, but it is in Finnish and I'd need it for that)
Example image
Here, "15-year-old" is not broken at the first hyphen, but "ab-year-old" is. How can I make words with numbers behave the same way as "ab-year-old"? Before you say it, I have tried the hyphenation functions which are excellent for what they do (add soft hyphens). That doesn't help here (it won't add a soft hyphen after a hard one, and if you do it manually, you get two lines if the line breaks such as "12--
year-old").
I also can't replace all "-"-letters with ­-soft hyphens, because then words like 15-year-old become "15yearold" if they don't happen to be at the end of a line.
Thanks in advance!
Example code:
Last edit: Jonne Mikkanen 2014-12-11