Yes you are right!
After your suggestion I used the Liberation fonts found at
https://www.redhat.com/promo/fonts/ (which support non-breaking hyphens)
and now everything works as expected!
Thank you very much for your help!
O/H Manuel Mall έγραψε:
Thank you - yes it does make it more clear.
The # is an indication that the font your are using has no matching glyph
for the non breaking hyphen.
>From your initial post I incorrectly assumed that the problem was incorrect
line breaking behaviour of the non breaking hyphen. Obviously that is not
the case.
For the time being the only solution I can offer is to find a font that
contains a glyph for that code point. FOP is not doing anything wrong as
such. Although an argument could be made that FOP should substitute the
glyph for a normal hyphen when there is no glyph for the non breaking hyphen
in the selected font. However, 'intelligent' glyph substitution is a more
generic problem which I believe FOP has not tried to tackle so far.
Manuel
-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Thursday, 30 April 2009 4:23 PM
To: [email protected]
Subject: Re: RE: Does FOP support non-breaking hyphens?
May be post a fo snippet showing what you give to fop and then describe
your
expected and the actual output.
Thank you for your answer!
I am using FOP 0.95 (latest stable at the time of writing).
I am trying the following fo snippet.
<fo:block>
This is the example with 2011 (as char) non
breaking hyphen:
This‑is‑a‑line‑with‑8209‑characters
</fo:block>
<fo:block>
This is the example with 2011 (as hex) non
breaking hyphen:
This‑is‑a‑line‑with‑8209‑character
s
</fo:block>
<fo:block>
This is the example with 2011 (as number)
non breaking hyphen:
This‑is‑a‑line‑with‑8209‑characters
</fo:block>
<fo:block> This is the example ZZZZZZZZZZZZZZ with
an HTML shy hyphen:
Bigand-long-word-that-should-break-in-a-logical-place-and-not-go-to-the-next
-line </fo:block>
<fo:block> This is the example ZZZZZZZZZ with non
breaking space :
Big and long word that should break in
60;a logical place and not go to the 
;next line </fo:block>
Comments:
- The hyphens in the first block are hex 2011 chars inserted directly into
the FO file from the VIM editor
- The hyphens in second block are entities with number 8209
- The hyphens in the third block are entities with hex 2011
- There are hyphens in 4th block with hex AD inserted directly by VIM
- The non-breaking-space in the 5th block are entities with number 160
I run this snippet with FOP using
fop -fo hyphens.xml hyphens.pdf
Expected output
First Block: This-is-a-line-with-8209-characters sentence appearing with
hyphens but it should not break at any point.
Second block: The same as first
Third block: The same as first
Fourth block: The sentence Bigandlong... with no visible hyphens. Only one
visible hyphen when it breaks
Fifth block: The sentence Big and long... with spaces but no break at all
Actual output
First block:The sentence appearing with "#" characters instead of hyphens
Second block: Same as first
Third block same as first
Fourth block: As expected (so this works OK)
Fifth block: As expeected (so this works OK)
Thus the problem is that I get the "#" (sharp symbol) instead of a
non-breaking-hyphen in the PDF output.
I hope this is more clear.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]