You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Mark Williams <ma...@skwirel.com> on 2004/11/12 16:01:57 UTC

font weight & style

I'm writing a windows application that allows the user to convert windows
fonts for fop use using TTFReader.

Some fonts like BinnerD have no bold, italic or bolditalic font files,
others have one or more of these combinations.

Where there are specific bold, italic and bold italic files does FOP need to
have access to these or is it enough to convert the normal file and specify
different font-triplets for the same xml file eg

  <font metrics-file="Century Gothic.xml" embed-file="GOTHIC.TTF"
kerning="yes">
  <font-triplet name="Century Gothic" style="normal" weight="normal" />
  <font-triplet name="Century Gothic" style="normal" weight="bold" />
  <font-triplet name="Century Gothic" style="italic" weight="normal" />
  <font-triplet name="Century Gothic" style="italic" weight="bold" />
  </font>

I use this example because Century Gothic has a normal ttf file and also a
bolditalic ttf (but no bold or italic files).

Hope I've explained this clearly enough.

TIA

Mark Williams


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: font weight & style

Posted by Mark Williams <ma...@skwirel.com>.
Hi Andreas,

> Just for the sake of completeness:
> For those fonts that offer no bold or italic, it's always better to have
no
> specific entries in the userconfig.xml at all. That way, when the user
tries
> to use italic style or bold weight, FOP will at least warn that it is
> defaulting to normal.
>

Thanks.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


RE: font weight & style

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: Mark Williams [mailto:mark@skwirel.com]
>

Hi Mark,

> Incidentally, I did have specific font files for Century Gothic Bold and
> Century Gothic Italic, it's just that the very intelligent windows app I
> have written is deleting them after creating the font metrics file.  Uhm,
> seemed sensible at the time.

:-)

Just for the sake of completeness:
For those fonts that offer no bold or italic, it's always better to have no
specific entries in the userconfig.xml at all. That way, when the user tries
to use italic style or bold weight, FOP will at least warn that it is
defaulting to normal.

Best of luck!

Greetz,

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: font weight & style

Posted by Mark Williams <ma...@skwirel.com>.
Andreas,

Hi Andreas,

Thanks for the response all is now clear.

Incidentally, I did have specific font files for Century Gothic Bold and
Century Gothic Italic, it's just that the very intelligent windows app I
have written is deleting them after creating the font metrics file.  Uhm,
seemed sensible at the time.

Regards,

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


RE: font weight & style

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: Mark Williams [mailto:mark@skwirel.com]
>

Hi Mark,

> Regarding the example I posted of Century Gothic which has a normal font
> file and a bolditalic font file.  Would that look like this
>

That depends on what you want to achieve... AFAICT, there are also
GOTHICI.TTF and GOTHICB.TTF for the corresponding style and weight (--at
least they are present on my machine)

The first version you suggest, would lead to FOP using the metrics for
normal/normal in the following cases:

normal/normal
normal/bold
italic/normal

So, in fact, all three would lead to the same result in the output. (italic
or bold will look the same as the normal font).
Only normal/normal and italic/bold will look as they should, since you have
the appropriate metrics for them.

In the second version, the problem remains. That is, FOP will use
italic/bold metrics for:

normal/bold
italic/normal
italic/bold

So these three would all look like italic/bold.

Hope this makes it all a bit clear...

Greetz,

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: font weight & style

Posted by Mark Williams <ma...@skwirel.com>.
Andreas thanks very much for the response.

I was afraid you were going to reply as you did.  Makes my little Windows
app much more difficult!

Regarding the example I posted of Century Gothic which has a normal font
file and a bolditalic font file.  Would that look like this

  <font metrics-file="Century Gothic.xml" embed-file="GOTHIC.TTF"
kerning="yes">
  <font-triplet name="Century Gothic" style="normal" weight="normal" />
  <font-triplet name="Century Gothic" style="normal" weight="bold" />
  <font-triplet name="Century Gothic" style="italic" weight="normal" />
  </font>

  <font metrics-file="Century Gothic Bold Italic.xml"
embed-file="GOTHICBI.TTF"
kerning="yes">
  <font-triplet name="Century Gothic" style="italic" weight="bold" />
  </font>

OR

  <font metrics-file="Century Gothic.xml" embed-file="GOTHIC.TTF"
kerning="yes">
  <font-triplet name="Century Gothic" style="normal" weight="normal" />
  </font>

  <font metrics-file="Century Gothic Bold Italic.xml"
embed-file="GOTHICBI.TTF"
kerning="yes">
  <font-triplet name="Century Gothic" style="normal" weight="bold" />
  <font-triplet name="Century Gothic" style="italic" weight="normal" />
  <font-triplet name="Century Gothic" style="italic" weight="bold" />
  </font>

Thanks

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


RE: font weight & style

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: Mark Williams [mailto:mark@skwirel.com]
>

Hi Mark,

>
> Where there are specific bold, italic and bold italic files does
> FOP need to have access to these or is it enough to convert
> the normal file and specify different font-triplets for the
> same xml file

It's the first. To get accurate results, you have to generate XML metrics
files for each of them, and the entries in the userconfig.xml should look
like (example for Verdana):

<font metrics-file="fonts\ttverdana.xml" kerning="yes"
      embed-file="verdana.ttf">
  <font-triplet name="Verdana" style="normal" weight="normal"/>
</font>
<font metrics-file="fonts\ttverdanai.xml" kerning="yes"
      embed-file="verdanai.ttf">
  <font-triplet name="Verdana" style="italic" weight="normal"/>
</font>
<font metrics-file="fonts\ttverdanab.xml" kerning="yes"
      embed-file="verdanab.ttf">
  <font-triplet name="Verdana" style="normal" weight="bold"/>
</font>
<font metrics-file="fonts\ttverdanabi.xml" kerning="yes"
      embed-file="verdanaz.ttf">
  <font-triplet name="Verdana" style="italic" weight="bold"/>
</font>

Greetz,

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org