Author: tilman Date: Tue Dec 5 08:20:10 2023 New Revision: 1914350 URL: http://svn.apache.org/viewvc?rev=1914350&view=rev Log: PDFBOX-5727: use faster checksum as suggested by Gili Tzabari; add failed ttc font to cache
Modified: pdfbox/branches/3.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/FileSystemFontProvider.java Modified: pdfbox/branches/3.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/FileSystemFontProvider.java URL: http://svn.apache.org/viewvc/pdfbox/branches/3.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/FileSystemFontProvider.java?rev=1914350&r1=1914349&r2=1914350&view=diff ============================================================================== --- pdfbox/branches/3.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/FileSystemFontProvider.java (original) +++ pdfbox/branches/3.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/FileSystemFontProvider.java Tue Dec 5 08:20:10 2023 @@ -667,6 +667,7 @@ final class FileSystemFontProvider exten catch (IOException e) { LOG.warn("Could not load font file: " + ttcFile, e); + fontInfoList.add(createFSIgnored(ttcFile, FontFormat.TTF, "*skipexception*")); } } @@ -879,9 +880,9 @@ final class FileSystemFontProvider exten MessageDigest md; try { - md = MessageDigest.getInstance("SHA512"); - byte[] md5 = md.digest(ba); - return Hex.getString(md5); + md = MessageDigest.getInstance("CRC32"); + byte[] dig = md.digest(ba); + return Hex.getString(dig); } catch (NoSuchAlgorithmException ex) {