You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by sp...@apache.org on 2011/10/18 10:33:40 UTC

svn commit: r1185530 [1/14] - in /xmlgraphics/fop/branches/Temp_ComplexScripts: ./ src/documentation/content/xdocs/trunk/ src/foschema/ src/java/org/apache/fop/apps/ src/java/org/apache/fop/area/ src/java/org/apache/fop/cli/ src/java/org/apache/fop/fo/...

Author: spepping
Date: Tue Oct 18 08:33:32 2011
New Revision: 1185530

URL: http://svn.apache.org/viewvc?rev=1185530&view=rev
Log:
Patch #5 by Glenn Adams; see Bugzilla 49687

Added:
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/util/NumberConverter.java   (with props)
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/complexscripts/arabic/ArabicTestCase.java   (with props)
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/complexscripts/arabic/ArabicTestConstants.java   (with props)
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/complexscripts/arabic/GenerateArabicTestData.java   (with props)
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/complexscripts/gdef/
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/complexscripts/gdef/GDEFTestCase.java   (with props)
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/complexscripts/gpos/
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/complexscripts/gpos/GPOSTestCase.java   (with props)
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/complexscripts/gsub/
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/complexscripts/gsub/GSUBTestCase.java   (with props)
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/layoutengine/LayoutEngineTestUtils.java   (with props)
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/util/NumberConverterTestCase.java   (with props)
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/layoutengine/standard-testcases/page-sequence-force-page-count-odd.xml   (with props)
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/layoutengine/standard-testcases/region-body_column-count_1_writing-mode_rl.xml   (with props)
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/layoutengine/standard-testcases/region-body_column-count_2_writing-mode_rl.xml   (with props)
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/resources/complexscripts/arab/data/
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/resources/complexscripts/arab/data/arab-001-f0.ser   (with props)
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/resources/complexscripts/arab/data/arab-001-f1.ser   (with props)
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/resources/complexscripts/arab/data/arab-001-f2.ser   (with props)
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/resources/complexscripts/arab/data/arab-001-f3.ser   (with props)
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/resources/complexscripts/arab/data/arab-001.txt   (with props)
Removed:
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/complexscripts/arabic/ArabicScriptTestSuite.java
Modified:
    xmlgraphics/fop/branches/Temp_ComplexScripts/build.xml
    xmlgraphics/fop/branches/Temp_ComplexScripts/checkstyle-suppressions.xml
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/documentation/content/xdocs/trunk/configuration.xml
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/foschema/fop-configuration.xsd
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/apps/FOUserAgent.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/apps/FopFactory.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/apps/FopFactoryConfigurator.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Area.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/AreaTreeHandler.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/BodyRegion.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/MainReference.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Page.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/PageViewport.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/RegionViewport.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Span.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Trait.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/cli/CommandLineOptions.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/Constants.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/FOPropertyMapping.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/flow/BasicLink.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/AbstractPageSequence.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/PageNumberGenerator.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/CustomFontCollection.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/FontManager.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/FontResolver.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/FontSetup.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphDefinitionTable.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphPositioningSubtable.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphSubstitutionSubtable.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphTable.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/LazyFont.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/apps/TTFReader.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/truetype/TTFFile.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/truetype/TTFFontLoader.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/truetype/TTFSubSetFile.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/PageBreaker.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/PageProvider.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/pdf/PDFFactory.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/AbstractRenderer.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/DefaultFontResolver.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/PrintRenderer.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/PrintRendererConfigurator.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/bitmap/BitmapRendererConfigurator.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/java2d/ConfiguredFontCollection.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/java2d/Java2DRenderer.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pcl/PCLRendererConfigurator.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/ps/AbstractPSTranscoder.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/ps/NativeTextHandler.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/rtf/RTFHandler.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/xml/XMLRenderer.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/svg/PDFDocumentGraphics2D.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/svg/PDFDocumentGraphics2DConfigurator.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/svg/PDFGraphics2D.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/svg/PDFTranscoder.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/util/CharUtilities.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/src/sandbox/org/apache/fop/render/mif/MIFHandler.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/status.xml
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/AbstractBasicTranscoderTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/AbstractFOPTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/BasicDriverTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/BasicDriverTestSuite.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/BasicPDFTranscoderTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/BasicPSTranscoderTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/BasicTranscoderTestSuite.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/DigestFilterTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/GenericFOPTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/KnuthAlgorithmTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/StandardTestSuite.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/URIResolutionTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/UtilityCodeTestSuite.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/afp/AFPResourceUtilTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/afp/AFPTestSuite.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/afp/fonts/CharactersetEncoderTest.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/afp/modca/AbstractAFPObjectTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/afp/modca/AbstractNamedAFPObjectTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/afp/modca/AbstractTripletStructuredObjectTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/afp/modca/IncludeObjectTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/afp/parser/MODCAParserTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/area/BlockViewportTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/area/RegionViewportTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/area/ViewportTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/area/ViewportTestSuite.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/area/inline/InlineViewportTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/complexscripts/ComplexScriptsTestSuite.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/complexscripts/bidi/BidiAlgorithmTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/complexscripts/bidi/BidiClassTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/complexscripts/bidi/BidiTestSuite.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/complexscripts/fonts/FontsTestSuite.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/complexscripts/scripts/ScriptsTestSuite.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/complexscripts/util/TTXFile.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/complexscripts/util/TTXFileTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/config/BaseConstructiveUserConfigTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/config/BaseDestructiveUserConfigTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/config/BaseUserConfigTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/config/FOURIResolverTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/config/FontAttributesMissingTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/config/FontBaseBadTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/config/FontEmbedUrlBadTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/config/FontEmbedUrlMalformedTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/config/FontMetricsUrlBadTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/config/FontMetricsUrlMalformedTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/config/FontTripletAttributeMissingTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/config/FontsAutoDetectTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/config/FontsDirectoryBadTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/config/FontsDirectoryRecursiveTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/config/FontsSubstitutionTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/config/UserConfigTestSuite.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/datatypes/URISpecificationTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/events/BasicEventTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/events/EventChecker.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/events/EventProcessingTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/fo/flow/table/CollapsedConditionalBorderTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/fo/flow/table/ErrorCheckTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/fo/flow/table/IllegalRowSpanTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/fo/flow/table/RowGroupBuilderTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/fo/flow/table/TableColumnColumnNumberTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/fo/flow/table/TooManyColumnsTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/fonts/DejaVuLGCSerifTest.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/fonts/EncodingModeTest.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/fonts/truetype/GlyfTableTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/fotreetest/FOTreeTestSuite.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/fotreetest/FOTreeTester.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/fotreetest/FOTreeUnitTester.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/image/loader/batik/ImageLoaderTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/image/loader/batik/ImagePreloaderTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/intermediate/AbstractIntermediateTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/intermediate/AreaTreeParserTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/intermediate/AreaTreeXMLFormatTestSuite.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/intermediate/IFMimickingTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/intermediate/IFParserTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/intermediate/IFTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/intermediate/IntermediateFormatTestSuite.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/intermediate/LayoutIFTestSuite.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/layoutengine/LayoutEngineTestSuite.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/layoutengine/LayoutEngineTester.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/layoutengine/ResultCheck.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/pdf/FileIDGeneratorTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/pdf/PDFEncryptionJCETestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/pdf/PDFFactoryTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/pdf/PDFObjectTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/render/AbstractRenderingTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/render/RendererFactoryTest.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/render/afp/AFPTestSuite.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/render/afp/NoOperationTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/render/extensions/prepress/PageBoundariesTest.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/render/extensions/prepress/PageScaleTest.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/render/pdf/BasePDFTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/render/pdf/PDFAConformanceTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/render/pdf/PDFAMetadataTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/render/pdf/PDFCMapTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/render/pdf/PDFEncodingTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/render/pdf/PDFRendererConfiguratorTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/render/pdf/PDFsRGBSettingsTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/render/pdf/RenderPDFTestSuite.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/render/ps/AbstractPostScriptTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/render/ps/ImageHandlingTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/render/ps/PSTestSuite.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/render/ps/ResourceOptimizationTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/render/rtf/Bug39607TestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/render/rtf/RichTextFormatTestSuite.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/text/linebreak/LineBreakStatusTest.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/text/linebreak/LineBreakUtilsTest.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/traits/BorderPropsTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/traits/MinOptMaxTest.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/util/AdvancedMessageFormatTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/util/BitmapImageUtilTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/util/ColorUtilTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/util/ElementListUtilsTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/util/PDFNumberTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/util/XMLResourceBundleTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/util/XMLUtilTestCase.java
    xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/visual/BatchDiffer.java

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/build.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/build.xml?rev=1185530&r1=1185529&r2=1185530&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/build.xml (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/build.xml Tue Oct 18 08:33:32 2011
@@ -257,7 +257,7 @@ list of possible build targets.
     <echo message="${jce.message}"/>
     <available property="jdk14.present" classname="java.lang.CharSequence"/>
     <fail message="${Name} requires at least Java 1.4!" unless="jdk14.present"/>
-    <available property="junit.present" classname="junit.framework.TestCase" classpathref="libs-tools-build-classpath"/>
+    <available property="junit.present" classname="org.junit.Test" classpathref="libs-tools-build-classpath"/>
     <condition property="junit.message" value="JUnit Support PRESENT">
       <equals arg1="${junit.present}" arg2="true"/>
     </condition>
@@ -839,7 +839,7 @@ list of possible build targets.
   </target>
   <target name="junit-complexscripts" depends="junit-compile" description="Runs FOP's JUnit complex scripts tests" if="junit.present">
     <echo message="Running complex scripts tests for fop.jar"/>
-    <junit dir="${basedir}" haltonfailure="${junit.haltonfailure}" fork="${junit.fork}" errorproperty="fop.junit.error" failureproperty="fop.junit.failure" printsummary="${junit.printsummary}">
+    <junit dir="${basedir}" errorproperty="fop.junit.error" failureproperty="fop.junit.failure">
       <sysproperty key="basedir" value="${basedir}"/>
       <sysproperty key="jawa.awt.headless" value="true"/>
       <formatter type="brief" usefile="false" if="junit.formatter.brief.use"/>
@@ -1510,6 +1510,24 @@ NOTE:
       <arg line="-o ${test.dir}/java/org/apache/fop/complexscripts/bidi/BidiTestData.java"/>
     </java>
   </target>
+  <target name="resgen-complexscripts" depends="compile-java">
+    <mkdir dir="${build.dir}/test-classes"/>
+    <javac destdir="${build.dir}/test-classes" includeAntRuntime="true" memoryMaximumSize="1024m">
+      <src path="${test.dir}/java/org/apache/fop/complexscripts/"/>
+      <classpath>
+        <path refid="libs-build-classpath"/>
+        <pathelement location="${build.classes.dir}"/>
+      </classpath>
+    </javac>
+    <java classname="org.apache.fop.complexscripts.arabic.GenerateArabicTestData">
+      <classpath>
+        <path refid="libs-build-classpath"/>
+        <pathelement location="${build.classes.dir}"/>
+        <pathelement location="${build.dir}/test-classes"/>
+      </classpath>
+      <arg line="-c"/>
+    </java>
+  </target>
 <!-- =================================================================== -->
 <!-- Special target for Gump                                             -->
 <!-- =================================================================== -->

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/checkstyle-suppressions.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/checkstyle-suppressions.xml?rev=1185530&r1=1185529&r2=1185530&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/checkstyle-suppressions.xml (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/checkstyle-suppressions.xml Tue Oct 18 08:33:32 2011
@@ -5,5 +5,6 @@
     <suppress files="org/apache/fop/fonts/GlyphPositioningTable.java" checks="FileLengthCheck"/>
     <suppress files="org/apache/fop/fonts/truetype/TTFFile.java" checks="FileLengthCheck"/>
     <suppress files="org/apache/fop/layoutmgr/BidiUtil.java" checks="FileLengthCheck"/>
+    <suppress files="org/apache/fop/util/CharUtilities.java" checks="FileLengthCheck"/>
     <suppress files="org/apache/fop/Version.java" lines="40-50" checks="LineLengthCheck"/>
 </suppressions>

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/documentation/content/xdocs/trunk/configuration.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/documentation/content/xdocs/trunk/configuration.xml?rev=1185530&r1=1185529&r2=1185530&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/documentation/content/xdocs/trunk/configuration.xml (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/documentation/content/xdocs/trunk/configuration.xml Tue Oct 18 08:33:32 2011
@@ -152,6 +152,21 @@
         <td>false</td>
       </tr>
       <tr>
+        <td>complex-scripts</td>
+        <td>attribute disabled (optional)</td>
+        <td>
+          If present and if an attribute 'disabled' is specified with the value 'false', then
+          complex script features are disabled. The same result can be obtained on an FOP
+          per-invocation basis by specifying a '-nocs' command line option when invoking FOP.
+          When complex script features are disabled, all bidirectional processing and complex
+          character to glyph mapping processing is disabled; in addition, the loading of
+          GDEF, GSUB, and GPOS advanced typographic tables is disabled for OpenType and
+          TrueType fonts. Unless disabled by this mechanism or by use of the '-nocs' command
+          line option, complex script features will be enabled by default.
+        </td>
+        <td>n/a</td>
+      </tr>
+      <tr>
         <td>default-page-settings</td>
         <td>n/a</td>
         <td>

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/foschema/fop-configuration.xsd
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/foschema/fop-configuration.xsd?rev=1185530&r1=1185529&r2=1185530&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/foschema/fop-configuration.xsd (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/foschema/fop-configuration.xsd Tue Oct 18 08:33:32 2011
@@ -48,6 +48,11 @@
             <xsd:attribute name="height" type="xsd:string"></xsd:attribute>
           </xsd:complexType>
         </xsd:element>
+        <xsd:element name="complex-scripts" minOccurs="0"
+          <xsd:complexType>
+            <xsd:attribute name="disabled" type="xsd:boolean"/>
+          </xsd:complexType>
+        </xsd:element>
         <xsd:element name="renderers" minOccurs="0">
           <xsd:complexType>
             <xsd:sequence>

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/apps/FOUserAgent.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/apps/FOUserAgent.java?rev=1185530&r1=1185529&r2=1185530&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/apps/FOUserAgent.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/apps/FOUserAgent.java Tue Oct 18 08:33:32 2011
@@ -650,6 +650,24 @@ public class FOUserAgent {
     }
 
     /**
+     * Check whether complex script features are enabled.
+     *
+     * @return true if FOP is to use complex script features
+     */
+    public boolean isComplexScriptFeaturesEnabled() {
+        return factory.isComplexScriptFeaturesEnabled();
+    }
+
+    /**
+     * Control whether complex script features should be enabled
+     *
+     * @param useComplexScriptFeatures true if FOP is to use complex script features
+     */
+    public void setComplexScriptFeaturesEnabled(boolean useComplexScriptFeatures) {
+        factory.setComplexScriptFeaturesEnabled ( useComplexScriptFeatures );
+    }
+
+    /**
      * Activates accessibility (for output formats that support it).
      *
      * @param accessibility <code>true</code> to enable accessibility support

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/apps/FopFactory.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/apps/FopFactory.java?rev=1185530&r1=1185529&r2=1185530&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/apps/FopFactory.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/apps/FopFactory.java Tue Oct 18 08:33:32 2011
@@ -143,6 +143,10 @@ public class FopFactory implements Image
     /** Page width */
     private String pageWidth = FopFactoryConfigurator.DEFAULT_PAGE_WIDTH;
 
+    /** Complex scripts support enabled */
+    private boolean useComplexScriptFeatures
+        = FopFactoryConfigurator.DEFAULT_COMPLEX_SCRIPT_FEATURES;
+
     /** @see #setBreakIndentInheritanceOnReferenceAreaBoundary(boolean) */
     private boolean breakIndentInheritanceOnReferenceAreaBoundary
         = FopFactoryConfigurator.DEFAULT_BREAK_INDENT_INHERITANCE;
@@ -212,6 +216,19 @@ public class FopFactory implements Image
     }
 
     /**
+     * Sets complex script support.
+     * @param value <code>true</code> to enable complex script features,
+     * <code>false</code> otherwise
+     */
+    void setComplexScriptFeaturesEnabled(boolean value) {
+        this.useComplexScriptFeatures = value;
+    }
+
+    boolean isComplexScriptFeaturesEnabled() {
+        return useComplexScriptFeatures;
+    }
+
+    /**
      * Returns a new {@link Fop} instance. FOP will be configured with a default user agent
      * instance.
      * <p>

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/apps/FopFactoryConfigurator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/apps/FopFactoryConfigurator.java?rev=1185530&r1=1185529&r2=1185530&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/apps/FopFactoryConfigurator.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/apps/FopFactoryConfigurator.java Tue Oct 18 08:33:32 2011
@@ -69,6 +69,9 @@ public class FopFactoryConfigurator {
     /** Defines the default target resolution (72dpi) for FOP */
     public static final float DEFAULT_TARGET_RESOLUTION = GraphicsConstants.DEFAULT_DPI; //dpi
 
+    /** Defines the default complex script support  */
+    public static final boolean DEFAULT_COMPLEX_SCRIPT_FEATURES = true;
+
     private static final String PREFER_RENDERER = "prefer-renderer";
 
     /** logger instance */
@@ -269,6 +272,13 @@ public class FopFactoryConfigurator {
             }
         }
 
+        // configure complex script support
+        Configuration csConfig = cfg.getChild("complex-scripts");
+        if (csConfig != null) {
+            this.factory.setComplexScriptFeaturesEnabled
+                (!csConfig.getAttributeAsBoolean ( "disabled", false ));
+        }
+
         // configure font manager
         new FontManagerConfigurator(cfg, baseURI).configure(factory.getFontManager(), strict);
 

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Area.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Area.java?rev=1185530&r1=1185529&r2=1185530&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Area.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Area.java Tue Oct 18 08:33:32 2011
@@ -25,6 +25,7 @@ import java.util.Map;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.fop.traits.BorderProps;
+import org.apache.fop.traits.WritingModeTraitsGetter;
 
 // If the area appears more than once in the output
 // or if the area has external data it is cached
@@ -467,6 +468,14 @@ public class Area extends AreaTreeObject
     }
 
     /**
+     * Sets the writing mode traits for this area. Default implementation
+     * does nothing.
+     * @param wmtg a WM traits getter
+     */
+    public void setWritingModeTraits(WritingModeTraitsGetter wmtg) {
+    }
+
+    /**
      * {@inheritDoc}
      * @return ipd and bpd of area
      */

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/AreaTreeHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/AreaTreeHandler.java?rev=1185530&r1=1185529&r2=1185530&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/AreaTreeHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/AreaTreeHandler.java Tue Oct 18 08:33:32 2011
@@ -72,6 +72,9 @@ public class AreaTreeHandler extends FOE
     /** The AreaTreeModel in use */
     protected AreaTreeModel model;
 
+    // Flag for controlling complex script features (default: true).
+    private boolean useComplexScriptFeatures = true;
+
     // Keeps track of all meaningful id references
     private IDTracker idTracker;
 
@@ -107,6 +110,8 @@ public class AreaTreeHandler extends FOE
 
         this.idTracker = new IDTracker();
 
+        this.useComplexScriptFeatures = userAgent.isComplexScriptFeaturesEnabled();
+
         if (log.isDebugEnabled()) {
             statistics = new Statistics();
         }
@@ -168,6 +173,15 @@ public class AreaTreeHandler extends FOE
     }
 
     /**
+     * Check whether complex script features are enabled.
+     *
+     * @return true if using complex script features
+     */
+    public boolean isComplexScriptFeaturesEnabled() {
+        return useComplexScriptFeatures;
+    }
+
+    /**
      * Prepare AreaTreeHandler for document processing This is called from
      * FOTreeBuilder.startDocument()
      *

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/BodyRegion.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/BodyRegion.java?rev=1185530&r1=1185529&r2=1185530&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/BodyRegion.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/BodyRegion.java Tue Oct 18 08:33:32 2011
@@ -22,6 +22,7 @@ package org.apache.fop.area;
 import java.util.List;
 
 import org.apache.fop.fo.pagination.RegionBody;
+import org.apache.fop.traits.WritingModeTraitsGetter;
 
 /**
  * This class is a container for the areas that may be generated by
@@ -140,6 +141,17 @@ public class BodyRegion extends RegionRe
     }
 
     /**
+     * Sets the writing mode traits for the main reference area of
+     * this body region area.
+     * @param wmtg a WM traits getter
+     */
+    public void setWritingModeTraits(WritingModeTraitsGetter wmtg) {
+        if ( getMainReference() != null ) {
+            getMainReference().setWritingModeTraits ( wmtg );
+        }
+    }
+
+    /**
      * Clone this object.
      *
      * @return a shallow copy of this object

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/MainReference.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/MainReference.java?rev=1185530&r1=1185529&r2=1185530&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/MainReference.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/MainReference.java Tue Oct 18 08:33:32 2011
@@ -19,6 +19,8 @@
 
 package org.apache.fop.area;
 
+import org.apache.fop.traits.WritingModeTraitsGetter;
+
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
@@ -124,5 +126,16 @@ public class MainReference extends Area 
         return parent.getColumnGap();
     }
 
+    /**
+     * Sets the writing mode traits for the spans of this main
+     * reference area.
+     * @param wmtg a WM traits getter
+     */
+    public void setWritingModeTraits(WritingModeTraitsGetter wmtg) {
+        for ( Span s : (List<Span>) getSpans() ) {
+            s.setWritingModeTraits ( wmtg );
+        }
+    }
+
 }
 

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Page.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Page.java?rev=1185530&r1=1185529&r2=1185530&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Page.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Page.java Tue Oct 18 08:33:32 2011
@@ -33,6 +33,7 @@ import org.apache.fop.fo.pagination.Regi
 import org.apache.fop.fo.pagination.SimplePageMaster;
 import org.apache.fop.fo.properties.CommonMarginBlock;
 import org.apache.fop.layoutmgr.TraitSetter;
