THausherr commented on PR #532:
URL: https://github.com/apache/pdfbox/pull/532#issuecomment-5890728284

   Thank you; please change GlyphHinter line 232 from " catch (IOException | 
RuntimeException e)" to "catch (IOException | HintingException e)", we want to 
know the hard way if something really nasty happens.
   
   I have looked at the test coverage, there are parts of TrueTypeInterpreter 
that aren't covered so I ran my visual tests to see if any of the missing parts 
were hit. Only two were, flipRange and NPUSHW, and only with microsoft fonts, 
e.g. with this code:
   ```
       @Test
       void testArial() throws IOException
       {
           TrueTypeFont ttf = new TTFParser().parse(new 
RandomAccessReadBufferedFile("c:/windows/fonts/arial.ttf"));
           ttf.getHintedPath(81, 13); // flipRange + NPUSHW
       }
   ```
   So we can't really test this on the CI, but locally with people who have 
windows (me). Could you add some code like this that checks that the result is 
what is expected?
   ```
       @Test
       void testArial() throws IOException
       {
           File file = new File("c:/windows/fonts/arial.ttf");
           assumeTrue(file.exists());
           TrueTypeFont ttf = new TTFParser().parse(new 
RandomAccessReadBufferedFile(file));
           GeneralPath hintedPath = ttf.getHintedPath(81, 13); // hits 
flipRange + NPUSHW
           // .... todo
       }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to