Here is a sample from the test case I am developing attached.

The ..._old.pdf file shows the current fop-trunk behaviour while 
the ..._new.pdf file shows what happens in the FOP UAX#14 version.

There are quite a few subtle differences (mostly for the better I hope).

I also attach the test case file (hasn't got checks yet) if someone 
would like to study the fo or even better would like to add or comment 
or improve.

Manuel

Attachment: block_linebreaking_old.pdf
Description: Adobe PDF document

<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!-- $Id: inline_border_padding_hyphenate_de.xml 426576 2006-07-28 15:44:37Z jeremias $ -->
<testcase>
  <info>
    <p>
      This test checks some of the UAX#14 breaking rules.
    </p>
  </info>
  <fo>
    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"; xmlns:svg="http://www.w3.org/2000/svg";>
      <fo:layout-master-set>
        <fo:simple-page-master master-name="normal" page-width="2.5in" page-height="10in" margin="5pt">
          <fo:region-body/>
        </fo:simple-page-master>
      </fo:layout-master-set>
      <fo:page-sequence master-reference="normal" white-space-collapse="true">
        <fo:flow flow-name="xsl-region-body" font-size="10pt">
          <fo:block background-color="silver" font-size="8pt" margin="3pt 0pt 0pt 0pt">
            BA -- Break Opportunity After (A)
          </fo:block>
          <fo:block background-color="yellow" margin="0pt 0pt 3pt 0pt">
            VeryLongWordWithAThinSpace&#x2009;PutInTheMiddleOfIt
          </fo:block>
          <fo:block background-color="silver" font-size="8pt" margin="3pt 0pt 0pt 0pt">
            BB -- Break Opportunity Before (B)
          </fo:block>
          <fo:block background-color="yellow" margin="0pt 0pt 3pt 0pt">
            VeryLongWordWithAnAcuteAccent&#x00B4;PutInTheMiddleOfIt
          </fo:block>
          <fo:block background-color="silver" font-size="8pt" margin="3pt 0pt 0pt 0pt">
            B2 -- Break Opportunity Before and After (B/A)
          </fo:block>
          <fo:block background-color="yellow" margin="0pt 0pt 3pt 0pt">
            &#x2014;Very&#x2014;Long&#x2014;Word&#x2014;With&#x2014;LotsOf&#x2014;Em&#x2014;Dashes&#x2014;Put&#x2014;InBetween&#x2014;And&#x2014;Around&#x2014;
          </fo:block>
          <fo:block background-color="silver" font-size="8pt" margin="3pt 0pt 0pt 0pt">
            B2 -- Break Opportunity Before and After (B/A) - as before but don't break between consecutive Em Dashes
          </fo:block>
          <fo:block background-color="yellow" margin="0pt 0pt 3pt 0pt">
            AVeryLongWordWithSomeDouble&#x2014; &#x2014;Dashes&#x2014; &#x2014;Put&#x2014; &#x2014;In
          </fo:block>
          <fo:block background-color="yellow" margin="0pt 0pt 3pt 0pt">
            AVeryLongWordWithSomeDouble&#x2014;&#x2014;Dashes&#x2014;&#x2014;Put&#x2014;&#x2014;In
          </fo:block>
          <fo:block background-color="silver" font-size="8pt" margin="3pt 0pt 0pt 0pt">
            CL -- Closing Punctuation (XB)
          </fo:block>
          <fo:block background-color="yellow" margin="0pt 0pt 3pt 0pt">
            Closing )brackets )even )if )preceeded )by )a )space )are )not )a )break )point
          </fo:block>
          <fo:block background-color="silver" font-size="8pt" margin="3pt 0pt 0pt 0pt">
            EX -- Exclamation / interrogation (XB)
          </fo:block>
          <fo:block background-color="yellow" margin="0pt 0pt 3pt 0pt">
            Question ?marks ?and exclamation !marks !even ?if !preceeded ?by !a ?space !are ?not !a ?break !point
          </fo:block>
          <fo:block background-color="silver" font-size="8pt" margin="3pt 0pt 0pt 0pt">
            HY -- Hyphen Minus (XA)
          </fo:block>
          <fo:block background-color="yellow" margin="0pt 0pt 3pt 0pt">
            Very-Long-Word-With-Lots-Of-Hyphens-Put-In-Between
          </fo:block>
          <fo:block background-color="yellow" margin="0pt 0pt 3pt 0pt">
            Hyphens-in-numbers-do-not-123-567-890-break
          </fo:block>
          <fo:block background-color="silver" font-size="8pt" margin="3pt 0pt 0pt 0pt">
            ID -- Ideographic (B/A)
          </fo:block>
          <fo:block background-color="yellow" margin="0pt 0pt 0pt 0pt">
            Need&#x3000;A&#x3000;Proper&#x3000;Test&#x3000;Case&#x3000;For&#x3000;This&#x3000;As&#x3000;Here&#x3000;Only&#x3000;The&#x3000;Ideographic&#x3000;Space&#x3000;Is&#x3000;Used
          </fo:block>
          <fo:block background-color="silver" font-size="8pt" margin="3pt 0pt 0pt 0pt">
            IN -- Inseperable characters (XP)
          </fo:block>
          <fo:block background-color="yellow" margin="0pt 0pt 3pt 0pt">
            There is never a break&#x2026;&#x2026;&#x2026;&#x2026;&#x2026;&#x2026;&#x2026;&#x2026;&#x2026;&#x2026;between characters of this class
          </fo:block>
          <fo:block background-color="silver" font-size="8pt" margin="3pt 0pt 0pt 0pt">
            IS -- Numeric Separator (Infix) (XB)
          </fo:block>
          <fo:block background-color="yellow" margin="0pt 0pt 3pt 0pt">
            Numbers containing separators 123,345,678.00 08:00:23.15 are not broken
          </fo:block>
          <fo:block background-color="silver" font-size="8pt" margin="3pt 0pt 0pt 0pt">
            OP -- Opening Punctuation (XA)
          </fo:block>
          <fo:block background-color="yellow" margin="0pt 0pt 3pt 0pt">
            Opening( brackets( even( if( followed( by( a( space( are( not( a( break( point
          </fo:block>
          <fo:block background-color="silver" font-size="8pt" margin="3pt 0pt 0pt 0pt">
            SY -- Symbols Allowing Break After (A)
          </fo:block>
          <fo:block background-color="yellow" margin="0pt 0pt 3pt 0pt">
            http://a/very/long/url/can/be/broken/after/the/solidus
          </fo:block>
          <fo:block background-color="yellow" margin="0pt 0pt 3pt 0pt">
            No-break-point-in-normal-dates-12/12/2006-or-fractions-12345678/67890112
          </fo:block>
        </fo:flow>
      </fo:page-sequence>
    </fo:root>
  </fo>
  <checks>
  </checks>
</testcase>

Attachment: block_linebreaking_new.pdf
Description: Adobe PDF document

Reply via email to