Uploaded image for project: 'FOP'
  1. FOP
  2. FOP-1827

[PATCH] Complex Script Support

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: trunk
    • Fix Version/s: None
    • Component/s: unqualified
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: All
    • External issue ID:
      49687

      Description

      This patch adds support for complex scripts, starting with Arabic. Included in this patch are:

      • support for XSL FO 1.1 Section 5.8 Unicode BIDI Processing
      • generic support for TrueType and OpenType advanced typography tables
      • support for OpenType GSUB table (partial)
      • support for OpenType GPOS table (partial)
      • support for Arabic specific script processing

      This patch should be considered preliminary support for the above features. Not all aspects of these features are implemented or tested. In particular, only three Microsoft Arabic fonts have been (partially) tested:

      • Simplified Arabic (simpo.ttf)
      • Simplified Arabic Bold (simbdo.ttf)
      • Arial Unicode MS (arialuni.ttf)

      Certain important functions needed to adequately support Arabic are not yet in place. In particular, the following either do not work or work only partially:

      • writing-mode relative properties
      • glyph positioning of non-spacing marks
      • arabic fonts that require use of multiple, context, or chained context subtable types

      Notwithstanding the above limitations, basic Arabic content is adequately processed and formatted provided that the above fonts are used without non-spacing marks, and with explicit text-align="right" at the fo:block level (or above). Note also that only simple inline content has been tested thus far in bidi block contexts, namely #PCDATA and fo:inline; support for the remaining inline FOs in a bidi context must await further improvements to this patch.

      Because this patch involves modification or addition of nearly 150 files in the core sources, I recommend that a temporary branch be created in order to permit further maturation, and, in particular, to allow me time to add test suites, enhancements, and bug fixes prior to merging into the main development trunk.

      Both findbugs and checkstyle have been run against the patch with no new warnings or errors; PMD has not been run. Actually some checkstyle warnings in the trunk have been fixed by this patch. Note also the addition of findbugs-exclude.xml and checkstyle-suppressions.xml at the top-level directory, which are used to filter blessed warnings.

      Note further that one existing layout engine test file has been disabled due to dependencies on an incorrect prior implementation of the writing-mode property:

      simple-page-master_writing-mode_rl_region-body_writing-mode-lr.xml

      I will be adding a complete set of tests on the writing-mode property before I propose merging with trunk. Three other tests were modified slightly to account for defaulting of the offset attribute on word and space elements in the XML area tree output.

      This patch takes the form of a diff file produced by using the 'svn diff' command against revision 981406 of the trunk.

      Regards,
      Glenn Adams

        Attachments

        1. fop-complexscripts-patch-2.diff.gz
          747 kB
          Glenn Adams
        2. fop-complexscripts-patch-1.diff.gz
          731 kB
          Glenn Adams
        3. GujaratiWords.txt
          15 kB
          Dilip Shah
        4. fop-i18n.arabic-patch-5.diff.gz
          382 kB
          Glenn Adams
        5. fop-i18n.arabic-patch-4.diff.gz
          362 kB
          Glenn Adams
        6. fop-i18n.arabic-patch-3.diff.gz
          198 kB
          Glenn Adams
        7. fop-i18n.arabic-patch-2.diff.gz
          100 kB
          Glenn Adams
        8. fop-i18n.arabic-patch-1-update-1.diff.gz
          110 kB
          Glenn Adams
        9. test.pdf
          47 kB
          Glenn Adams
        10. fop-i18n.arabic-patch-1.diff.gz
          118 kB
          Glenn Adams
        11. test.pdf
          27 kB
          Glenn Adams
        12. test.fo
          2 kB
          Glenn Adams
        13. fop-i18n.arabic-patch-1.diff.gz
          119 kB
          Glenn Adams

          Activity

            People

            • Assignee:
              fop-dev@xmlgraphics.apache.org fop-dev
              Reporter:
              gadams Glenn Adams
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: