Job Change

2007-06-26 Thread richard

Please note that as of this Friday I will no longer be working at
Geoquip. Any e-mail directed to [EMAIL PROTECTED]
on matters concerning FOP is unlikely to get any meaningful
response. Hopefully I will still get the chance to continue working
on FOP and I intend to take another look at the memory usage patches
asap,

Regards,

Richard



Re: Job Change

2007-06-28 Thread richard
Andreas L Delmelle writes:
  On Jun 26, 2007, at 16:08, [EMAIL PROTECTED] wrote:
  
  Hi Richard,
  
   Please note that as of this Friday I will no longer be working at
   Geoquip. Any e-mail directed to [EMAIL PROTECTED]
   on matters concerning FOP is unlikely to get any meaningful
   response. Hopefully I will still get the chance to continue working
   on FOP and I intend to take another look at the memory usage patches
   asap,
  
  I'm in the process of looking at your patch right now. I suppose  
  you've already seen the additional comment on the bug (?)

Yes. I'll take another look asap,

Richard



[jira] [Commented] (FOP-3062) AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf

2022-04-08 Thread Richard Zowalla (Jira)


[ 
https://issues.apache.org/jira/browse/FOP-3062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17519706#comment-17519706
 ] 

Richard Zowalla commented on FOP-3062:
--

Thanks for updating the documentation as well as your time.

I tested the sample code: If I hard-code the path to SFArabic via  the font is loaded and used (at least no exception / assertion error 
is thrown)
{code:java}
Apr. 08, 2022 6:47:05 PM org.apache.fop.fo.properties.CommonHyphenation 
getHyphChar
WARNUNG: Substituted specified hyphenation character (0x2d) with 0x20 because 
the font doesn't have the specified hyphenation character: SFArabic,normal,400
Apr. 08, 2022 6:47:05 PM org.apache.fop.events.LoggingEventListener processEvent
WARNUNG: Glyph "t" (0x74, t) not available in font ".SFArabic-Regular".
Apr. 08, 2022 6:47:05 PM org.apache.fop.events.LoggingEventListener processEvent
WARNUNG: Glyph "e" (0x65, e) not available in font ".SFArabic-Regular".
Apr. 08, 2022 6:47:05 PM org.apache.fop.events.LoggingEventListener processEvent
WARNUNG: Glyph "s" (0x73, s) not available in font ".SFArabic-Regular".
Apr. 08, 2022 6:47:05 PM org.apache.fop.events.LoggingEventListener processEvent
WARNUNG: Glyph "2" (0x32, two) not available in font ".SFArabic-Regular".
Apr. 08, 2022 6:47:05 PM org.apache.fop.events.LoggingEventListener processEvent
INFORMATION: Rendered page #1.{code}
My issue is, that I do +*not*+ want to use *SFArabic* at all (it is just a 
system font, which is available by default on an MacOS 12.3 and cannot be 
deleted), which is detected during auto scanning by fop.
So I am not quite sure, if specifying the specific font will help with the 
original issue which occurs during auto-scanning.

Is there a configuration option to exclude fonts from being scanned?

The good news: I was able to reproduce it on my Ubuntu 20.04 LTS machine by 
adjusting your code snippet as follows. 

Note: I installed the *SFArabic.ttf* system-wide and re-generated the Ubuntu 
font cache.

 

 
{code:java}
import org.apache.fop.apps.FOUserAgent;
import org.apache.fop.apps.Fop;
import org.apache.fop.apps.FopConfParser;
import org.apache.fop.apps.FopFactory;
import org.apache.fop.apps.FopFactoryBuilder;
import javax.xml.transform.Result;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.sax.SAXResult;
import javax.xml.transform.stream.StreamSource;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileOutputStream;
public class ComplexScript {
    public static void main(String[] args) throws Exception {
        String fo = "http://www.w3.org/1999/XSL/Format\"\n; 
+
                "  
xmlns:fox=\"http://xmlgraphics.apache.org/fop/extensions\;>\n" +
                "  \n" +
                "    \n" +
                "      \n" +
                "    \n" +
                "  \n" +
                "  \n" +
                "    \n" +
                " test2  \n" +
                "\n" +
                "  \n" +
                "\n";
        String fopxconf = """
                http://www.w3.org/2001/XMLSchema-instance;
                     
xsi:noNamespaceSchemaLocation="http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd?view=co;>
                                
                    
                                
                            
                                
                                    
                            
                                null
                            
                            
                            
                                flate
                                ascii-85
                            
                                
                            
                                       
                               
                            
                                
                        
                    
                    
                      
                    
                \s
                """;
        FopFactoryBuilder builder =
                new FopConfParser(new 
ByteArrayInputStream(fopxconf.getBytes()), new 
File(".").toURI()).getFopFactoryBuilder();
        builder.setComplexScriptFeatures(false);
        FopFactory fopFactory = builder.build();
        fopFactory.getFontManager().disableFontCache();
        FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
        FileOutputStream fos = new FileOutputStream("/tmp/out.pdf");
        Fop fop = fopFactory.newFop("application/pdf", foUserAgent, fos);
        TransformerFacto

[jira] [Comment Edited] (FOP-3062) AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf

2022-04-08 Thread Richard Zowalla (Jira)


[ 
https://issues.apache.org/jira/browse/FOP-3062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17519706#comment-17519706
 ] 

Richard Zowalla edited comment on FOP-3062 at 4/8/22 4:51 PM:
--

Thanks for updating the documentation as well as your time.

I tested the sample code: If I hard-code the path to SFArabic via  the font is loaded and used (at least no exception / assertion error 
is thrown)
{code:java}
Apr. 08, 2022 6:47:05 PM org.apache.fop.fo.properties.CommonHyphenation 
getHyphChar
WARNUNG: Substituted specified hyphenation character (0x2d) with 0x20 because 
the font doesn't have the specified hyphenation character: SFArabic,normal,400
Apr. 08, 2022 6:47:05 PM org.apache.fop.events.LoggingEventListener processEvent
WARNUNG: Glyph "t" (0x74, t) not available in font ".SFArabic-Regular".
Apr. 08, 2022 6:47:05 PM org.apache.fop.events.LoggingEventListener processEvent
WARNUNG: Glyph "e" (0x65, e) not available in font ".SFArabic-Regular".
Apr. 08, 2022 6:47:05 PM org.apache.fop.events.LoggingEventListener processEvent
WARNUNG: Glyph "s" (0x73, s) not available in font ".SFArabic-Regular".
Apr. 08, 2022 6:47:05 PM org.apache.fop.events.LoggingEventListener processEvent
WARNUNG: Glyph "2" (0x32, two) not available in font ".SFArabic-Regular".
Apr. 08, 2022 6:47:05 PM org.apache.fop.events.LoggingEventListener processEvent
INFORMATION: Rendered page #1.{code}
My issue is, that I do +*not*+ want to use *SFArabic* at all (it is just a 
system font, which is available by default on an MacOS 12.3 and cannot be 
deleted), which is detected during auto scanning by fop.
So I am not quite sure, if specifying the specific font will help with the 
original issue which occurs during auto-scanning.

Is there a configuration option to exclude fonts from being scanned?

The good news: I was able to reproduce it on my Ubuntu 20.04 LTS machine by 
adjusting your code snippet as follows. 

Note: I installed the *SFArabic.ttf* system-wide and re-generated the Ubuntu 
font cache.

 

 
{code:java}
import org.apache.fop.apps.FOUserAgent;
import org.apache.fop.apps.Fop;
import org.apache.fop.apps.FopConfParser;
import org.apache.fop.apps.FopFactory;
import org.apache.fop.apps.FopFactoryBuilder;
import javax.xml.transform.Result;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.sax.SAXResult;
import javax.xml.transform.stream.StreamSource;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileOutputStream;
public class ComplexScript {
    public static void main(String[] args) throws Exception {
        String fo = "http://www.w3.org/1999/XSL/Format\"\n; 
+
                "  
xmlns:fox=\"http://xmlgraphics.apache.org/fop/extensions\;>\n" +
                "  \n" +
                "    \n" +
                "      \n" +
                "    \n" +
                "  \n" +
                "  \n" +
                "    \n" +
                " test2  \n" +
                "\n" +
                "  \n" +
                "\n";
        String fopxconf = """
                http://www.w3.org/2001/XMLSchema-instance;
                     
xsi:noNamespaceSchemaLocation="http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd?view=co;>
                                
                    
                                
                            
                                
                                    
                            
                                null
                            
                            
                            
                                flate
                                ascii-85
                            
                                
                            
                                       
                               
                            
                                
                        
                    
                    
                      
                    
                \s
                """;
        FopFactoryBuilder builder =
                new FopConfParser(new 
ByteArrayInputStream(fopxconf.getBytes()), new 
File(".").toURI()).getFopFactoryBuilder();
        builder.setComplexScriptFeatures(false);
        FopFactory fopFactory = builder.build();
//disable the font cache on purpose to reproduce the issue
        fopFactory.getFontManager().disableFontCache();
        FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
        FileOutputStream fos = new FileOutputStream("/tmp/out.pdf");
   

[jira] [Comment Edited] (FOP-3062) AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf

2022-04-08 Thread Richard Zowalla (Jira)


[ 
https://issues.apache.org/jira/browse/FOP-3062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17519706#comment-17519706
 ] 

Richard Zowalla edited comment on FOP-3062 at 4/8/22 4:54 PM:
--

Thanks for updating the documentation as well as your time.

I tested the sample code: If I hard-code the path to SFArabic via  the font is loaded and used (at least no exception / assertion error 
is thrown)
{code:java}
Apr. 08, 2022 6:47:05 PM org.apache.fop.fo.properties.CommonHyphenation 
getHyphChar
WARNUNG: Substituted specified hyphenation character (0x2d) with 0x20 because 
the font doesn't have the specified hyphenation character: SFArabic,normal,400
Apr. 08, 2022 6:47:05 PM org.apache.fop.events.LoggingEventListener processEvent
WARNUNG: Glyph "t" (0x74, t) not available in font ".SFArabic-Regular".
Apr. 08, 2022 6:47:05 PM org.apache.fop.events.LoggingEventListener processEvent
WARNUNG: Glyph "e" (0x65, e) not available in font ".SFArabic-Regular".
Apr. 08, 2022 6:47:05 PM org.apache.fop.events.LoggingEventListener processEvent
WARNUNG: Glyph "s" (0x73, s) not available in font ".SFArabic-Regular".
Apr. 08, 2022 6:47:05 PM org.apache.fop.events.LoggingEventListener processEvent
WARNUNG: Glyph "2" (0x32, two) not available in font ".SFArabic-Regular".
Apr. 08, 2022 6:47:05 PM org.apache.fop.events.LoggingEventListener processEvent
INFORMATION: Rendered page #1.{code}
My issue is, that I do +*not*+ want to use *SFArabic* at all (it is just a 
system font, which is available by default on an MacOS 12.3 and cannot be 
deleted), which is detected during auto scanning by fop.
So I am not quite sure, if specifying the specific font will help with the 
original issue which occurs during auto-scanning.

Is there a configuration option to exclude fonts from being scanned?

*The good news:*

I was able to reproduce it on my Ubuntu 20.04 LTS machine by adjusting your 
code snippet (without our complicated EAR / EE setup). Started the code with 
*-ea* via JVM params. Note: I used Java 17 text blocks for simplicity of XML 
config snippet.

Note: I installed the *SFArabic.ttf* system-wide and re-generated the Ubuntu 
font cache. 

 
{code:java}
import org.apache.fop.apps.FOUserAgent;
import org.apache.fop.apps.Fop;
import org.apache.fop.apps.FopConfParser;
import org.apache.fop.apps.FopFactory;
import org.apache.fop.apps.FopFactoryBuilder;
import javax.xml.transform.Result;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.sax.SAXResult;
import javax.xml.transform.stream.StreamSource;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileOutputStream;
public class ComplexScript {
    public static void main(String[] args) throws Exception {
        String fo = "http://www.w3.org/1999/XSL/Format\"\n; 
+
                "  
xmlns:fox=\"http://xmlgraphics.apache.org/fop/extensions\;>\n" +
                "  \n" +
                "    \n" +
                "      \n" +
                "    \n" +
                "  \n" +
                "  \n" +
                "    \n" +
                " test2  \n" +
                "\n" +
                "  \n" +
                "\n";
        String fopxconf = """
                http://www.w3.org/2001/XMLSchema-instance;
                     
xsi:noNamespaceSchemaLocation="http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd?view=co;>
                                
                    
                                
                            
                                
                                    
                            
                                null
                            
                            
                            
                                flate
                                ascii-85
                            
                                
                            
                                       
                               
                            
                                
                        
                    
                    
                      
                    
                \s
                """;
        FopFactoryBuilder builder =
                new FopConfParser(new 
ByteArrayInputStream(fopxconf.getBytes()), new 
File(".").toURI()).getFopFactoryBuilder();
        builder.setComplexScriptFeatures(false);
        FopFactory fopFactory = builder.build();
//disable the font cache on purpose to reproduce the issue
        fopFactory.getFontMana

[jira] [Updated] (FOP-3062) AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf

2022-04-08 Thread Richard Zowalla (Jira)


 [ 
https://issues.apache.org/jira/browse/FOP-3062?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Richard Zowalla updated FOP-3062:
-
Attachment: propagate_use_advanced.patch

> AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf
> -
>
> Key: FOP-3062
> URL: https://issues.apache.org/jira/browse/FOP-3062
> Project: FOP
>  Issue Type: Bug
>  Components: unqualified
>Affects Versions: 2.7
>Reporter: Richard Zowalla
>Priority: Major
> Attachments: SFArabic.ttf, image-2022-04-08-16-09-21-254.png, 
> propagate_use_advanced.patch
>
>
> While working on a M1 Mac OS system:
>  
> {code:java}
> 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"{code}
> I get the following AssertionError with a simple FOP config as follows:
> {code:java}
> http://www.w3.org/2001/XMLSchema-instance;
>  
> xsi:noNamespaceSchemaLocation="http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd?view=co;>
> 
> 
> 
> 
> null
> 
> 
> 
> flate
> ascii-85
> 
> 
> 
> /Users/abc/uploads/fonts
> 
> 
> 
> 
> 
> /Users/abc/uploads/fonts
> 
>  {code}
> The font, which violates the assertion in DeviceTable is:
> *[file:/System/Library/Fonts/SFArabic.ttf*|file:///System/Library/Fonts/SFArabic.ttf*]
>  
> *Stacktrace:*
> {code:java}
> java.lang.AssertionError at 
> org.apache.fop.complexscripts.fonts.GlyphPositioningTable$DeviceTable.(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.setu

[jira] [Commented] (FOP-3062) AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf

2022-04-08 Thread Richard Zowalla (Jira)


[ 
https://issues.apache.org/jira/browse/FOP-3062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17519747#comment-17519747
 ] 

Richard Zowalla commented on FOP-3062:
--

Another (simple) way to reproduce is to checkout the current FOP master on 
GitHub and conduct a "mvn clean install" with the font being installed on the 
local system. This will trigger the following unit test:
{code:java}
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.177 sec <<< 
FAILURE! - in org.apache.fop.config.FontsAutoDetectTestCase
testUserConfig(org.apache.fop.config.FontsAutoDetectTestCase)  Time elapsed: 
0.176 sec  <<< FAILURE!
java.lang.AssertionError: null{code}
 

> AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf
> -
>
> Key: FOP-3062
> URL: https://issues.apache.org/jira/browse/FOP-3062
> Project: FOP
>  Issue Type: Bug
>  Components: unqualified
>    Affects Versions: 2.7
>Reporter: Richard Zowalla
>Priority: Major
> Attachments: SFArabic.ttf, image-2022-04-08-16-09-21-254.png
>
>
> While working on a M1 Mac OS system:
>  
> {code:java}
> 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"{code}
> I get the following AssertionError with a simple FOP config as follows:
> {code:java}
> http://www.w3.org/2001/XMLSchema-instance;
>  
> xsi:noNamespaceSchemaLocation="http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd?view=co;>
> 
> 
> 
> 
> null
> 
> 
> 
> flate
> ascii-85
> 
> 
> 
> /Users/abc/uploads/fonts
> 
> 
> 
> 
> 
> /Users/abc/uploads/fonts
> 
>  {code}
> The font, which violates the assertion in DeviceTable is:
> *[file:/System/Library/Fonts/SFArabic.ttf*|file:///System/Library/Fonts/SFArabic.ttf*]
>  
> *Stacktrace:*
> {code:java}
> java.lang.AssertionError at 
> org.apache.fop.complexscripts.fonts.GlyphPositioningTable$DeviceTable.(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$DefaultFontD

[jira] [Comment Edited] (FOP-3062) AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf

2022-04-08 Thread Richard Zowalla (Jira)


[ 
https://issues.apache.org/jira/browse/FOP-3062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17519752#comment-17519752
 ] 

Richard Zowalla edited comment on FOP-3062 at 4/8/22 6:48 PM:
--

A possible fix / solution / workaround would (maybe - I was just looking at the 
code) probably be:

1. Pass "useAdvanced" as a new parameter to FontInfoFinder#find(...). To avoid 
breaking the API, we could do something like:

 
{code:java}
 public EmbedFontInfo[] find(URI fontURI, InternalResourceResolver 
resourceResolver, FontCache fontCache) {
  return find(fontURI, resourceResolver, fontCache);
 }
 
 public EmbedFontInfo[] find(URI fontURI, InternalResourceResolver 
resourceResolver, FontCache fontCache, boolean useAdvanced) {
  ...
 }
 {code}
 
 2. Add a boolean property for "useAdvanced" to the FontManager (?) to 
propagate to the FontFinderInfo / FontAdder.
  
Note: If "complexScriptFeaturues" has the same meaning ie is semantically equal 
to "useAdvanced" in FontInfoFinder, we would need to make sure, that this 
property is passed to the FontManager (after being set via XML or 
programmatically). Something like 
https://issues.apache.org/jira/secure/attachment/13042174/propagate_use_advanced.patch

 

Btw. the same holds for "useKerning", which is set to "true" by default in 
find(...). Shouldn't that be a parameter to, which is passed from the font 
manager to the find(...) method?

Wdyt? 


was (Author: rzo1):
A possible fix / solution / workaround would (maybe - I was just looking at the 
code) probably be:

1. Pass "useAdvanced" as a new parameter to FontInfoFinder#find(...). To avoid 
breaking the API, we could do something like:

 
{code:java}
 public EmbedFontInfo[] find(URI fontURI, InternalResourceResolver 
resourceResolver, FontCache fontCache) {
  return find(fontURI, resourceResolver, fontCache);
 }
 
 public EmbedFontInfo[] find(URI fontURI, InternalResourceResolver 
resourceResolver, FontCache fontCache, boolean useAdvanced) {
  ...
 }
 {code}
 
 2. Add a boolean property for "useAdvanced" to the FontManager (?) to 
propagate to the FontFinderInfo / FontAdder.
  
Note: If "complexScriptFeaturues" has the same meaning ie is semantically equal 
to "useAdvanced" in FontInfoFinder, we would need to make sure, that this 
property is passed to the FontManager (after being set via XML or 
programmatically). Something like [^propagate_use_advanced.patch] 

 

Btw. the same holds for "useKerning", which is set to "true" by default in 
find(...). Shouldn't that be a parameter to, which is passed from the font 
manager to the find(...) method?

Wdyt? 

> AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf
> -
>
> Key: FOP-3062
> URL: https://issues.apache.org/jira/browse/FOP-3062
>     Project: FOP
>  Issue Type: Bug
>  Components: unqualified
>Affects Versions: 2.7
>Reporter: Richard Zowalla
>Priority: Major
> Attachments: SFArabic.ttf, image-2022-04-08-16-09-21-254.png, 
> propagate_use_advanced.patch
>
>
> While working on a M1 Mac OS system:
>  
> {code:java}
> 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"{code}
> I get the following AssertionError with a simple FOP config as follows:
> {code:java}
> http://www.w3.org/2001/XMLSchema-instance;
>  
> xsi:noNamespaceSchemaLocation="http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd?view=co;>
> 
> 
> 
> 
> null
> 
> 
> 
> flate
> ascii-85
> 
> 
> 
> /Users/abc/uploads/fonts
> 
> 
> 
> 
> 
> /Users/abc/uploads/fonts
> 
>  {code}
> The font, which violates the assertion in DeviceTable is:
> *[file:/System/Library/Fonts/SFArabic.ttf*|file:///System/Library/Fonts/SFArabic.ttf*]
>  
> *Stacktrace:*
> {code:java}
> java.lang.AssertionError at 
> org.apache.fop.complexscripts.fonts.GlyphPositioningTable$DeviceTable.(GlyphPositioningTable.java:1774)
>  at 
> org.apache.fop.complexscripts.fonts.OTFAdvancedTypographicTableReader.readPosDeviceTab

[jira] [Comment Edited] (FOP-3062) AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf

2022-04-08 Thread Richard Zowalla (Jira)


[ 
https://issues.apache.org/jira/browse/FOP-3062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17519706#comment-17519706
 ] 

Richard Zowalla edited comment on FOP-3062 at 4/8/22 4:54 PM:
--

Thanks for updating the documentation as well as your time.

I tested the sample code: If I hard-code the path to SFArabic via  the font is loaded and used (at least no exception / assertion error 
is thrown)
{code:java}
Apr. 08, 2022 6:47:05 PM org.apache.fop.fo.properties.CommonHyphenation 
getHyphChar
WARNUNG: Substituted specified hyphenation character (0x2d) with 0x20 because 
the font doesn't have the specified hyphenation character: SFArabic,normal,400
Apr. 08, 2022 6:47:05 PM org.apache.fop.events.LoggingEventListener processEvent
WARNUNG: Glyph "t" (0x74, t) not available in font ".SFArabic-Regular".
Apr. 08, 2022 6:47:05 PM org.apache.fop.events.LoggingEventListener processEvent
WARNUNG: Glyph "e" (0x65, e) not available in font ".SFArabic-Regular".
Apr. 08, 2022 6:47:05 PM org.apache.fop.events.LoggingEventListener processEvent
WARNUNG: Glyph "s" (0x73, s) not available in font ".SFArabic-Regular".
Apr. 08, 2022 6:47:05 PM org.apache.fop.events.LoggingEventListener processEvent
WARNUNG: Glyph "2" (0x32, two) not available in font ".SFArabic-Regular".
Apr. 08, 2022 6:47:05 PM org.apache.fop.events.LoggingEventListener processEvent
INFORMATION: Rendered page #1.{code}
My issue is, that I do +*not*+ want to use *SFArabic* at all (it is just a 
system font, which is available by default on an MacOS 12.3 and cannot be 
deleted), which is detected during auto scanning by fop.
So I am not quite sure, if specifying the specific font will help with the 
original issue which occurs during auto-scanning.

Is there a configuration option to exclude fonts from being scanned?

*The good news:* 

I was able to reproduce it on my Ubuntu 20.04 LTS machine by adjusting your 
code snippet (without our complicated EAR / EE setup). Started the code with 
*-ea* via JVM params.

Note: I installed the *SFArabic.ttf* system-wide and re-generated the Ubuntu 
font cache. 

 
{code:java}
import org.apache.fop.apps.FOUserAgent;
import org.apache.fop.apps.Fop;
import org.apache.fop.apps.FopConfParser;
import org.apache.fop.apps.FopFactory;
import org.apache.fop.apps.FopFactoryBuilder;
import javax.xml.transform.Result;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.sax.SAXResult;
import javax.xml.transform.stream.StreamSource;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileOutputStream;
public class ComplexScript {
    public static void main(String[] args) throws Exception {
        String fo = "http://www.w3.org/1999/XSL/Format\"\n; 
+
                "  
xmlns:fox=\"http://xmlgraphics.apache.org/fop/extensions\;>\n" +
                "  \n" +
                "    \n" +
                "      \n" +
                "    \n" +
                "  \n" +
                "  \n" +
                "    \n" +
                " test2  \n" +
                "\n" +
                "  \n" +
                "\n";
        String fopxconf = """
                http://www.w3.org/2001/XMLSchema-instance;
                     
xsi:noNamespaceSchemaLocation="http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd?view=co;>
                                
                    
                                
                            
                                
                                    
                            
                                null
                            
                            
                            
                                flate
                                ascii-85
                            
                                
                            
                                       
                               
                            
                                
                        
                    
                    
                      
                    
                \s
                """;
        FopFactoryBuilder builder =
                new FopConfParser(new 
ByteArrayInputStream(fopxconf.getBytes()), new 
File(".").toURI()).getFopFactoryBuilder();
        builder.setComplexScriptFeatures(false);
        FopFactory fopFactory = builder.build();
//disable the font cache on purpose to reproduce the issue
        fopFactory.getFontManager().disableFontCache();
        FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
    

[jira] [Comment Edited] (FOP-3062) AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf

2022-04-08 Thread Richard Zowalla (Jira)


[ 
https://issues.apache.org/jira/browse/FOP-3062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17519752#comment-17519752
 ] 

Richard Zowalla edited comment on FOP-3062 at 4/8/22 6:52 PM:
--

A possible fix / solution / workaround would (maybe - I was just looking at the 
code) probably be:

1. Pass "useAdvanced" as a new parameter to FontInfoFinder#find(...). To avoid 
breaking the API, we could do something like:

 
{code:java}
 public EmbedFontInfo[] find(URI fontURI, InternalResourceResolver 
resourceResolver, FontCache fontCache) {
  return find(fontURI, resourceResolver, fontCache);
 }
 
 public EmbedFontInfo[] find(URI fontURI, InternalResourceResolver 
resourceResolver, FontCache fontCache, boolean useAdvanced) {
  ...
 }
 {code}
 
 2. Add a boolean property for "useAdvanced" to the FontManager (?) to 
propagate to the FontFinderInfo / FontAdder.
  
Note: If "complexScriptFeaturues" has the same meaning ie is semantically equal 
to "useAdvanced" in FontInfoFinder, we would need to make sure, that this 
property is passed to the FontManager (after being set via XML or 
programmatically). Something like [^propagate_use_advanced.patch] - if this 
goes in the right direction, I can also prepare a PR on GitHub.

Btw. the same holds for "useKerning", which is set to "true" by default in 
find(...). Shouldn't that be a parameter to, which is passed from the font 
manager to the find(...) method?

Wdyt? 


was (Author: rzo1):
A possible fix / solution / workaround would (maybe - I was just looking at the 
code) probably be:

1. Pass "useAdvanced" as a new parameter to FontInfoFinder#find(...). To avoid 
breaking the API, we could do something like:

 
{code:java}
 public EmbedFontInfo[] find(URI fontURI, InternalResourceResolver 
resourceResolver, FontCache fontCache) {
  return find(fontURI, resourceResolver, fontCache);
 }
 
 public EmbedFontInfo[] find(URI fontURI, InternalResourceResolver 
resourceResolver, FontCache fontCache, boolean useAdvanced) {
  ...
 }
 {code}
 
 2. Add a boolean property for "useAdvanced" to the FontManager (?) to 
propagate to the FontFinderInfo / FontAdder.
  
Note: If "complexScriptFeaturues" has the same meaning ie is semantically equal 
to "useAdvanced" in FontInfoFinder, we would need to make sure, that this 
property is passed to the FontManager (after being set via XML or 
programmatically). Something like 
https://issues.apache.org/jira/secure/attachment/13042174/propagate_use_advanced.patch

 

Btw. the same holds for "useKerning", which is set to "true" by default in 
find(...). Shouldn't that be a parameter to, which is passed from the font 
manager to the find(...) method?

Wdyt? 

> AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf
> -
>
> Key: FOP-3062
> URL: https://issues.apache.org/jira/browse/FOP-3062
>     Project: FOP
>  Issue Type: Bug
>  Components: unqualified
>Affects Versions: 2.7
>Reporter: Richard Zowalla
>Priority: Major
> Attachments: SFArabic.ttf, image-2022-04-08-16-09-21-254.png, 
> propagate_use_advanced.patch
>
>
> While working on a M1 Mac OS system:
>  
> {code:java}
> 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"{code}
> I get the following AssertionError with a simple FOP config as follows:
> {code:java}
> http://www.w3.org/2001/XMLSchema-instance;
>  
> xsi:noNamespaceSchemaLocation="http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd?view=co;>
> 
> 
> 
> 
> null
> 
> 
> 
> flate
> ascii-85
> 
> 
> 
> /Users/abc/uploads/fonts
> 
> 
> 
> 
> 
> /Users/abc/uploads/fonts
> 
>  {code}
> The font, which violates the assertion in DeviceTable is:
> *[file:/System/Library/Fonts/SFArabic.ttf*|file:///System/Library/Fonts/SFArabic.ttf*]
>  
> *Stacktrace:*
> {code:java}
> java.lang.AssertionError at 
> org.apache.fop.complexscripts.fonts.GlyphPositioningTable$DeviceTable.(GlyphPositioningTable.java:1774)
>  at 
> org.apache.fop.complexscripts.fonts.OTFAdv

[jira] [Updated] (FOP-3062) AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf

2022-04-08 Thread Richard Zowalla (Jira)


 [ 
https://issues.apache.org/jira/browse/FOP-3062?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Richard Zowalla updated FOP-3062:
-
Attachment: (was: propagate_use_advanced.patch)

> AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf
> -
>
> Key: FOP-3062
> URL: https://issues.apache.org/jira/browse/FOP-3062
> Project: FOP
>  Issue Type: Bug
>  Components: unqualified
>Affects Versions: 2.7
>Reporter: Richard Zowalla
>Priority: Major
> Attachments: SFArabic.ttf, image-2022-04-08-16-09-21-254.png, 
> propagate_use_advanced.patch
>
>
> While working on a M1 Mac OS system:
>  
> {code:java}
> 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"{code}
> I get the following AssertionError with a simple FOP config as follows:
> {code:java}
> http://www.w3.org/2001/XMLSchema-instance;
>  
> xsi:noNamespaceSchemaLocation="http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd?view=co;>
> 
> 
> 
> 
> null
> 
> 
> 
> flate
> ascii-85
> 
> 
> 
> /Users/abc/uploads/fonts
> 
> 
> 
> 
> 
> /Users/abc/uploads/fonts
> 
>  {code}
> The font, which violates the assertion in DeviceTable is:
> *[file:/System/Library/Fonts/SFArabic.ttf*|file:///System/Library/Fonts/SFArabic.ttf*]
>  
> *Stacktrace:*
> {code:java}
> java.lang.AssertionError at 
> org.apache.fop.complexscripts.fonts.GlyphPositioningTable$DeviceTable.(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.setu

[jira] [Updated] (FOP-3062) AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf

2022-04-08 Thread Richard Zowalla (Jira)


 [ 
https://issues.apache.org/jira/browse/FOP-3062?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Richard Zowalla updated FOP-3062:
-
Attachment: propagate_use_advanced.patch

> AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf
> -
>
> Key: FOP-3062
> URL: https://issues.apache.org/jira/browse/FOP-3062
> Project: FOP
>  Issue Type: Bug
>  Components: unqualified
>Affects Versions: 2.7
>Reporter: Richard Zowalla
>Priority: Major
> Attachments: SFArabic.ttf, image-2022-04-08-16-09-21-254.png, 
> propagate_use_advanced.patch
>
>
> While working on a M1 Mac OS system:
>  
> {code:java}
> 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"{code}
> I get the following AssertionError with a simple FOP config as follows:
> {code:java}
> http://www.w3.org/2001/XMLSchema-instance;
>  
> xsi:noNamespaceSchemaLocation="http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd?view=co;>
> 
> 
> 
> 
> null
> 
> 
> 
> flate
> ascii-85
> 
> 
> 
> /Users/abc/uploads/fonts
> 
> 
> 
> 
> 
> /Users/abc/uploads/fonts
> 
>  {code}
> The font, which violates the assertion in DeviceTable is:
> *[file:/System/Library/Fonts/SFArabic.ttf*|file:///System/Library/Fonts/SFArabic.ttf*]
>  
> *Stacktrace:*
> {code:java}
> java.lang.AssertionError at 
> org.apache.fop.complexscripts.fonts.GlyphPositioningTable$DeviceTable.(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.setu

[jira] [Commented] (FOP-3062) AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf

2022-04-08 Thread Richard Zowalla (Jira)


[ 
https://issues.apache.org/jira/browse/FOP-3062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17519752#comment-17519752
 ] 

Richard Zowalla commented on FOP-3062:
--

A possible fix / solution / workaround would (maybe - I was just looking at the 
code) probably be:

1. Pass "useAdvanced" as a new parameter to FontInfoFinder#find(...). To avoid 
breaking the API, we could do something like:

 
{code:java}
 public EmbedFontInfo[] find(URI fontURI, InternalResourceResolver 
resourceResolver, FontCache fontCache) {
  return find(fontURI, resourceResolver, fontCache);
 }
 
 public EmbedFontInfo[] find(URI fontURI, InternalResourceResolver 
resourceResolver, FontCache fontCache, boolean useAdvanced) {
  ...
 }
 {code}
 
 2. Add a boolean property for "useAdvanced" to the FontManager (?) to 
propagate to the FontFinderInfo / FontAdder.
  
Note: If "complexScriptFeaturues" has the same meaning ie is semantically equal 
to "useAdvanced" in FontInfoFinder, we would need to make sure, that this 
property is passed to the FontManager (after being set via XML or 
programmatically). Something like [^propagate_use_advanced.patch] 

 

Btw. the same holds for "useKerning", which is set to "true" by default in 
find(...). Shouldn't that be a parameter to, which is passed from the font 
manager to the find(...) method?

Wdyt? 

> AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf
> -
>
> Key: FOP-3062
> URL: https://issues.apache.org/jira/browse/FOP-3062
> Project: FOP
>  Issue Type: Bug
>      Components: unqualified
>Affects Versions: 2.7
>Reporter: Richard Zowalla
>Priority: Major
> Attachments: SFArabic.ttf, image-2022-04-08-16-09-21-254.png, 
> propagate_use_advanced.patch
>
>
> While working on a M1 Mac OS system:
>  
> {code:java}
> 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"{code}
> I get the following AssertionError with a simple FOP config as follows:
> {code:java}
> http://www.w3.org/2001/XMLSchema-instance;
>  
> xsi:noNamespaceSchemaLocation="http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd?view=co;>
> 
> 
> 
> 
> null
> 
> 
> 
> flate
> ascii-85
> 
> 
> 
> /Users/abc/uploads/fonts
> 
> 
> 
> 
> 
> /Users/abc/uploads/fonts
> 
>  {code}
> The font, which violates the assertion in DeviceTable is:
> *[file:/System/Library/Fonts/SFArabic.ttf*|file:///System/Library/Fonts/SFArabic.ttf*]
>  
> *Stacktrace:*
> {code:java}
> java.lang.AssertionError at 
> org.apache.fop.complexscripts.fonts.GlyphPositioningTable$DeviceTable.(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(OTFAdvancedTypographic

[jira] [Created] (FOP-3062) AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf

2022-04-08 Thread Richard Zowalla (Jira)
Richard Zowalla created FOP-3062:


 Summary: AssertionError in GlyphPositioningTable$DeviceTable with 
SFArabic.ttf
 Key: FOP-3062
 URL: https://issues.apache.org/jira/browse/FOP-3062
 Project: FOP
  Issue Type: Bug
  Components: unqualified
Affects Versions: 2.7
Reporter: Richard Zowalla


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-8OS name: "mac os x", version: "12.3", arch: 
"aarch64", family: "mac"
I get the following AssertionError with a simple FOP config as follows:
{code:java}
http://www.w3.org/2001/XMLSchema-instance" 
xsi:noNamespaceSchemaLocation="http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd?view=co;>
  

     

        

         
 
   null  
  
     
       flate
    
ascii-85  
  

        
        
/Users/abc//uploads/fonts      

      

       
     
/Users/abc//uploads/fonts 
 

{code}
The font, which violates the assertion in DeviceTable is:

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

 

*Stacktrace:*
java.lang.AssertionErrorat 
org.apache.fop.complexscripts.fonts.GlyphPositioningTable$DeviceTable.(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.(RenderPagesModel.java:75)   
 at 
org.apache.fop.area.AreaTreeHandler.setupModel(AreaTreeHandler.java:135)
 at org.apache.fop.area.AreaTreeHandler.(AreaTreeHandler.java:105)
 at 
org.apache.fop.render.RendererFactory.createFOEventHandler(RendererFactory.java:363)
 at org.apache.fop.fo.FOTreeBuilder.(FOTreeBuilder.java:109)  
 at org.

[jira] [Updated] (FOP-3062) AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf

2022-04-08 Thread Richard Zowalla (Jira)


 [ 
https://issues.apache.org/jira/browse/FOP-3062?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Richard Zowalla updated FOP-3062:
-
Description: 
While working on a M1 Mac OS system:

 
{code:java}
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"{code}
I get the following AssertionError with a simple FOP config as follows:
{code:java}
http://www.w3.org/2001/XMLSchema-instance" 
xsi:noNamespaceSchemaLocation="http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd?view=co;>
  

     

        

         
 
   null  
  
     
       flate
    
ascii-85  
  

        
        
/Users/abc/uploads/fonts      

      

       
     
/Users/abc/uploads/fonts 
 

{code}
The font, which violates the assertion in DeviceTable is:

*[file:/System/Library/Fonts/SFArabic.ttf*|file:///System/Library/Fonts/SFArabic.ttf*]

 

*Stacktrace:*
{code:java}
java.lang.AssertionError at 
org.apache.fop.complexscripts.fonts.GlyphPositioningTable$DeviceTable.(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.(RenderPagesModel.java:75) at 
org.apache.fop.area.AreaTreeHandler.setupModel(AreaTreeHandler.java:135) at 
org.apache.fop.area.AreaTreeHandler.(AreaTreeHandler.java:105) at 
org.apache.fop.render.RendererFactory.createFOEventHandler(RendererFactory.java:363)
 at org.apache.fop.fo.FOTreeBuilder.(FOTreeBuilder.java:109) at 
org.apache.fop.apps.Fop.createDefaultHandler(Fop.java:104) at 
org.apache.fop.apps.Fop.(Fop.java:78) at 
org.apache.fop.apps.FOUserAgent.newFop(FOUserAgent.java:184) at 
org.apache.fop.apps.FopFactory.newFop(FopFactory.java:234){code}

  was:
While working on a M1 Mac OS system:

 
{code:java}
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"

[jira] [Updated] (FOP-3062) AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf

2022-04-08 Thread Richard Zowalla (Jira)


 [ 
https://issues.apache.org/jira/browse/FOP-3062?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Richard Zowalla updated FOP-3062:
-
Description: 
While working on a M1 Mac OS system:

 
{code:java}
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"{code}
I get the following AssertionError with a simple FOP config as follows:
{code:java}
http://www.w3.org/2001/XMLSchema-instance;
 
xsi:noNamespaceSchemaLocation="http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd?view=co;>







null



flate
ascii-85




/Users/abc/uploads/fonts






/Users/abc/uploads/fonts

 {code}
The font, which violates the assertion in DeviceTable is:

*[file:/System/Library/Fonts/SFArabic.ttf*|file:///System/Library/Fonts/SFArabic.ttf*]

 

*Stacktrace:*
{code:java}
java.lang.AssertionError at 
org.apache.fop.complexscripts.fonts.GlyphPositioningTable$DeviceTable.(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.(RenderPagesModel.java:75) at 
org.apache.fop.area.AreaTreeHandler.setupModel(AreaTreeHandler.java:135) at 
org.apache.fop.area.AreaTreeHandler.(AreaTreeHandler.java:105) at 
org.apache.fop.render.RendererFactory.createFOEventHandler(RendererFactory.java:363)
 at org.apache.fop.fo.FOTreeBuilder.(FOTreeBuilder.java:109) at 
org.apache.fop.apps.Fop.createDefaultHandler(Fop.java:104) at 
org.apache.fop.apps.Fop.(Fop.java:78) at 
org.apache.fop.apps.FOUserAgent.newFop(FOUserAgent.java:184) at 
org.apache.fop.apps.FopFactory.newFop(FopFactory.java:234){code}

  was:
While working on a M1 Mac OS system:

 
{code:java}
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", f

[jira] [Commented] (FOP-3062) AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf

2022-04-08 Thread Richard Zowalla (Jira)


[ 
https://issues.apache.org/jira/browse/FOP-3062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17519455#comment-17519455
 ] 

Richard Zowalla commented on FOP-3062:
--

This is a developer machine. We are starting TomEE Maven Plugin, which has 
Assertions enabled by default ;) (and it cannot be disabled easily...) but 
would also impact unit tests, which are using assertions.

> AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf
> -
>
> Key: FOP-3062
> URL: https://issues.apache.org/jira/browse/FOP-3062
> Project: FOP
>  Issue Type: Bug
>  Components: unqualified
>Affects Versions: 2.7
>Reporter: Richard Zowalla
>Priority: Major
>
> While working on a M1 Mac OS system:
>  
> {code:java}
> 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"{code}
> I get the following AssertionError with a simple FOP config as follows:
> {code:java}
> http://www.w3.org/2001/XMLSchema-instance;
>  
> xsi:noNamespaceSchemaLocation="http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd?view=co;>
> 
> 
> 
> 
> null
> 
> 
> 
> flate
> ascii-85
> 
> 
> 
> /Users/abc/uploads/fonts
> 
> 
> 
> 
> 
> /Users/abc/uploads/fonts
> 
>  {code}
> The font, which violates the assertion in DeviceTable is:
> *[file:/System/Library/Fonts/SFArabic.ttf*|file:///System/Library/Fonts/SFArabic.ttf*]
>  
> *Stacktrace:*
> {code:java}
> java.lang.AssertionError at 
> org.apache.fop.complexscripts.fonts.GlyphPositioningTable$DeviceTable.(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:

[jira] [Comment Edited] (FOP-3062) AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf

2022-04-08 Thread Richard Zowalla (Jira)


[ 
https://issues.apache.org/jira/browse/FOP-3062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17519455#comment-17519455
 ] 

Richard Zowalla edited comment on FOP-3062 at 4/8/22 9:24 AM:
--

This is a developer machine. We are starting TomEE Maven Plugin, which has 
Assertions enabled by default ;) (and it cannot be disabled easily...) but 
would also impact unit tests, which are using assertions.

I am even not capable of removing / moving this specific Apple system font 
away, so auto detection will always fail with this assertion error in a dev 
setup.


was (Author: rzo1):
This is a developer machine. We are starting TomEE Maven Plugin, which has 
Assertions enabled by default ;) (and it cannot be disabled easily...) but 
would also impact unit tests, which are using assertions.

> AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf
> -
>
> Key: FOP-3062
> URL: https://issues.apache.org/jira/browse/FOP-3062
> Project: FOP
>  Issue Type: Bug
>  Components: unqualified
>Affects Versions: 2.7
>Reporter: Richard Zowalla
>Priority: Major
>
> While working on a M1 Mac OS system:
>  
> {code:java}
> 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"{code}
> I get the following AssertionError with a simple FOP config as follows:
> {code:java}
> http://www.w3.org/2001/XMLSchema-instance;
>  
> xsi:noNamespaceSchemaLocation="http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd?view=co;>
> 
> 
> 
> 
> null
> 
> 
> 
> flate
> ascii-85
> 
> 
> 
> /Users/abc/uploads/fonts
> 
> 
> 
> 
> 
> /Users/abc/uploads/fonts
> 
>  {code}
> The font, which violates the assertion in DeviceTable is:
> *[file:/System/Library/Fonts/SFArabic.ttf*|file:///System/Library/Fonts/SFArabic.ttf*]
>  
> *Stacktrace:*
> {code:java}
> java.lang.AssertionError at 
> org.apache.fop.complexscripts.fonts.GlyphPositioningTable$DeviceTable.(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$DefaultFont

[jira] [Comment Edited] (FOP-3062) AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf

2022-04-08 Thread Richard Zowalla (Jira)


[ 
https://issues.apache.org/jira/browse/FOP-3062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17519461#comment-17519461
 ] 

Richard Zowalla edited comment on FOP-3062 at 4/8/22 9:29 AM:
--

>From a Mac OS 12.3: [^SFArabic.ttf]


Or: https://developer.apple.com/fonts/


was (Author: rzo1):
>From a Mac OS 12.3: [^SFArabic.ttf]

> AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf
> -
>
> Key: FOP-3062
> URL: https://issues.apache.org/jira/browse/FOP-3062
> Project: FOP
>  Issue Type: Bug
>  Components: unqualified
>Affects Versions: 2.7
>Reporter: Richard Zowalla
>Priority: Major
> Attachments: SFArabic.ttf
>
>
> While working on a M1 Mac OS system:
>  
> {code:java}
> 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"{code}
> I get the following AssertionError with a simple FOP config as follows:
> {code:java}
> http://www.w3.org/2001/XMLSchema-instance;
>  
> xsi:noNamespaceSchemaLocation="http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd?view=co;>
> 
> 
> 
> 
> null
> 
> 
> 
> flate
> ascii-85
> 
> 
> 
> /Users/abc/uploads/fonts
> 
> 
> 
> 
> 
> /Users/abc/uploads/fonts
> 
>  {code}
> The font, which violates the assertion in DeviceTable is:
> *[file:/System/Library/Fonts/SFArabic.ttf*|file:///System/Library/Fonts/SFArabic.ttf*]
>  
> *Stacktrace:*
> {code:java}
> java.lang.AssertionError at 
> org.apache.fop.complexscripts.fonts.GlyphPositioningTable$DeviceTable.(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.setupFon

[jira] [Updated] (FOP-3062) AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf

2022-04-08 Thread Richard Zowalla (Jira)


 [ 
https://issues.apache.org/jira/browse/FOP-3062?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Richard Zowalla updated FOP-3062:
-
Description: 
While working on a M1 Mac OS system:

 
{code:java}
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"{code}
I get the following AssertionError with a simple FOP config as follows:
{code:java}
http://www.w3.org/2001/XMLSchema-instance" 
xsi:noNamespaceSchemaLocation="http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd?view=co;>
  

     

        

         
 
   null  
  
     
       flate
    
ascii-85  
  

        
        
/Users/abc//uploads/fonts      

      

       
     
/Users/abc//uploads/fonts 
 

{code}
The font, which violates the assertion in DeviceTable is:

*[file:/System/Library/Fonts/SFArabic.ttf*|file:///System/Library/Fonts/SFArabic.ttf*]

 

*Stacktrace:*
{code:java}
java.lang.AssertionError at 
org.apache.fop.complexscripts.fonts.GlyphPositioningTable$DeviceTable.(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.(RenderPagesModel.java:75) at 
org.apache.fop.area.AreaTreeHandler.setupModel(AreaTreeHandler.java:135) at 
org.apache.fop.area.AreaTreeHandler.(AreaTreeHandler.java:105) at 
org.apache.fop.render.RendererFactory.createFOEventHandler(RendererFactory.java:363)
 at org.apache.fop.fo.FOTreeBuilder.(FOTreeBuilder.java:109) at 
org.apache.fop.apps.Fop.createDefaultHandler(Fop.java:104) at 
org.apache.fop.apps.Fop.(Fop.java:78) at 
org.apache.fop.apps.FOUserAgent.newFop(FOUserAgent.java:184) at 
org.apache.fop.apps.FopFactory.newFop(FopFactory.java:234){code}

  was:
While working on a M1 Mac OS system:

 
{code:java}
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",

[jira] [Updated] (FOP-3062) AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf

2022-04-08 Thread Richard Zowalla (Jira)


 [ 
https://issues.apache.org/jira/browse/FOP-3062?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Richard Zowalla updated FOP-3062:
-
Description: 
While working on a M1 Mac OS system:

 
{code:java}
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"{code}

I get the following AssertionError with a simple FOP config as follows:
{code:java}
http://www.w3.org/2001/XMLSchema-instance" 
xsi:noNamespaceSchemaLocation="http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd?view=co;>
  

     

        

         
 
   null  
  
     
       flate
    
ascii-85  
  

        
        
/Users/abc//uploads/fonts      

      

       
     
/Users/abc//uploads/fonts 
 

{code}
The font, which violates the assertion in DeviceTable is:

*[file:/System/Library/Fonts/SFArabic.ttf*|file:///System/Library/Fonts/SFArabic.ttf*]

 

*Stacktrace:*
java.lang.AssertionError at 
org.apache.fop.complexscripts.fonts.GlyphPositioningTable$DeviceTable.(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.(RenderPagesModel.java:75) at 
org.apache.fop.area.AreaTreeHandler.setupModel(AreaTreeHandler.java:135) at 
org.apache.fop.area.AreaTreeHandler.(AreaTreeHandler.java:105) at 
org.apache.fop.render.RendererFactory.createFOEventHandler(RendererFactory.java:363)
 at org.apache.fop.fo.FOTreeBuilder.(FOTreeBuilder.java:109) at 
org.apache.fop.apps.Fop.createDefaultHandler(Fop.java:104) at 
org.apache.fop.apps.Fop.(Fop.java:78) at 
org.apache.fop.apps.FOUserAgent.newFop(FOUserAgent.java:184) at 
org.apache.fop.apps.FopFactory.newFop(FopFactory.java:234)

  was:
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-8OS name: "mac os x", version: "12.3", arch: 
"aarch64", f

[jira] [Updated] (FOP-3062) AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf

2022-04-08 Thread Richard Zowalla (Jira)


 [ 
https://issues.apache.org/jira/browse/FOP-3062?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Richard Zowalla updated FOP-3062:
-
Attachment: SFArabic.ttf

> AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf
> -
>
> Key: FOP-3062
> URL: https://issues.apache.org/jira/browse/FOP-3062
> Project: FOP
>  Issue Type: Bug
>  Components: unqualified
>Affects Versions: 2.7
>Reporter: Richard Zowalla
>Priority: Major
> Attachments: SFArabic.ttf
>
>
> While working on a M1 Mac OS system:
>  
> {code:java}
> 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"{code}
> I get the following AssertionError with a simple FOP config as follows:
> {code:java}
> http://www.w3.org/2001/XMLSchema-instance;
>  
> xsi:noNamespaceSchemaLocation="http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd?view=co;>
> 
> 
> 
> 
> null
> 
> 
> 
> flate
> ascii-85
> 
> 
> 
> /Users/abc/uploads/fonts
> 
> 
> 
> 
> 
> /Users/abc/uploads/fonts
> 
>  {code}
> The font, which violates the assertion in DeviceTable is:
> *[file:/System/Library/Fonts/SFArabic.ttf*|file:///System/Library/Fonts/SFArabic.ttf*]
>  
> *Stacktrace:*
> {code:java}
> java.lang.AssertionError at 
> org.apache.fop.complexscripts.fonts.GlyphPositioningTable$DeviceTable.(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(I

[jira] [Commented] (FOP-3062) AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf

2022-04-08 Thread Richard Zowalla (Jira)


[ 
https://issues.apache.org/jira/browse/FOP-3062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17519461#comment-17519461
 ] 

Richard Zowalla commented on FOP-3062:
--

>From a Mac OS 12.3: [^SFArabic.ttf]

> AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf
> -
>
> Key: FOP-3062
> URL: https://issues.apache.org/jira/browse/FOP-3062
> Project: FOP
>  Issue Type: Bug
>  Components: unqualified
>Affects Versions: 2.7
>Reporter: Richard Zowalla
>Priority: Major
> Attachments: SFArabic.ttf
>
>
> While working on a M1 Mac OS system:
>  
> {code:java}
> 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"{code}
> I get the following AssertionError with a simple FOP config as follows:
> {code:java}
> http://www.w3.org/2001/XMLSchema-instance;
>  
> xsi:noNamespaceSchemaLocation="http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd?view=co;>
> 
> 
> 
> 
> null
> 
> 
> 
> flate
> ascii-85
> 
> 
> 
> /Users/abc/uploads/fonts
> 
> 
> 
> 
> 
> /Users/abc/uploads/fonts
> 
>  {code}
> The font, which violates the assertion in DeviceTable is:
> *[file:/System/Library/Fonts/SFArabic.ttf*|file:///System/Library/Fonts/SFArabic.ttf*]
>  
> *Stacktrace:*
> {code:java}
> java.lang.AssertionError at 
> org.apache.fop.complexscripts.fonts.GlyphPositioningTable$DeviceTable.(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.intermediat

[jira] [Commented] (FOP-3062) AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf

2022-04-08 Thread Richard Zowalla (Jira)


[ 
https://issues.apache.org/jira/browse/FOP-3062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17519603#comment-17519603
 ] 

Richard Zowalla commented on FOP-3062:
--

Thanks for your reply - your help is very much appreciated! :)

I applied the the part of the documentation above by using
fopBuilder.setComplexScriptFeatures(false); 
as FOUserAgent does not have this method as suggerated by the docs *and* via 
the XML config. The value is set for the given factory configuration (as shown 
in the screenshot) above.

If I am looking into the stacktrace and navigate to  [line 
170|https://github.com/apache/xmlgraphics-fop/blame/1c35037f340df7ad112da5af646c878d2cf927c9/fop-core/src/main/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java#L170]
{code:java}
FontInfoFinder#find(URI fontURI, InternalResourceResolver resourceResolver, 
FontCache fontCache)
{code}
*useAdvanced* is set to true (by default) and is then passed to the font loader 
(and so on). I didn't see an override for this flag (based on the given config).

Basically, I am wondering, why the FontInfoFinder doesn't honour this setting 
specified by the factory? 

> AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf
> -
>
> Key: FOP-3062
> URL: https://issues.apache.org/jira/browse/FOP-3062
> Project: FOP
>  Issue Type: Bug
>  Components: unqualified
>Affects Versions: 2.7
>Reporter: Richard Zowalla
>Priority: Major
> Attachments: SFArabic.ttf, image-2022-04-08-16-09-21-254.png
>
>
> While working on a M1 Mac OS system:
>  
> {code:java}
> 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"{code}
> I get the following AssertionError with a simple FOP config as follows:
> {code:java}
> http://www.w3.org/2001/XMLSchema-instance;
>  
> xsi:noNamespaceSchemaLocation="http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd?view=co;>
> 
> 
> 
> 
> null
> 
> 
> 
> flate
> ascii-85
> 
> 
> 
> /Users/abc/uploads/fonts
> 
> 
> 
> 
> 
> /Users/abc/uploads/fonts
> 
>  {code}
> The font, which violates the assertion in DeviceTable is:
> *[file:/System/Library/Fonts/SFArabic.ttf*|file:///System/Library/Fonts/SFArabic.ttf*]
>  
> *Stacktrace:*
> {code:java}
> java.lang.AssertionError at 
> org.apache.fop.complexscripts.fonts.GlyphPositioningTable$DeviceTable.(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 
>

[jira] [Updated] (FOP-3062) AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf

2022-04-08 Thread Richard Zowalla (Jira)


 [ 
https://issues.apache.org/jira/browse/FOP-3062?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Richard Zowalla updated FOP-3062:
-
Attachment: image-2022-04-08-16-09-21-254.png

> AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf
> -
>
> Key: FOP-3062
> URL: https://issues.apache.org/jira/browse/FOP-3062
> Project: FOP
>  Issue Type: Bug
>  Components: unqualified
>Affects Versions: 2.7
>Reporter: Richard Zowalla
>Priority: Major
> Attachments: SFArabic.ttf, image-2022-04-08-16-09-21-254.png
>
>
> While working on a M1 Mac OS system:
>  
> {code:java}
> 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"{code}
> I get the following AssertionError with a simple FOP config as follows:
> {code:java}
> http://www.w3.org/2001/XMLSchema-instance;
>  
> xsi:noNamespaceSchemaLocation="http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd?view=co;>
> 
> 
> 
> 
> null
> 
> 
> 
> flate
> ascii-85
> 
> 
> 
> /Users/abc/uploads/fonts
> 
> 
> 
> 
> 
> /Users/abc/uploads/fonts
> 
>  {code}
> The font, which violates the assertion in DeviceTable is:
> *[file:/System/Library/Fonts/SFArabic.ttf*|file:///System/Library/Fonts/SFArabic.ttf*]
>  
> *Stacktrace:*
> {code:java}
> java.lang.AssertionError at 
> org.apache.fop.complexscripts.fonts.GlyphPositioningTable$DeviceTable.(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.setupFo

[jira] [Commented] (FOP-3062) AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf

2022-04-08 Thread Richard Zowalla (Jira)


[ 
https://issues.apache.org/jira/browse/FOP-3062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17519587#comment-17519587
 ] 

Richard Zowalla commented on FOP-3062:
--

Tried disabling via
{code:java}
fopBuilder.setComplexScriptFeatures(false); {code}
and via 
{code:java}
   {code}
but that led to the same exception. I debugged into the FopFactory and the 
value is set:

!image-2022-04-08-16-09-21-254.png!

> AssertionError in GlyphPositioningTable$DeviceTable with SFArabic.ttf
> -
>
> Key: FOP-3062
> URL: https://issues.apache.org/jira/browse/FOP-3062
> Project: FOP
>  Issue Type: Bug
>  Components: unqualified
>Affects Versions: 2.7
>Reporter: Richard Zowalla
>Priority: Major
> Attachments: SFArabic.ttf, image-2022-04-08-16-09-21-254.png
>
>
> While working on a M1 Mac OS system:
>  
> {code:java}
> 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"{code}
> I get the following AssertionError with a simple FOP config as follows:
> {code:java}
> http://www.w3.org/2001/XMLSchema-instance;
>  
> xsi:noNamespaceSchemaLocation="http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd?view=co;>
> 
> 
> 
> 
> null
> 
> 
> 
> flate
> ascii-85
> 
> 
> 
> /Users/abc/uploads/fonts
> 
> 
> 
> 
> 
> /Users/abc/uploads/fonts
> 
>  {code}
> The font, which violates the assertion in DeviceTable is:
> *[file:/System/Library/Fonts/SFArabic.ttf*|file:///System/Library/Fonts/SFArabic.ttf*]
>  
> *Stacktrace:*
> {code:java}
> java.lang.AssertionError at 
> org.apache.fop.complexscripts.fonts.GlyphPositioningTable$DeviceTable.(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:14

fo:basic-link elements generate links with default alt text

2022-08-31 Thread Richard Cohen via fop-dev
Hi,

When we generate PDFs with PDF/UA-1 enabled (as specified in the fop.xconf 
file),  elements generate  tags in the PDF with alt text 
automatically set to "No alternate text specified." This causes 508 compliance 
issues since screen readers read this alt text instead of the specified link 
text. We're wondering why  elements are treated this way since 
there should be no need for alternate text if the link text is sufficiently 
descriptive. We can work around this by specifying the desired link text in the 
fox:alt-text attribute of the  element, but it was our 
understanding that the fox:alt-text attribute was intended for non-text 
elements such as images.

Thanks,

Rich Cohen
Technical Writer III, Availity Learning
Availity | 510 E. 96th St. Ste 400, Indianapolis IN 46240
P 317.814.6804 | C 317.654.5816
richard.co...@availity.com

[00 AV Logo RGB]







The information contained in this e-mail may be privileged and confidential 
under applicable law. It is intended solely for the use of the person or firm 
named above. If the reader of this e-mail is not the intended recipient, please 
notify us immediately by returning the e-mail to the originating e-mail 
address. Availity, LLC is not responsible for errors or omissions in this 
e-mail message. Any personal comments made in this e-mail do not reflect the 
views of Availity, LLC..