+import org.apache.fop.traits.WritingModeTraitsGetter;
 
 import static org.apache.fop.fo.Constants.FO_REGION_AFTER;
 import static org.apache.fop.fo.Constants.FO_REGION_BEFORE;
@@ -304,6 +305,29 @@ public class Page extends AreaTreeObject
         return unresolved;
     }
 
+    /**
+     * Sets the writing mode traits for the region viewports of
+     * this page.
+     * @param wmtg a WM traits getter
+     */
+    public void setWritingModeTraits(WritingModeTraitsGetter wmtg) {
+        if (regionBefore != null) {
+            regionBefore.setWritingModeTraits(wmtg);
+        }
+        if (regionStart != null) {
+            regionStart.setWritingModeTraits(wmtg);
+        }
+        if (regionBody != null) {
+            regionBody.setWritingModeTraits(wmtg);
+        }
+        if (regionEnd != null) {
+            regionEnd.setWritingModeTraits(wmtg);
+        }
+        if (regionAfter != null) {
+            regionAfter.setWritingModeTraits(wmtg);
+        }
+    }
+
 }
 
 

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/PageViewport.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/PageViewport.java?rev=1185530&r1=1185529&r2=1185530&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/PageViewport.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/PageViewport.java Tue Oct 18 08:33:32 2011
@@ -34,6 +34,7 @@ import org.apache.commons.logging.LogFac
 
 import org.apache.fop.fo.flow.Marker;
 import org.apache.fop.fo.pagination.SimplePageMaster;
