OK, it does look there is a bug, related to handling of default paragraph directionality across delimited text run boundaries. If we reformat your input FO a little to show nesting:
<fo:block font-family="FreeSans"> <fo:block/>[1] RTL insert קום <fo:block/>[2] (parens wrong). <fo:block/>[3] Back to normal because of this RTL insert: בּ . </fo:block> I see you are using <fo:block/> in an unusual fashion, effectively as a paragraph separator. As a consequence, the outer block effectively has 6 child blocks, where the three text runs constitute three anonymous child blocks. It appears that the bidi context of the first of these "[1] ..." is being fed to the second of these "[2] ..." erroneously. I've opened an issue at [1]. [1] https://issues.apache.org/jira/browse/FOP-2290 There is a simple work around for this problem until a fix is effected. Namely, wrap the three texts as separate blocks rather than mapping your input <br/> to <fo:block/>. <fo:block font-family="FreeSans"> <fo:block>[1] RTL insert קום<fo:block> <fo:block>[2] (parens wrong).<fo:block> <fo:block>[3] Back to normal because of this RTL insert: בּ .<fo:block> </fo:block> On Tue, Aug 6, 2013 at 12:34 PM, Raphael Finkel <raph...@cs.uky.edu> wrote: > Thanks, Glenn, for the suggestion. > > Here is the FO file, which I call mini.fo.xml, without any of the XML/XSL > encrustation: > > <?xml version="1.0" encoding="UTF-8"?><fo:root xmlns:fo=" > http://www.w3.org/1999/XSL/Format"><fo:layout-master-set><fo:simple-page-master > master-name="myPage"><fo:region-body/></fo:simple-page-master></fo:layout-master-set><fo:page-sequence > master-reference="myPage"><fo:flow flow-name="xsl-region-body"><fo:block > font-family="FreeSans"><fo:block/>[1] RTL insert קום <fo:block/>[2] (parens > wrong).<fo:block/>[3] Back to normal because of this RTL insert: בּ > .</fo:block></fo:flow></fo:page-sequence></fo:root> > > I convert to PDF using fop-1.1 like this: > > /tmp/fop-1.1/fop -c mini-fo.cfg -fo mini.fo.xml mini.pdf > > The cfg file is just to define a Hebrew-aware font, FreeSans. > > As before, the pdftotext version of the PDF output looks like > > [1] RTL insert קום > ]2[ )parens wrong(. > [3] Back to normal because of this RTL insert: ּ. ב > > showing the bug. > > Raphael > > --------------------------------------------------------------------- > To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org > For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org > >