Return-Path: X-Original-To: apmail-pdfbox-dev-archive@www.apache.org Delivered-To: apmail-pdfbox-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1CFE817DD0 for ; Sat, 22 Nov 2014 01:21:34 +0000 (UTC) Received: (qmail 66884 invoked by uid 500); 22 Nov 2014 01:21:34 -0000 Delivered-To: apmail-pdfbox-dev-archive@pdfbox.apache.org Received: (qmail 66875 invoked by uid 500); 22 Nov 2014 01:21:34 -0000 Mailing-List: contact dev-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 dev@pdfbox.apache.org Received: (qmail 66859 invoked by uid 99); 22 Nov 2014 01:21:33 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Nov 2014 01:21:33 +0000 Date: Sat, 22 Nov 2014 01:21:33 +0000 (UTC) From: "John Hewson (JIRA)" To: dev@pdfbox.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (PDFBOX-2467) "Arial,Bold" always substituted with "Helvetica-Bold" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/PDFBOX-2467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] John Hewson updated PDFBOX-2467: -------------------------------- Summary: "Arial,Bold" always substituted with "Helvetica-Bold" (was: Remove substitute logic from ExternalFonts) > "Arial,Bold" always substituted with "Helvetica-Bold" > ----------------------------------------------------- > > Key: PDFBOX-2467 > URL: https://issues.apache.org/jira/browse/PDFBOX-2467 > Project: PDFBox > Issue Type: Improvement > Affects Versions: 2.0.0 > Reporter: Cornelis Hoeflake > Assignee: John Hewson > Fix For: 2.0.0 > > Attachments: patch1.diff, patch2.diff > > > The ExternalFonts class does some substitute logic for fonts. There is a static map which holds the substitutes and is loaded in the ExternalClass file and some substitutes are got from Standards14. > Next that map also contains some substitutes for registry fonts (I don't know what it is), but it feels a bit like misusing the substitutes mechanism (with prepending a $ to omit conflicts). > As user of PDFBox I want to have the control over substitutes. For example when a PDF has font TrueType Arial,Bold (windows style), and my font provider has only a Type1 font for Arial Bold, the current mechanism returns the Helvetica Bold font True Type font (if have one in my fontprovider). > So I wrote a patch which allows you to wrap a fontprovider in a SubstituteFontProvider. That SubstituteFontProvider does the substitute logic like ExternalFonts did before. The user is in control to wrap (or let ExternalFonts wrap) his own fontprovider in the SubstituteFontProvider. > The registry fonts issue is kept in ExternalFonts and uses an own map. -- This message was sent by Atlassian JIRA (v6.3.4#6332)