You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Gabor Kovesdan <ga...@mypc.hu> on 2018/09/05 20:02:21 UTC

Tuning hyphenation

Hello,

I use FOP to render PDF from my Java programming book. I need 
hyphenation because it is a must for high-quality printed books but some 
parts of the text should not be hyphenated, e.g. Java keywords. They are 
rendered with a monospace font set by a <fo:inline> tag. What I would 
like to do is to disable hyphenation for these terms but the problem is 
that fo:inline does not support the hyphenate attribute, it is only 
applicable to fo:block but not fo:inline. I realized that inserting a 
Unicode WORD JOINER character to the critical place often avoids 
hyphenation. I also try to insert specific hyphentation rules that avoid 
the hyphenation of that particular term. If everything fails, I slightly 
rephrase the sentence. However, I'm wondering if there's a better 
solution. I've spent so many hours on investigating this but the final 
result is still not very convenient.

Thank you in advance.

Best,

Gabor


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org