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

[PATCH] Google fonts Roboto font (updated 2017) UnsupportedOperationException: coverage set class table not yet supported

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.1, 2.2
    • Fix Version/s: None
    • Component/s: font/opentype
    • Labels:
      None

      Description

      Steps:

      1. Download the Roboto TTF font from Google Fonts.
      2. Create a configuration file with a triplet pointing to the "roboto-regular" or "roboto-thin" TTF file.
        You get:
        java.lang.UnsupportedOperationException: coverage set class table not yet supported
        	at org.apache.fop.complexscripts.fonts.GlyphClassTable$CoverageSetClassTable.<init>(GlyphClassTable.java:262)
        	at org.apache.fop.complexscripts.fonts.GlyphClassTable.createClassTable(GlyphClassTable.java:88)
        	at org.apache.fop.complexscripts.fonts.OTFAdvancedTypographicTableReader_Original.readGDEFMarkGlyphsTableFormat1(OTFAdvancedTypographicTableReader_Original.java:3344)
        	at org.apache.fop.complexscripts.fonts.OTFAdvancedTypographicTableReader.readGDEFMarkGlyphsTableFormat1(OTFAdvancedTypographicTableReader.java:69)
        	at org.apache.fop.complexscripts.fonts.OTFAdvancedTypographicTableReader_Original.readGDEFMarkGlyphsTable(OTFAdvancedTypographicTableReader_Original.java:3357)
        	at org.apache.fop.complexscripts.fonts.OTFAdvancedTypographicTableReader_Original.readGDEF(OTFAdvancedTypographicTableReader_Original.java:3427)
        	at org.apache.fop.complexscripts.fonts.OTFAdvancedTypographicTableReader_Original.readAll(OTFAdvancedTypographicTableReader_Original.java:80)
        	at org.apache.fop.fonts.truetype.OpenFont.handleCharacterSpacing(OpenFont.java:786)
        	at org.apache.fop.fonts.truetype.OpenFont.readFont(OpenFont.java:755)
        	at org.apache.fop.fonts.truetype.OFFontLoader.read(OFFontLoader.java:109)
        	at org.apache.fop.fonts.truetype.OFFontLoader.read(OFFontLoader.java:93)
        

      There are two changes that should be done to the OTFAdvancedTypographicTableReader.

      1. The method readGDEFMarkGlyphsTableFormat1 should catch this exception
      2. The method constructLookupsLanguage should check if the languages parameter is null.

      After these changes, the PDF is produced and it looks good. I am not sure what are the side effects on the font that is embedded into the PDF..

        Attachments

        1. font-workaround.patch
          2 kB
          Neil Smeby
        2. Roboto-Thin.ttf
          168 kB
          Dan Caprioara
        3. Roboto-Regular.ttf
          168 kB
          Dan Caprioara

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dc33 Dan Caprioara
            • Votes:
              7 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

              • Created:
                Updated: