Return-Path: Delivered-To: apmail-xmlgraphics-commits-archive@www.apache.org Received: (qmail 23784 invoked from network); 4 Jun 2008 06:18:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Jun 2008 06:18:45 -0000 Received: (qmail 51152 invoked by uid 500); 4 Jun 2008 06:18:48 -0000 Mailing-List: contact commits-help@xmlgraphics.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: general@xmlgraphics.apache.org Delivered-To: mailing list commits@xmlgraphics.apache.org Received: (qmail 51138 invoked by uid 500); 4 Jun 2008 06:18:48 -0000 Delivered-To: apmail-xmlgraphics-site-commits@xmlgraphics.apache.org Received: (qmail 51135 invoked by uid 99); 4 Jun 2008 06:18:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jun 2008 23:18:48 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jun 2008 06:17:48 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id AE6642388A8D; Tue, 3 Jun 2008 23:17:38 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r662995 [8/8] - in /xmlgraphics/site/deploy/fop: ./ 0.94/ 0.95/ dev/ dev/design/ dev/fo/ dev/svg/ fo/ skin/ trunk/ Date: Wed, 04 Jun 2008 06:17:24 -0000 To: site-commits@xmlgraphics.apache.org From: jeremias@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080604061738.AE6642388A8D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: xmlgraphics/site/deploy/fop/trunk/fonts.xml URL: http://svn.apache.org/viewvc/xmlgraphics/site/deploy/fop/trunk/fonts.xml?rev=662995&r1=662994&r2=662995&view=diff ============================================================================== --- xmlgraphics/site/deploy/fop/trunk/fonts.xml (original) +++ xmlgraphics/site/deploy/fop/trunk/fonts.xml Tue Jun 3 23:17:16 2008 @@ -17,7 +17,7 @@
Apache FOP: Fonts - $Revision: 638048 $ + $Revision: 661310 $ @@ -93,14 +93,14 @@ yes (used for layout but not for output) no - - - C:\MyFonts1 + + + + + C:\MyFonts1 - - C:\MyFonts2 + + C:\MyFonts2 - - -]]> + + + + +]]> Review the documentation for FOP Configuration for instructions on making the FOP configuration available to FOP when it runs. @@ -216,7 +219,6 @@ not possible to easily configure fonts from Java code. -
Advanced font configuration

@@ -305,28 +307,35 @@ +

+ Alternatively, the individual sub-fonts of a TrueType Collections can be selected + using the "sub-font" attribute on the "font" element. That means that generating + an XML font metrics file for TrueType collections is not necessary anymore. +

Register Fonts with FOP

You must tell FOP how to find and use the font metrics files by registering them in the FOP Configuration. Add entries for your custom fonts, regardless of font type, to the configuration file in a manner similar to the following:

- - - - + + + + + + + - - C:\MyFonts1 + + C:\MyFonts1 - - C:\MyFonts2 + + C:\MyFonts2 - - -]]> + + + + +]]>
  • URLs are used to access the font metric and font files. @@ -348,10 +357,10 @@ relative to the base directory.
- +
- Auto-Detect and auto-embedd feature + Auto-Detect and auto-embed feature

When the "auto-detect" flag is set in the configuration, FOP will automatically search for fonts in the default paths for your operating system.

FOP will also auto-detect fonts which are available in the classpath, if they are described as "application/x-font" in the MANIFEST.MF file. For example, if your .jar file contains font/myfont.ttf:

Embedding - The PostScript renderer does not yet support TrueType fonts, but can embed Type 1 fonts. - The font is simply embedded into the PDF file, it is not converted. -

Font embedding is enabled in the userconfig.xml file and controlled by the embed-url attribute. - If you don't specify the embed-url attribute the font will not be embedded, but will only be referenced.

- - Omitting the embed-url attribute for CID-encoded TrueType fonts will currently produce invalid - PDF files! If you create the XML font metric file using the "-enc ansi" option, you can omit - the embed-url attribute for TrueType fonts but you're restricted to the WinAnsi character set. - -

When FOP embeds a font, it adds a prefix to the fontname to ensure that the name will not match the fontname of an installed font. - This is helpful with older versions of Acrobat Reader that preferred installed fonts over embedded fonts.

-

When embedding PostScript fonts, the entire font is always embedded.

-

When embedding TrueType fonts (ttf) or TrueType Collections (ttc), a subset of the - original font, containing only the glyphs used, is embedded in the output document.

+

+ By default, all fonts are embedded if an output format supports font embedding. In some + cases, however, it is preferred that some fonts are only referenced. When working + with referenced fonts it is important to be in control of the target environment where + the produced document is consumed, i.e. the necessary fonts have to be installed there. +

+

+ There are two different ways how you can specify that a font should be referenced: +

+
    +
  1. + When using the old-style "font" element to configure a single font, font referencing + is controlled by the embed-url attribute. If you don't specify the embed-url attribute + the font will not be embedded, but will only be referenced. +
  2. +
  3. + For automatically configured fonts there's a different mechanism to specify which + fonts should be referenced rather than embedded. This is done in the "referenced-fonts" + element in the configuration. Here's an example: +
  4. +
+ + + + + + + +]]> +

+ At the moment, you can only match fonts against their font-family. It is possible to use + regular expressions as is shown in the second example above ("DejaVu.*"). The syntax for + the regular expressions used here are the one used by the + java.util.regex package. + So, in the above snippet "Helvetica" and all variants of the "DejaVu" font family are + referenced. If you want to reference all fonts, just specify font-family=".*". +

+

+ Various notes related to embedded fonts: +

+
    +
  • The PostScript renderer does not yet support TrueType fonts, but can embed Type 1 fonts.
  • +
  • The font is simply embedded into the PDF file, it is not converted.
  • +
  • When FOP embeds a font, it adds a prefix to the fontname to ensure that the name will not match the fontname of an installed font. + This is helpful with older versions of Acrobat Reader that preferred installed fonts over embedded fonts.
  • +
  • When embedding PostScript fonts, the entire font is always embedded.
  • +
  • When embedding TrueType fonts (ttf) or TrueType Collections (ttc), a subset of the + original font, containing only the glyphs used, is embedded in the output document.
  • +
-
+
+ Font Selection Strategies +

+ There are two font selection strategies: character-by-character or auto. The default is auto.

+

Auto selected the first font from the list which is able to display the most characters in a given word. This means (assume font A has characters for abclmn, font B for lnmxyz, fontlist is A,B):

+
    +
  • aaa lll xxx would be displayed in fonts A A B
  • +
  • aaaxx would be displayed in font A
  • +
  • aaaxxx would be displayed in font A
  • +
  • aaaxxxx would be displayed in font B
  • +
+

Character-by-Character is NOT yet supported!

+
- \ No newline at end of file + Modified: xmlgraphics/site/deploy/fop/trunk/graphics.html URL: http://svn.apache.org/viewvc/xmlgraphics/site/deploy/fop/trunk/graphics.html?rev=662995&r1=662994&r2=662995&view=diff ============================================================================== --- xmlgraphics/site/deploy/fop/trunk/graphics.html (original) +++ xmlgraphics/site/deploy/fop/trunk/graphics.html Tue Jun 3 23:17:16 2008 @@ -159,6 +159,9 @@ +
@@ -168,7 +171,7 @@ |alternative credits +-->
-ApacheCon Europe 2008 - logoApacheCon US 2008 - logo +ApacheCon US 2008 - logo
-ApacheCon Europe 2008 - logoApacheCon US 2008 - logo +ApacheCon US 2008 - logo
-ApacheCon Europe 2008 - logoApacheCon US 2008 - logo +ApacheCon US 2008 - logo
-ApacheCon Europe 2008 - logoApacheCon US 2008 - logo +ApacheCon US 2008 - logo
-ApacheCon Europe 2008 - logoApacheCon US 2008 - logo +ApacheCon US 2008 - logo
-ApacheCon Europe 2008 - logoApacheCon US 2008 - logo +ApacheCon US 2008 - logo
-ApacheCon Europe 2008 - logoApacheCon US 2008 - logo +ApacheCon US 2008 - logo
-ApacheCon Europe 2008 - logoApacheCon US 2008 - logo +ApacheCon US 2008 - logo
-ApacheCon Europe 2008 - logoApacheCon US 2008 - logo +ApacheCon US 2008 - logo
-ApacheCon Europe 2008 - logoApacheCon US 2008 - logo +ApacheCon US 2008 - logo
-ApacheCon Europe 2008 - logoApacheCon US 2008 - logo +ApacheCon US 2008 - logo