On Mar 6, 2007, at 10:47, lecki wrote:

<snip />
First i have generated metrics file and then i have registered in configuration file. In my metrics file there is no element
<bf us="8203".../>
i have found only <bf gi="8203" ... /> but removing doesn't help.

OK, my bad.
It should be a <bf> element with @us <= 8203 and @ue >= 8203...

The gi attribute has nothing to do with the unicode-codepoint. It refers to the glyph-index. The us and ue attributes are unicode-start and unicode-end, bounding a range of codepoints. (Notice that a font like Verdana has the range 32 to 126 mapped to the same gi.)

The actual glyph-index for a ZWSP would resolve to something like:

@gi + 8203 - @us

which, if I interpret correctly, should give you the index/position of the corresponding <wx> element, a bit further on the file.

<snip />
In my text i have got long words and sometimes they overflow the paper. In faq i have found an advise to insert zero width spaces (U +200B or &#x200B;) to allow FOP to wrap. So how i can allow fop to wrap long words without using zero width spaces.

Right, now I see what you mean.
Indeed, if I'm correct then FOP does not perform forced breaking of words upon overflow (as in wrap-option="wrap"). Currently, with FOP Trunk, the situation is such that if hyphenation is turned off, the content will /never/ be broken in the middle of a word, unless there is an explicit Unicode codepoint that allows breaking (such as ZWSP or SHY)

FOP 0.93 still lacks the Unicode linebreaking algorithm, but I thought ZWSP was functioning correctly and did generate a break- possibility, regardless of whether the font contains a glyph for it...

The only workaround that immediately enters my head is to use hyphenation, and use a ZWSP, not in the words themselves, but to suppress the hyphenation character:

<fo:block hyphenate="true"
          hyphenation-character="&#x200B;">
  YourVeryLongWordWillBeHyphenatedIfItDoesNotFit
...

Mind that you will need hyphenation pattern files in case you want to try this. These are not distributed with FOP, but can be found at OFFO. Read all about configuring hyphenation in FOP here:
http://xmlgraphics.apache.org/fop/0.93/hyphenation.html

HTH!

Cheers,

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to