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

AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.7
    • 2.8
    • unqualified
    • None

    Description

      While working on a M1 Mac OS system:

       

      Java version: 17.0.2, vendor: Oracle Corporation, runtime: 
      
      /Library/Java/JavaVirtualMachines/jdk-17.0.2.jdk/Contents/HomeDefault locale: de_DE, platform encoding: UTF-8
      
      OS name: "mac os x", version: "12.3", arch: "aarch64", family: "mac"

      I get the following AssertionError with a simple FOP config as follows:

      <fop version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:noNamespaceSchemaLocation="http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd?view=co">
      
          <!-- Renderer -->
      
          <renderers>        <!-- PDF Renderer -->
      
              <renderer mime="application/pdf">            <!-- Filter -->
                  <filterList>
                      <value>null</value>
                  </filterList>
                  <!-- Filter Image Settings-->
                  <filterList type="image">
                      <value>flate</value>
                      <value>ascii-85</value>
                  </filterList>
      
                  <!-- Font Configuration -->
                  <fonts>                <!-- <auto-detect/> -->
                      <directory>/Users/abc/uploads/fonts</directory>
                  </fonts>
      
              </renderer>
          </renderers>
          <fonts>
              <!-- <auto-detect/> -->
              <directory>/Users/abc/uploads/fonts</directory>
          </fonts>
      </fop> 

      The font, which violates the assertion in DeviceTable is:

      *file:/System/Library/Fonts/SFArabic.ttf*

       

      Stacktrace:

      java.lang.AssertionError at org.apache.fop.complexscripts.fonts.GlyphPositioningTable$DeviceTable.<init>(GlyphPositioningTable.java:1774) at org.apache.fop.complexscripts.fonts.OTFAdvancedTypographicTableReader.readPosDeviceTable(OTFAdvancedTypographicTableReader.java:1727) at org.apache.fop.complexscripts.fonts.OTFAdvancedTypographicTableReader.readPosAnchor(OTFAdvancedTypographicTableReader.java:2051) at org.apache.fop.complexscripts.fonts.OTFAdvancedTypographicTableReader.readMarkToLigaturePosTableFormat1(OTFAdvancedTypographicTableReader.java:2345) at org.apache.fop.complexscripts.fonts.OTFAdvancedTypographicTableReader.readMarkToLigaturePosTable(OTFAdvancedTypographicTableReader.java:2371) at org.apache.fop.complexscripts.fonts.OTFAdvancedTypographicTableReader.readGPOSSubtable(OTFAdvancedTypographicTableReader.java:3122) at org.apache.fop.complexscripts.fonts.OTFAdvancedTypographicTableReader.readLookupTable(OTFAdvancedTypographicTableReader.java:3191) at org.apache.fop.complexscripts.fonts.OTFAdvancedTypographicTableReader.readLookupList(OTFAdvancedTypographicTableReader.java:3218) at org.apache.fop.complexscripts.fonts.OTFAdvancedTypographicTableReader.readCommonLayoutTables(OTFAdvancedTypographicTableReader.java:3239) at org.apache.fop.complexscripts.fonts.OTFAdvancedTypographicTableReader.readGPOS(OTFAdvancedTypographicTableReader.java:3499) at org.apache.fop.complexscripts.fonts.OTFAdvancedTypographicTableReader.readAll(OTFAdvancedTypographicTableReader.java:84) at org.apache.fop.fonts.truetype.OpenFont.handleCharacterSpacing(OpenFont.java:889) at org.apache.fop.fonts.truetype.OpenFont.readFont(OpenFont.java:861) at org.apache.fop.fonts.truetype.OFFontLoader.read(OFFontLoader.java:119) at org.apache.fop.fonts.truetype.OFFontLoader.read(OFFontLoader.java:103) at org.apache.fop.fonts.FontLoader.getFont(FontLoader.java:126) at org.apache.fop.fonts.FontLoader.loadFont(FontLoader.java:110) at org.apache.fop.fonts.autodetect.FontInfoFinder.find(FontInfoFinder.java:253) at org.apache.fop.fonts.FontAdder.add(FontAdder.java:63) at org.apache.fop.fonts.FontDetectorFactory$DefaultFontDetector.detect(FontDetectorFactory.java:105) at org.apache.fop.fonts.FontManager.autoDetectFonts(FontManager.java:229) at org.apache.fop.fonts.DefaultFontConfigurator.configure(DefaultFontConfigurator.java:82) at org.apache.fop.render.PrintRendererConfigurator.getCustomFontCollection(PrintRendererConfigurator.java:147) at org.apache.fop.render.PrintRendererConfigurator.setupFontInfo(PrintRendererConfigurator.java:127) at org.apache.fop.render.intermediate.IFUtil.setupFonts(IFUtil.java:170) at org.apache.fop.render.intermediate.IFRenderer.setupFontInfo(IFRenderer.java:187) at org.apache.fop.area.RenderPagesModel.<init>(RenderPagesModel.java:75) at org.apache.fop.area.AreaTreeHandler.setupModel(AreaTreeHandler.java:135) at org.apache.fop.area.AreaTreeHandler.<init>(AreaTreeHandler.java:105) at org.apache.fop.render.RendererFactory.createFOEventHandler(RendererFactory.java:363) at org.apache.fop.fo.FOTreeBuilder.<init>(FOTreeBuilder.java:109) at org.apache.fop.apps.Fop.createDefaultHandler(Fop.java:104) at org.apache.fop.apps.Fop.<init>(Fop.java:78) at org.apache.fop.apps.FOUserAgent.newFop(FOUserAgent.java:184) at org.apache.fop.apps.FopFactory.newFop(FopFactory.java:234)

      Attachments

        1. image-2022-04-08-16-09-21-254.png
          1.07 MB
          Richard Zowalla
        2. propagate_use_advanced.patch
          6 kB
          Richard Zowalla
        3. SFArabic.ttf
          683 kB
          Richard Zowalla

        Activity

          People

            ssteiner Simon Steiner
            rzo1 Richard Zowalla
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: