xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kostis Kapelonis <kkape...@freemail.gr>
Subject Re: Does FOP support non-breaking hyphens? [SOLVED]
Date Thu, 07 May 2009 21:48:53 GMT
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: kkapelon@freemail.gr [mailto:kkapelon@freemail.gr] 
> Sent: Thursday, 30 April 2009 4:23 PM
> To: fop-users@xmlgraphics.apache.org
> 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&#8209;is&#8209;a&#8209;line&#8209;with&#8209;8209&#8209;characters

> 			</fo:block>
> 			<fo:block>
> 				This is the example with 2011 (as hex) non
> breaking hyphen:
> This&#x2011;is&#x2011;a&#x2011;line&#x2011;with&#x2011;8209&#x2011;character
> s 
> 			</fo:block>
> 			<fo:block>
> 				This is the example with 2011 (as number)
> non breaking hyphen:
> This&#8209;is&#8209;a&#8209;line&#8209;with&#8209;8209&#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&#160;and&#160;long&#160;word&#160;that&#160;should&#160;break&#160;in&#1
> 60;a&#160;logical&#160;place&#160;and&#160;not&#160;go&#160;to&#160;the&#160
> ;next&#160;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: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
>   


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


Mime
View raw message