Re: [xep-support] embedding fonts in PDF -- adding embed="true" seems not to work for base fonts!

From: Ron Catterall <ron@catterall.net>
Date: Mon Mar 13 2006 - 12:41:43 PST

Patrick

This my (limited) experience with XEP 4.4 and Saxon 6.5.4 I've only
just joined this mailing list, so I didn't see your earlier post. I
only downloaded XEP 4.5 yesterday, so I haven't tried that yet, but
it ought to work just the same (I hope!)

1. In your XSL customization layer you need to activate the XEP extensions with

<!-- activate XEP extensions -->
<xsl:param name="xep.extensions" select ="1" />

2. Then you need a file XEPconfig.xml in the same directory as your
other files containing

<font-family name="Cardo" embed="true">
<font><font-data ttf="/Library/fonts/Cardo98s.ttf" /></font>
</font-family>

You need to specify the family name of the font you want, and where
the font is in your own filestore of course. You will probably have
other stuff in the XEPconfig file.

3. using Saxon 6.5.4 you need the parameter
body.font.family set to 'Cardo' (in my case)

4. There is also the parameter
title.font.family which can be set separately (i.e. use different
fonts for titles and body. These are both probably set to
'Sans-serif' by default.)

The fonts are then applied and visible when read with Adobe Reader 7.0.7

I suspect your problem is the Saxon parameter is missing - or
whatever is appropriate for your system - but if you get the font
family name wrong XEP4.4 doesn't complain and just drops back to the
default font.

Some fonts do not allow embedding, and XEP respects that prohibition.
I've no idea whether that applies to Helvetica.

Regards

Ron

>In an earlier post I asked about embedding the Helvetica font into a
>pdf document I'm creating with XEP 4.5.
>
>No one responded to this, most likely because it was a simple case
>of RTFM. Or maybe not? In the xep.xml I both changed the attribute
>in the font group:
>
> <!-- Base Adobe fonts. -->
> <font-group label="Base 14" embed="true">
>
>and in the Helvetica <font-family> tag:
>
> <font-family name="Helvetica" embed="true" subset="true">
> <font><font-data afm="Helvetica.afm"/></font>
> <font style="oblique">
> <font-data afm="Helvetica-Oblique.afm"/></font>
> <font weight="bold"><font-data afm="Helvetica-Bold.afm"/></font>
> <font weight="bold" style="oblique">
> <font-data afm="Helvetica-BoldOblique.afm"/></font>
> </font-family>
>
>
>but the font is still not being embedded! When I pull up the
>document on my Windows machine using Acrobat reader 7.0x and look at
>File->Document Properties->Fonts, the ArialMT font is substituted
>instead.
>
>Any idea what is going on? The font is only being used in the ruler
>function for line numbering, if this matters.
>
>As an aside, I'm not even sure how the ruler font changed from the
>document default, Garamond, to the xep.xml default, Helvetica;
>however I'm aware that ruler comes with no support, so this is more
>a matter of curiosity than anything else.
>-------------------
>(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
>in the body of the message to majordomo@renderx.com from the address
>you are subscribed from.
>(*) By using the Service, you expressly agree to these Terms of
>Service http://www.renderx.com/terms-of-service.html

-- 
Ron Catterall, Phd, DSc				email: ron@catterall.net
Prolongacion de Hidalgo 140				http://catterall.net/
San Felipe del Agua					tel: +52 951 520 1821
Oaxaca      68020	Mexico				fax: +1 530 348 8309
-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html
Received on Mon Mar 13 13:11:12 2006

This archive was generated by hypermail 2.1.8 : Mon Mar 13 2006 - 13:11:13 PST