+import org.apache.fop.traits.WritingModeTraitsGetter;
 
 import static org.apache.fop.fo.Constants.FO_REGION_BODY;
 import static org.apache.fop.fo.Constants.EN_FSWP;
@@ -654,4 +655,15 @@ public class PageViewport extends AreaTr
     public RegionReference getRegionReference(int id) {
         return getPage().getRegionViewport(id).getRegionReference();
     }
+
+    /**
+     * Sets the writing mode traits for the page associated with this viewport.
+     * @param wmtg a WM traits getter
+     */
+    public void setWritingModeTraits(WritingModeTraitsGetter wmtg) {
+        if ( page != null ) {
+            page.setWritingModeTraits(wmtg);
+        }
+    }
+
 }

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/RegionViewport.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/RegionViewport.java?rev=1185530&r1=1185529&r2=1185530&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/RegionViewport.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/RegionViewport.java Tue Oct 18 08:33:32 2011
@@ -19,6 +19,8 @@
 
 package org.apache.fop.area;
 
+import org.apache.fop.traits.WritingModeTraitsGetter;
+
 import java.awt.Rectangle;
 import java.awt.geom.Rectangle2D;
 import java.io.IOException;
@@ -136,5 +138,17 @@ public class RegionViewport extends Area
         }
         return rv;
     }
