]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
FOP-2704: Don't fail on coverage set class table not supported
authorSimon Steiner <ssteiner@apache.org>
Wed, 15 Apr 2020 08:40:55 +0000 (08:40 +0000)
committerSimon Steiner <ssteiner@apache.org>
Wed, 15 Apr 2020 08:40:55 +0000 (08:40 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1876539 13f79535-47bb-0310-9956-ffa450edef68

fop-core/src/main/java/org/apache/fop/complexscripts/fonts/GlyphClassTable.java
fop-core/src/test/java/org/apache/fop/complexscripts/fonts/GSUBTestCase.java

index b15fcbead99784cd47eeb61c3a3ab54b2390c0a3..9b15d4cd6e0b6aa884bb8ea306a1ac9986ca43c5 100644 (file)
@@ -22,6 +22,9 @@ package org.apache.fop.complexscripts.fonts;
 import java.util.Iterator;
 import java.util.List;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 // CSOFF: LineLengthCheck
 
 /**
@@ -255,8 +258,9 @@ public final class GlyphClassTable extends GlyphMappingTable implements GlyphCla
     }
 
     private static class CoverageSetClassTable extends GlyphMappingTable.EmptyMappingTable implements GlyphClassMapping {
+        private static final Log LOG = LogFactory.getLog(CoverageSetClassTable.class);
         public CoverageSetClassTable(List entries) {
-            throw new UnsupportedOperationException("coverage set class table not yet supported");
+            LOG.warn("coverage set class table not yet supported");
         }
         /** {@inheritDoc} */
         public int getType() {
index bdd0983fff7a4e150993d8d93543160a8d3ea758..5519240c6c46efc12b02f19da6afa2e5e60c9462 100644 (file)
@@ -21,6 +21,7 @@ package org.apache.fop.complexscripts.fonts;
 
 import java.io.File;
 import java.nio.IntBuffer;
+import java.util.Collections;
 
 import org.junit.Test;
 
@@ -184,4 +185,10 @@ public class GSUBTestCase implements ScriptContextTester, GlyphContextTester {
         }
     }
 
+    @Test
+    public void testCreateClassTable() {
+        GlyphCoverageTable coverageTable = GlyphCoverageTable.createCoverageTable(null);
+        GlyphClassTable classTable = GlyphClassTable.createClassTable(Collections.singletonList(coverageTable));
+        assertNotNull(classTable);
+    }
 }