--- Comment #1 from Manuel Mall <man...@apache.org> 2010-02-12 06:50:00 UTC ---
(In reply to comment #0)
> However, my company uses a different convention of putting the country before
> the currency symbol (eg. US$150 and A$250). Unfortunately, this allows a line
> break between the country and the currency symbol.
The usual solution for special cases requiring the standard linebreaking to be
overwritten is to add a zero width breaking or non breaking (depending on what
you want to achieve) joiner character to the input stream. Typically as part of
the XSL transformation step if you have one.
> The simplest change would be to make the LineBreakUtils class public, change
> the PAIR_TABLE to non-final and then add a method
> int, byte). This would not break any existing unittests or functionality, but
> would allow me to write something like this when I create my FopFactory:
While it is desirable to make line breaking behaviour more flexible your
approach of exposing setters on static variables making them modifiable at
runtime is non thread safe and also does not allow linebreaking customization
on a per fop invocation basis as obviously these tables are shared across all
A more generic approach possibly using interfaces, factories and configurable
line breaking providers may be more appropriate. However, as pointed out above
this may be an overkill in your case as, depending on your FOP production
pipeline, injecting non breaking word joiner (U+2060) into your currency
amounts could be a simple solution not requiring any FOP code changes.
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.