+
+    /**
+     * Sets the writing mode traits for the region reference of
+     * this region viewport
+     * @param wmtg a WM traits getter
+     */
+    public void setWritingModeTraits(WritingModeTraitsGetter wmtg) {
+        if (regionReference != null) {
+            regionReference.setWritingModeTraits(wmtg);
+        }
+    }
+
 }
 

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Span.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Span.java?rev=1185530&r1=1185529&r2=1185530&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Span.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Span.java Tue Oct 18 08:33:32 2011
@@ -19,6 +19,9 @@
 
 package org.apache.fop.area;
 
+import org.apache.fop.fo.Constants;
+import org.apache.fop.traits.WritingModeTraitsGetter;
+
 import java.util.List;
 
 /**
@@ -183,6 +186,22 @@ public class Span extends Area {
         return (areaCount == 0);
     }
 
+    /**
+     * Sets the writing mode traits for the main reference area of
+     * this span area.
+     * @param wmtg a WM traits getter
+     */
+    public void setWritingModeTraits(WritingModeTraitsGetter wmtg) {
+        switch ( wmtg.getColumnProgressionDirection().getEnumValue() ) {
+        case Constants.EN_RL:
+            setBidiLevel(1);
+            break;
+        default:
+            resetBidiLevel();
+            break;
+        }
+    }
+
     /** {@inheritDoc} */
     @Override
     public String toString() {

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Trait.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Trait.java?rev=1185530&r1=1185529&r2=1185530&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Trait.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Trait.java Tue Oct 18 08:33:32 2011
@@ -164,11 +164,13 @@ public final class Trait implements Seri
     public static final Integer INLINE_PROGRESSION_DIRECTION = 39;
     /** block progression direction trait */
     public static final Integer BLOCK_PROGRESSION_DIRECTION = 40;
+    /** column progression direction trait */
+    public static final Integer COLUMN_PROGRESSION_DIRECTION = 41;
     /** shift direction trait */
-    public static final Integer SHIFT_DIRECTION = 41;
+    public static final Integer SHIFT_DIRECTION = 42;
 
     /** Maximum value used by trait keys */
-    public static final int MAX_TRAIT_KEY = 41;
+    public static final int MAX_TRAIT_KEY = 42;
 
     private static final TraitInfo[] TRAIT_INFO = new TraitInfo[MAX_TRAIT_KEY + 1];
 

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/cli/CommandLineOptions.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/cli/CommandLineOptions.java?rev=1185530&r1=1185529&r2=1185530&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/cli/CommandLineOptions.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/cli/CommandLineOptions.java Tue Oct 18 08:33:32 2011
@@ -118,6 +118,8 @@ public class CommandLineOptions {
     private int targetResolution = 0;
     /* control memory-conservation policy */
     private boolean conserveMemoryPolicy = false;
+    /* true if a complex script features are enabled */
+    private boolean useComplexScriptFeatures = true;
 
     private FopFactory factory = FopFactory.newInstance();
     private FOUserAgent foUserAgent;
@@ -181,6 +183,9 @@ public class CommandLineOptions {
                 addXSLTParameter("fop-output-format", getOutputFormat());
                 addXSLTParameter("fop-version", Version.getVersion());
                 foUserAgent.setConserveMemoryPolicy(conserveMemoryPolicy);
+                if (!useComplexScriptFeatures) {
+                    foUserAgent.setComplexScriptFeaturesEnabled(false);
+                }
             } else {
                 return false;
             }
@@ -381,6 +386,8 @@ public class CommandLineOptions {
                 getPDFEncryptionParams().setAllowEditContent(false);
             } else if (args[i].equals("-noannotations")) {
                 getPDFEncryptionParams().setAllowEditAnnotations(false);
+            } else if (args[i].equals("-nocs")) {
+                useComplexScriptFeatures = false;
             } else if (args[i].equals("-nofillinforms")) {
                 getPDFEncryptionParams().setAllowFillInForms(false);
             } else if (args[i].equals("-noaccesscontent")) {
@@ -1178,6 +1185,7 @@ public class CommandLineOptions {
             + "  -q                quiet mode  \n"
             + "  -c cfg.xml        use additional configuration file cfg.xml\n"
             + "  -l lang           the language to use for user information \n"
+            + "  -nocs             disable complex script features\n"
             + "  -r                relaxed/less strict validation (where available)\n"
             + "  -dpi xxx          target resolution in dots per inch (dpi) where xxx is a number\n"
             + "  -s                for area tree XML, down to block areas only\n"

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/Constants.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/Constants.java?rev=1185530&r1=1185529&r2=1185530&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/Constants.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/Constants.java Tue Oct 18 08:33:32 2011
@@ -781,8 +781,15 @@ public interface Constants {
     /** Property constant - FOP proprietary prototype (in XSL-FO 2.0 Requirements) */
     int PR_X_XML_BASE = 276;
 
+    /**
+     * Property constant - FOP proprietary extension (see NumberConverter) used
+     * to perform additional control over number conversion when generating page
+     * numbers.
+     */
+    int PR_X_NUMBER_CONVERSION_FEATURES = 277;
+
     /** Number of property constants defined */
-    int PROPERTY_COUNT = 276;
+    int PROPERTY_COUNT = 277;
 
     // compound property constants
 

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/FOPropertyMapping.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/FOPropertyMapping.java?rev=1185530&r1=1185529&r2=1185530&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/FOPropertyMapping.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/FOPropertyMapping.java Tue Oct 18 08:33:32 2011
@@ -2222,6 +2222,12 @@ public final class FOPropertyMapping imp
         m.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
         m.setDefault("auto");
         addPropertyMaker("letter-value", m);
+
+        // fox:alt-text, used for accessibility
+        m = new StringProperty.Maker(PR_X_NUMBER_CONVERSION_FEATURES);
+        m.setInherited(false);
+        m.setDefault("");
+        addPropertyMaker("fox:number-conversion-features", m);
     }
 
     private void createPaginationAndLayoutProperties() {

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/flow/BasicLink.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/flow/BasicLink.java?rev=1185530&r1=1185529&r2=1185530&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/flow/BasicLink.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/flow/BasicLink.java Tue Oct 18 08:33:32 2011
@@ -22,9 +22,11 @@ package org.apache.fop.fo.flow;
 import org.xml.sax.Locator;
 
 import org.apache.fop.apps.FOPException;
+import org.apache.fop.datatypes.Length;
 import org.apache.fop.fo.FONode;
 import org.apache.fop.fo.PropertyList;
 import org.apache.fop.fo.ValidationException;
+import org.apache.fop.fo.properties.StructurePointerPropertySet;
 
 /**
  * Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_basic-link">
@@ -34,9 +36,14 @@ import org.apache.fop.fo.ValidationExcep
  * and whether that link is external (uses a URI) or internal (an id
  * reference).
  */
-public class BasicLink extends Inline {
+public class BasicLink extends InlineLevel implements StructurePointerPropertySet {
 
     // The value of properties relevant for fo:basic-link.
+    private Length alignmentAdjust;
+    private int alignmentBaseline;
+    private Length baselineShift;
+    private int dominantBaseline;
+    private String ptr;
     // private ToBeImplementedProperty destinationPlacementOffset;
     private String externalDestination;
     // private ToBeImplementedProperty indicateDestination;
@@ -65,6 +72,11 @@ public class BasicLink extends Inline {
     /** {@inheritDoc} */
     public void bind(PropertyList pList) throws FOPException {
         super.bind(pList);
+        alignmentAdjust = pList.get(PR_ALIGNMENT_ADJUST).getLength();
+        alignmentBaseline = pList.get(PR_ALIGNMENT_BASELINE).getEnum();
+        baselineShift = pList.get(PR_BASELINE_SHIFT).getLength();
+        dominantBaseline = pList.get(PR_DOMINANT_BASELINE).getEnum();
+        ptr = pList.get(PR_X_PTR).getString(); // used for accessibility
         // destinationPlacementOffset = pList.get(PR_DESTINATION_PLACEMENT_OFFSET);
         externalDestination = pList.get(PR_EXTERNAL_DESTINATION).getString();
         // indicateDestination = pList.get(PR_INDICATE_DESTINATION);
@@ -111,6 +123,31 @@ public class BasicLink extends Inline {
         }
     }
 
+    /** @return the "alignment-adjust" property */
+    public Length getAlignmentAdjust() {
+        return alignmentAdjust;
+    }
+
+    /** @return the "alignment-baseline" property */
+    public int getAlignmentBaseline() {
+        return alignmentBaseline;
+    }
+
+    /** @return the "baseline-shift" property */
+    public Length getBaselineShift() {
+        return baselineShift;
+    }
+
+    /** @return the "dominant-baseline" property */
+    public int getDominantBaseline() {
+        return dominantBaseline;
+    }
+
+    /** {@inheritDoc} */
+    public String getPtr() {
+        return ptr;
+    }
+
     /**
      * Get the value of the <code>internal-destination</code> property.
      *

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/AbstractPageSequence.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/AbstractPageSequence.java?rev=1185530&r1=1185529&r2=1185530&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/AbstractPageSequence.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/AbstractPageSequence.java Tue Oct 18 08:33:32 2011
@@ -43,6 +43,9 @@ public abstract class AbstractPageSequen
     private char groupingSeparator;
     private int groupingSize;
     private Numeric referenceOrientation; //XSL 1.1
+    private String language;
+    private String country;
+    private String numberConversionFeatures;
     // End of property values
 
     private PageNumberGenerator pageNumberGenerator;
@@ -70,12 +73,16 @@ public abstract class AbstractPageSequen
         groupingSeparator = pList.get(PR_GROUPING_SEPARATOR).getCharacter();
         groupingSize = pList.get(PR_GROUPING_SIZE).getNumber().intValue();
         referenceOrientation = pList.get(PR_REFERENCE_ORIENTATION).getNumeric();
+        language = pList.get(PR_LANGUAGE).getString();
+        country = pList.get(PR_COUNTRY).getString();
+        numberConversionFeatures = pList.get(PR_X_NUMBER_CONVERSION_FEATURES).getString();
     }
 
     /** {@inheritDoc} */
     protected void startOfNode() throws FOPException {
         this.pageNumberGenerator = new PageNumberGenerator(
-                format, groupingSeparator, groupingSize, letterValue);
+                format, groupingSeparator, groupingSize, letterValue,
+                numberConversionFeatures, language, country);
 
     }
 

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/PageNumberGenerator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/PageNumberGenerator.java?rev=1185530&r1=1185529&r2=1185530&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/PageNumberGenerator.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/PageNumberGenerator.java Tue Oct 18 08:33:32 2011
@@ -19,84 +19,37 @@
 
 package org.apache.fop.fo.pagination;
 
+import org.apache.fop.util.NumberConverter;
+
+// CSOFF: LineLengthCheck
+
 /**
  * This class uses the 'format', 'groupingSeparator', 'groupingSize',
  * and 'letterValue' properties on fo:page-sequence to return a String
  * corresponding to the supplied integer page number.
+ *
+ * In addition, (now) uses 'language' parameter and new 'fox:page-number-features'
+ * parameter to express applicable language and number conversion features.
+ *
+ * @author Glenn Adams (rewrite to use new NumberConverter utility)
+ * @see NumberConverter
  */
 public class PageNumberGenerator {
 
-    private String format;
-    private char groupingSeparator;
-    private int groupingSize;
-    private int letterValue;
-
-    // constants
-    private static final int DECIMAL = 1;       // '0*1'
-    private static final int LOWERALPHA = 2;    // 'a'
-    private static final int UPPERALPHA = 3;    // 'A'
-    private static final int LOWERROMAN = 4;    // 'i'
-    private static final int UPPERROMAN = 5;    // 'I'
-
-    // flags
-    private int formatType = DECIMAL;
-    private int minPadding = 0;    // for decimal formats
-
-    // preloaded strings of zeros
-    private String[] zeros = {
-        "", "0", "00", "000", "0000", "00000"
-    };
+    private NumberConverter converter;
 
     /**
-     * Main constructor. For further information on the parameters see the XSLT
-     * specs (Number to String Conversion Attributes).
-     * @param format format for the page number
-     * @param groupingSeparator grouping separator
-     * @param groupingSize grouping size
+     * Main constructor. For further information on the parameters see {@link NumberConverter}.
+     * @param format format for the page number (may be null or empty, which is treated as null)
+     * @param groupingSeparator grouping separator (if zero, then no grouping separator applies)
+     * @param groupingSize grouping size (if zero or negative, then no grouping size applies)
      * @param letterValue letter value
+     * @param features features (feature sub-parameters)
+     * @param language (may be null or empty, which is treated as null)
+     * @param country (may be null or empty, which is treated as null)
      */
-    public PageNumberGenerator(String format, char groupingSeparator,
-                               int groupingSize, int letterValue) {
-        this.format = format;
-        this.groupingSeparator = groupingSeparator;
-        this.groupingSize = groupingSize;
-        this.letterValue = letterValue;
-
-        // the only accepted format strings are currently '0*1' 'a', 'A', 'i'
-        // and 'I'
-        int fmtLen = format.length();
-        if (fmtLen == 1) {
-            if (format.equals("1")) {
-                formatType = DECIMAL;
-                minPadding = 0;
-            } else if (format.equals("a")) {
-                formatType = LOWERALPHA;
-            } else if (format.equals("A")) {
-                formatType = UPPERALPHA;
-            } else if (format.equals("i")) {
-                formatType = LOWERROMAN;
-            } else if (format.equals("I")) {
-                formatType = UPPERROMAN;
-            } else {
-                // token not handled
-                //getLogger().debug("'format' token not recognized; using '1'");
-                formatType = DECIMAL;
-                minPadding = 0;
-            }
-        } else {
-            // only accepted token is '0+1'at this stage. Because of the
-            // wonderful regular expression support in Java, we will resort to a
-            // loop
-            for (int i = 0; i < fmtLen - 1; i++) {
-                if (format.charAt(i) != '0') {
-                    //getLogger().debug("'format' token not recognized; using '1'");
-                    formatType = DECIMAL;
-                    minPadding = 0;
-                } else {
-                    minPadding = fmtLen - 1;
-                }
-            }
-        }
+    public PageNumberGenerator ( String format, int groupingSeparator, int groupingSize, int letterValue, String features, String language, String country ) {
+        this.converter = new NumberConverter ( format, groupingSeparator, groupingSize, letterValue, features, language, country );
     }
 
     /**
@@ -104,70 +57,9 @@ public class PageNumberGenerator {
      * @param number page number to format
      * @return the formatted page number as a String
      */
-    public String makeFormattedPageNumber(int number) {
-        String pn = null;
-        if (formatType == DECIMAL) {
-            pn = Integer.toString(number);
-            if (minPadding >= pn.length()) {
-                int nz = minPadding - pn.length() + 1;
-                pn = zeros[nz] + pn;
-            }
-        } else if ((formatType == LOWERROMAN) || (formatType == UPPERROMAN)) {
-            pn = makeRoman(number);
-            if (formatType == UPPERROMAN) {
-                pn = pn.toUpperCase();
-            }
-        } else {
-            // alphabetic
-            pn = makeAlpha(number);
-            if (formatType == UPPERALPHA) {
-                pn = pn.toUpperCase();
-            }
-        }
-        return pn;
+    public String makeFormattedPageNumber ( int number ) {
+        return converter.convert ( number );
     }
 
-    private String makeRoman(int num) {
-        int[] arabic = {
-            1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1
-        };
-        String[] roman = {
-            "m", "cm", "d", "cd", "c", "xc", "l", "xl", "x", "ix", "v", "iv",
-            "i"
-        };
-
-        int i = 0;
-        StringBuffer romanNumber = new StringBuffer();
-
-        while (num > 0) {
-            while (num >= arabic[i]) {
-                num = num - arabic[i];
-                romanNumber.append(roman[i]);
-            }
-            i = i + 1;
-        }
-        return romanNumber.toString();
-    }
-
-    private String makeAlpha(int num) {
-        String letters = "abcdefghijklmnopqrstuvwxyz";
-        StringBuffer alphaNumber = new StringBuffer();
-
-        int base = 26;
-        int rem = 0;
-
-        num--;
-        if (num < base) {
-            alphaNumber.append(letters.charAt(num));
-        } else {
-            while (num >= base) {
-                rem = num % base;
-                alphaNumber.append(letters.charAt(rem));
-                num = num / base;
-            }
-            alphaNumber.append(letters.charAt(num - 1));
-        }
-        return alphaNumber.reverse().toString();
-    }
 }
 

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/CustomFontCollection.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/CustomFontCollection.java?rev=1185530&r1=1185529&r2=1185530&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/CustomFontCollection.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/CustomFontCollection.java Tue Oct 18 08:33:32 2011
@@ -33,13 +33,14 @@ public class CustomFontCollection implem
      * Main constructor.
      * @param fontResolver a font resolver
      * @param customFonts the list of custom fonts
+     * @param useComplexScriptFeatures true if complex script features enabled
      */
     public CustomFontCollection(FontResolver fontResolver,
-            List<EmbedFontInfo> customFonts) {
+           List<EmbedFontInfo> customFonts, boolean useComplexScriptFeatures) {
         this.fontResolver = fontResolver;
         if (this.fontResolver == null) {
             //Ensure that we have minimal font resolution capabilities
-            this.fontResolver = FontManager.createMinimalFontResolver();
+            this.fontResolver = FontManager.createMinimalFontResolver(useComplexScriptFeatures);
         }
         this.embedFontInfoList = customFonts;
     }

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/FontManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/FontManager.java?rev=1185530&r1=1185529&r2=1185530&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/FontManager.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/FontManager.java Tue Oct 18 08:33:32 2011
@@ -224,16 +224,32 @@ public class FontManager {
         getFontSubstitutions().adjustFontInfo(fontInfo);
     }
 
-    /** @return a new FontResolver to be used by the font subsystem */
-    public static FontResolver createMinimalFontResolver() {
-        return new FontResolver() {
-
-            /** {@inheritDoc} */
-            public Source resolve(String href) {
-                //Minimal functionality here
-                return new StreamSource(href);
-            }
-        };
+    /**
+     * Minimum implemenation of FontResolver.
+     */
+    public static class MinimalFontResolver implements FontResolver {
+        private boolean useComplexScriptFeatures;
+        MinimalFontResolver(boolean useComplexScriptFeatures) {
+            this.useComplexScriptFeatures = useComplexScriptFeatures;
+        }
+        /** {@inheritDoc} */
+        public Source resolve(String href) {
+            //Minimal functionality here
+            return new StreamSource(href);
+        }
+        /** {@inheritDoc} */
+        public boolean isComplexScriptFeaturesEnabled() {
+            return useComplexScriptFeatures;
+        }
+    }
+
+    /**
+     * Create minimal font resolver.
+     * @param useComplexScriptFeatures true if complex script features enabled
+     * @return a new FontResolver to be used by the font subsystem
+     */
+    public static FontResolver createMinimalFontResolver(boolean useComplexScriptFeatures) {
+        return new MinimalFontResolver ( useComplexScriptFeatures );
     }
 
     /**

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/FontResolver.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/FontResolver.java?rev=1185530&r1=1185529&r2=1185530&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/FontResolver.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/FontResolver.java Tue Oct 18 08:33:32 2011
@@ -36,4 +36,10 @@ public interface FontResolver {
      */
     Source resolve(String href);
 
+    /**
+     * Check whether complex script features are enabled.
+     * @return true if FOP is to use complex script features
+     */
+    boolean isComplexScriptFeaturesEnabled();
+
 }

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/FontSetup.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/FontSetup.java?rev=1185530&r1=1185529&r2=1185530&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/FontSetup.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/FontSetup.java Tue Oct 18 08:33:32 2011
@@ -57,9 +57,10 @@ public final class FontSetup {
     /**
      * Sets up a font info
      * @param fontInfo font info
+     * @param base14Kerning true if base14 kerning applies
      */
-    public static void setup(FontInfo fontInfo) {
-        setup(fontInfo, null, null);
+    public static void setup(FontInfo fontInfo, boolean base14Kerning) {
+        setup(fontInfo, null, null, base14Kerning);
     }
 
     /**
@@ -71,10 +72,10 @@ public final class FontSetup {
      * @param fontInfo the font info object to set up
      * @param embedFontInfoList a list of EmbedFontInfo objects
      * @param resolver the font resolver
+     * @param base14Kerning true if base14 kerning applies
      */
     public static void setup(FontInfo fontInfo, List<EmbedFontInfo> embedFontInfoList,
-            FontResolver resolver) {
-        final boolean base14Kerning = false;
+                             FontResolver resolver, boolean base14Kerning) {
         fontInfo.addMetrics("F1", new Helvetica(base14Kerning));
         fontInfo.addMetrics("F2", new HelveticaOblique(base14Kerning));
         fontInfo.addMetrics("F3", new HelveticaBold(base14Kerning));
@@ -180,7 +181,7 @@ public final class FontSetup {
         final int startNum = 15;
 
         /* Add configured fonts */
-        addConfiguredFonts(fontInfo, embedFontInfoList, startNum, resolver);
+        addConfiguredFonts(fontInfo, embedFontInfoList, startNum, resolver, base14Kerning);
     }
 
     /**
@@ -191,14 +192,17 @@ public final class FontSetup {
      * @param resolver the font resolver
      */
     private static void addConfiguredFonts(FontInfo fontInfo,
-            List<EmbedFontInfo> embedFontInfoList, int num, FontResolver resolver) {
+            List<EmbedFontInfo> embedFontInfoList, int num, FontResolver resolver,
+            boolean base14Kerning) {
         if (embedFontInfoList == null) {
             return; //No fonts to process
         }
 
         if (resolver == null) {
             //Ensure that we have minimal font resolution capabilities
-            resolver = createMinimalFontResolver();
+            //None of the built-in base14 fonts have advanced typographic data
+            boolean useAdvanced = false;
+            resolver = createMinimalFontResolver(useAdvanced);
         }
 
         String internalName = null;
@@ -218,15 +222,31 @@ public final class FontSetup {
         }
     }
 
-    /** @return a new FontResolver to be used by the font subsystem */
-    public static FontResolver createMinimalFontResolver() {
-        return new FontResolver() {
-
-            /** {@inheritDoc} */
-            public Source resolve(String href) {
-                //Minimal functionality here
-                return new StreamSource(href);
-            }
-        };
+    /**
+     * Minimum implemenation of FontResolver.
+     */
+    public static class MinimalFontResolver implements FontResolver {
+        private boolean useComplexScriptFeatures;
+        MinimalFontResolver(boolean useComplexScriptFeatures) {
+            this.useComplexScriptFeatures = useComplexScriptFeatures;
+        }
+        /** {@inheritDoc} */
+        public Source resolve(String href) {
+            //Minimal functionality here
+            return new StreamSource(href);
+        }
+        /** {@inheritDoc} */
+        public boolean isComplexScriptFeaturesEnabled() {
+            return useComplexScriptFeatures;
+        }
+    }
+
+    /**
+     * Create minimal font resolver.
+     * @param useComplexScriptFeatures true if complex script features enabled
+     * @return a new FontResolver to be used by the font subsystem
+     */
+    public static FontResolver createMinimalFontResolver(boolean useComplexScriptFeatures) {
+        return new MinimalFontResolver ( useComplexScriptFeatures );
     }
 }

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphDefinitionTable.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphDefinitionTable.java?rev=1185530&r1=1185529&r2=1185530&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphDefinitionTable.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphDefinitionTable.java Tue Oct 18 08:33:32 2011
@@ -140,6 +140,19 @@ public class GlyphDefinitionTable extend
     }
 
     /**
+     * Determine glyph class.
+     * @param gid a glyph identifier (index)
+     * @return a pre-defined glyph class (GLYPH_CLASS_BASE|GLYPH_CLASS_LIGATURE|GLYPH_CLASS_MARK|GLYPH_CLASS_COMPONENT). 
+     */
+    public int getGlyphClass ( int gid ) {
+        if ( gct != null ) {
+            return gct.getGlyphClass ( gid );
+        } else {
+            return -1;
+        }
+    }
+
+    /**
      * Map a lookup type name to its constant (integer) value.
      * @param name lookup type name
      * @return lookup type
@@ -235,6 +248,12 @@ public class GlyphDefinitionTable extend
          * @return true if glyph belongs to specified glyph class
          */
         public abstract boolean isGlyphClass ( int gid, int gc );
+        /**
+         * Determine glyph class.
+         * @param gid a glyph identifier (index)
+         * @return a pre-defined glyph class (GLYPH_CLASS_BASE|GLYPH_CLASS_LIGATURE|GLYPH_CLASS_MARK|GLYPH_CLASS_COMPONENT).
+         */
+        public abstract int getGlyphClass ( int gid );
         static GlyphDefinitionSubtable create ( String id, int sequence, int flags, int format, GlyphMappingTable mapping, List entries ) {
             if ( format == 1 ) {
                 return new GlyphClassSubtableFormat1 ( id, sequence, flags, format, mapping, entries );
@@ -265,6 +284,15 @@ public class GlyphDefinitionTable extend
                 return false;
             }
         }
+        /** {@inheritDoc} */
+        public int getGlyphClass ( int gid ) {
+            GlyphClassMapping cm = getClasses();
+            if ( cm != null ) {
+                return cm.getClassIndex ( gid, 0 );
+            } else {
+                return -1;
+            }
+        }
     }
 
     private abstract static class AttachmentPointSubtable extends GlyphDefinitionSubtable {

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphPositioningSubtable.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphPositioningSubtable.java?rev=1185530&r1=1185529&r2=1185530&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphPositioningSubtable.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphPositioningSubtable.java Tue Oct 18 08:33:32 2011
@@ -81,7 +81,7 @@ public abstract class GlyphPositioningSu
      * @param sequenceIndex if non negative, then apply subtables only at specified sequence index
      * @return true if a non-zero adjustment occurred
      */
-    static final boolean position ( GlyphPositioningState ps, GlyphPositioningSubtable[] sta, int sequenceIndex ) {
+    public static final boolean position ( GlyphPositioningState ps, GlyphPositioningSubtable[] sta, int sequenceIndex ) {
         int sequenceStart = ps.getPosition();
         boolean appliedOneShot = false;
         while ( ps.hasNext() ) {
@@ -106,7 +106,20 @@ public abstract class GlyphPositioningSu
         return ps.getAdjusted();
     }
 
-    static final boolean position ( GlyphSequence gs, String script, String language, String feature, int fontSize, GlyphPositioningSubtable[] sta, int[] widths, int[][] adjustments, ScriptContextTester sct ) {
+    /**
+     * Apply positioning.
+     * @param gs input glyph sequence
+     * @param script tag
+     * @param language tag
+     * @param feature tag
+     * @param fontSize the font size
+     * @param sta subtable array
+     * @param widths array
+     * @param adjustments array (receives output adjustments)
+     * @param sct script context tester
+     * @return true if a non-zero adjustment occurred
+     */
+    public static final boolean position ( GlyphSequence gs, String script, String language, String feature, int fontSize, GlyphPositioningSubtable[] sta, int[] widths, int[][] adjustments, ScriptContextTester sct ) {
         return position ( new GlyphPositioningState ( gs, script, language, feature, fontSize, widths, adjustments, sct ), sta, -1 );
     }
 

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphSubstitutionSubtable.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphSubstitutionSubtable.java?rev=1185530&r1=1185529&r2=1185530&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphSubstitutionSubtable.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphSubstitutionSubtable.java Tue Oct 18 08:33:32 2011
@@ -104,7 +104,17 @@ public abstract class GlyphSubstitutionS
         return ss.getOutput();
     }
 
-    static final GlyphSequence substitute ( GlyphSequence gs, String script, String language, String feature, GlyphSubstitutionSubtable[] sta, ScriptContextTester sct ) {
+    /**
+     * Apply substitutions.
+     * @param gs input glyph sequence
+     * @param script tag
+     * @param language tag
+     * @param feature tag
+     * @param sta subtable array
+     * @param sct script context tester
+     * @return output glyph sequence
+     */
+    public static final GlyphSequence substitute ( GlyphSequence gs, String script, String language, String feature, GlyphSubstitutionSubtable[] sta, ScriptContextTester sct ) {
         return substitute ( new GlyphSubstitutionState ( gs, script, language, feature, sct ), sta, -1 );
     }
 

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphTable.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphTable.java?rev=1185530&r1=1185529&r2=1185530&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphTable.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphTable.java Tue Oct 18 08:33:32 2011
@@ -122,6 +122,16 @@ public class GlyphTable {
     }
 
     /**
+     * Obtain lookup table by lookup id. This method is used by test code, and provides
+     * access to embedded lookups not normally accessed by {script, language, feature} lookup spec.
+     * @param lid lookup id
+     * @return table associated with lookup id or null if none
+     */
+    public LookupTable getLookupTable ( String lid ) {
+        return (LookupTable) lookupTables.get ( lid );
+    }
+
+    /**
      * Add a subtable.
      * @param subtable a (non-null) glyph subtable
      */

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/LazyFont.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/LazyFont.java?rev=1185530&r1=1185529&r2=1185530&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/LazyFont.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/LazyFont.java Tue Oct 18 08:33:32 2011
@@ -63,7 +63,11 @@ public class LazyFont extends Typeface i
         this.metricsFileName = fontInfo.getMetricsFile();
         this.fontEmbedPath = fontInfo.getEmbedFile();
         this.useKerning = fontInfo.getKerning();
-        this.useAdvanced = fontInfo.getAdvanced();
+        if ( resolver != null ) {
+            this.useAdvanced = resolver.isComplexScriptFeaturesEnabled();
+        } else {
+            this.useAdvanced = fontInfo.getAdvanced();
+        }
         this.encodingMode = fontInfo.getEncodingMode();
         this.subFontName = fontInfo.getSubFontName();
         this.embedded = fontInfo.isEmbedded();

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/apps/TTFReader.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/apps/TTFReader.java?rev=1185530&r1=1185529&r2=1185530&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/apps/TTFReader.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/apps/TTFReader.java Tue Oct 18 08:33:32 2011
@@ -107,6 +107,8 @@ public class TTFReader extends AbstractF
      * you can also include the fontfile in the fop.jar file when building fop.
      * You can use both -ef and -er. The file specified in -ef will be searched first,
      * then the -er file.
+     * -nocs
+     * if complex script features are disabled
      */
     public static void main(String[] args) {
         String embFile = null;
@@ -160,13 +162,19 @@ public class TTFReader extends AbstractF
             className = (String)options.get("-cn");
         }
 
+        boolean useKerning = true;
+        boolean useAdvanced = true;
+        if (options.get("-nocs") != null) {
+            useAdvanced = false;
+        }
+
         if (arguments.length != 2 || options.get("-h") != null
             || options.get("-help") != null || options.get("--help") != null) {
             displayUsage();
         } else {
             try {
                 log.info("Parsing font...");
-                TTFFile ttf = app.loadTTF(arguments[0], ttcName);
+                TTFFile ttf = app.loadTTF(arguments[0], ttcName, useKerning, useAdvanced);
                 if (ttf != null) {
                     org.w3c.dom.Document doc = app.constructFontXML(ttf,
                             fontName, className, embResource, embFile, isCid,
@@ -203,11 +211,13 @@ public class TTFReader extends AbstractF
      *
      * @param  fileName The filename of the TTF file.
      * @param  fontName The name of the font
+     * @param  useKerning true if should load kerning data
+     * @param  useAdvanced true if should load advanced typographic table data
      * @return The TTF as an object, null if the font is incompatible.
      * @throws IOException In case of an I/O problem
      */
-    public TTFFile loadTTF(String fileName, String fontName) throws IOException {
-        TTFFile ttfFile = new TTFFile();
+    public TTFFile loadTTF(String fileName, String fontName, boolean useKerning, boolean useAdvanced) throws IOException {
+        TTFFile ttfFile = new TTFFile(useKerning, useAdvanced);
         log.info("Reading " + fileName + "...");
 
         FontFileReader reader = new FontFileReader(fileName);

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java?rev=1185530&r1=1185529&r2=1185530&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java Tue Oct 18 08:33:32 2011
@@ -168,6 +168,9 @@ public class FontInfoFinder {
     public EmbedFontInfo[] find(URL fontURL, FontResolver resolver, FontCache fontCache) {
         String embedURL = null;
         embedURL = fontURL.toExternalForm();
+        boolean useKerning = true;
+        boolean useAdvanced = ( resolver != null )
+            ? resolver.isComplexScriptFeaturesEnabled() : true;
 
         long fileLastModified = -1;
         if (fontCache != null) {
@@ -197,7 +200,7 @@ public class FontInfoFinder {
             InputStream in = null;
             try {
                 in = FontLoader.openFontUri(resolver, fontFileURL);
-                TTFFile ttf = new TTFFile();
+                TTFFile ttf = new TTFFile(false, false);
                 FontFileReader reader = new FontFileReader(in);
                 ttcNames = ttf.getTTCnames(reader);
             } catch (Exception e) {
@@ -218,7 +221,8 @@ public class FontInfoFinder {
                 }
                 try {
                     TTFFontLoader ttfLoader = new TTFFontLoader(
-                            fontFileURL, fontName, true, EncodingMode.AUTO, true, true, resolver);
+                            fontFileURL, fontName, true, EncodingMode.AUTO,
+                            useKerning, useAdvanced, resolver);
                     customFont = ttfLoader.getFont();
                     if (this.eventListener != null) {
                         customFont.setEventListener(this.eventListener);



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