Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id EBF54200B30 for ; Mon, 4 Jul 2016 19:58:33 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id EA9DE160A65; Mon, 4 Jul 2016 17:58:33 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3E04F160A34 for ; Mon, 4 Jul 2016 19:58:33 +0200 (CEST) Received: (qmail 45161 invoked by uid 500); 4 Jul 2016 17:58:32 -0000 Mailing-List: contact commits-help@pdfbox.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pdfbox.apache.org Delivered-To: mailing list commits@pdfbox.apache.org Received: (qmail 45152 invoked by uid 99); 4 Jul 2016 17:58:32 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Jul 2016 17:58:32 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id E81921A5D80 for ; Mon, 4 Jul 2016 17:58:31 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.426 X-Spam-Level: X-Spam-Status: No, score=-0.426 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-1.426] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id SdqFB_nMLVz6 for ; Mon, 4 Jul 2016 17:58:28 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 3484A5FACE for ; Mon, 4 Jul 2016 17:58:28 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 70A8EE0016 for ; Mon, 4 Jul 2016 17:58:27 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 17A583A031D for ; Mon, 4 Jul 2016 17:58:26 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1751358 - /pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/util/autodetect/FontFileFinder.java Date: Mon, 04 Jul 2016 17:58:26 -0000 To: commits@pdfbox.apache.org From: tilman@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160704175827.17A583A031D@svn01-us-west.apache.org> archived-at: Mon, 04 Jul 2016 17:58:34 -0000 Author: tilman Date: Mon Jul 4 17:58:26 2016 New Revision: 1751358 URL: http://svn.apache.org/viewvc?rev=1751358&view=rev Log: PDFBOX-3377: exclude fonts.alias.ttf Modified: pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/util/autodetect/FontFileFinder.java Modified: pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/util/autodetect/FontFileFinder.java URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/util/autodetect/FontFileFinder.java?rev=1751358&r1=1751357&r2=1751358&view=diff ============================================================================== --- pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/util/autodetect/FontFileFinder.java (original) +++ pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/util/autodetect/FontFileFinder.java Mon Jul 4 17:58:26 2016 @@ -20,6 +20,8 @@ package org.apache.fontbox.util.autodete import java.io.File; import java.net.URI; import java.util.List; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; /** * Helps to autodetect/locate available operating system fonts. This class is based on a class provided by Apache FOP. @@ -27,6 +29,7 @@ import java.util.List; */ public class FontFileFinder { + private static final Log LOG = LogFactory.getLog(FontFileFinder.class); private FontDirFinder fontDirFinder = null; @@ -123,8 +126,16 @@ public class FontFileFinder } else { + if (LOG.isDebugEnabled()) + { + LOG.debug("checkFontfile check " + file); + } if (checkFontfile(file)) { + if (LOG.isDebugEnabled()) + { + LOG.debug("checkFontfile found " + file); + } results.add(file.toURI()); } } @@ -142,6 +153,8 @@ public class FontFileFinder private boolean checkFontfile(File file) { String name = file.getName().toLowerCase(); - return name.endsWith(".ttf") || name.endsWith(".otf") || name.endsWith(".pfb") || name.endsWith(".ttc"); + return (name.endsWith(".ttf") || name.endsWith(".otf") || name.endsWith(".pfb") || name.endsWith(".ttc")) + // PDFBOX-3377 exclude weird file in AIX + && !name.equals("fonts.alias.ttf"); } }