freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Freetype] Re: Suggested patch: bitmap fonts, foundry, family and fontco


From: Mike FABIAN
Subject: [Freetype] Re: Suggested patch: bitmap fonts, foundry, family and fontconfig/Xft2
Date: Wed, 09 Apr 2003 11:49:38 +0200
User-agent: Gnus/5.090014 (Oort Gnus v0.14) XEmacs/21.4 (Portable Code, x86_64-suse-linux)

Keith Packard <address@hidden> さんは書きました:

> Around 23 o'clock on Apr 8, Mike FABIAN wrote:
>
>> But apparently the bdf-property "FOUNDRY" is completely ignored by
>> both freetype and fontconfig, only the bdf-property "FAMILY_NAME" is
>> used.
>
> Fontconfig provides a 'foundry' value, but as you have noticed it isn't 
> used as FreeType doesn't provide easy access to the underlying font values.
>
> Would it be sufficient to place the foundry in this fontconfig property?

If I understand you correctly, this would mean that one
one could select the desired font for example like this:

    xterm -fa "Fixed:foundry=Misc"

But that wouldn't help for font selection dialog boxes like those in KDE3 or
Gnome2. In these font selection dialogs you can currently select only

       - family
       - size
       - style

I.e. to be able to make use of an additional fontconfig property
"foundry", these dialogs would need to be extended.

It is probably better to make the family names visible to the user in
such dialogs different for fonts which have different designs.

> Or do you really think it better to glue the foundry and the family 
> together?

I believe yes because foundry appears to be used only for bitmap
fonts. Type1 apparently don't have something like foundry.  For
example

   /usr/X11R6/lib/X11/fonts/Type1/l047016t.pfa

contains only 

    /FullName (Luxi Mono Bold) readonly def
    /FamilyName (Luxi Mono) readonly def
    /FontName /LuxiMono-Bold def

The maker of the font is in the copyright 

    /Copyright (Copyright Copyright (c) 2001 by Bigelow & Holmes Inc. 
Instructions copyright (c) 2001 by URW++.) readonly def

but there is probably no standard way to use such information.

For TrueType fonts it appears to be possible that the font
file contains something like foundry. Apple's specification
contains:

    http://developer.apple.com/fonts/TTRefMan/RM06/Chap6name.html

    Table 42: Name Identifiers
    NameID code(s)    Description
    0 Copyright notice.
    1 Font Family.
      This string is the font family name the user sees on Macintosh platforms.
    2 Font Subfamily.
      This string is the font family the user sees on Macintosh platforms.
    3 Unique subfamily identification.
    4 Full name of the font.
    5 Version of the name table.
    6 PostScript name of the font.
      Note: A font may have only one PostScript name and that name must be 
ASCII.
    7 Trademark notice.
    8 Manufacturer name.
    [...]

I.e. there could be a Manufacturer name in  the record with NameID=8.
But often there isn't. For example in case of the "Bitstream Vera Sans"
there is only

  <name>
    <namerecord nameID="0" platformID="1" platEncID="0" langID="0x0">
      Copyright 1990-2002 Bitstream Inc.  All rights reserved.
    </namerecord>
    <namerecord nameID="1" platformID="1" platEncID="0" langID="0x0">
      Bitstream Vera Sans
    </namerecord>
    <namerecord nameID="2" platformID="1" platEncID="0" langID="0x0">
      Roman
    </namerecord>
    <namerecord nameID="3" platformID="1" platEncID="0" langID="0x0">
      Bitstream Vera Sans
    </namerecord>
    <namerecord nameID="4" platformID="1" platEncID="0" langID="0x0">
      Bitstream Vera Sans Roman
    </namerecord>
    <namerecord nameID="5" platformID="1" platEncID="0" langID="0x0">
      Release 1.00
    </namerecord>
    <namerecord nameID="6" platformID="1" platEncID="0" langID="0x0">
      BitstreamVeraSans-Roman
    </namerecord>
    <namerecord nameID="0" platformID="3" platEncID="1" langID="0x409">
      Copyright 1990-2002 Bitstream Inc.  All rights reserved.
    </namerecord>
    <namerecord nameID="1" platformID="3" platEncID="1" langID="0x409">
      Bitstream Vera Sans
    </namerecord>
    <namerecord nameID="2" platformID="3" platEncID="1" langID="0x409">
      Roman
    </namerecord>
    <namerecord nameID="3" platformID="3" platEncID="1" langID="0x409">
      Bitstream Vera Sans
    </namerecord>
    <namerecord nameID="4" platformID="3" platEncID="1" langID="0x409">
      Bitstream Vera Sans Roman
    </namerecord>
    <namerecord nameID="5" platformID="3" platEncID="1" langID="0x409">
      Release 1.00
    </namerecord>
    <namerecord nameID="6" platformID="3" platEncID="1" langID="0x409">
      BitstreamVeraSans-Roman
    </namerecord>
  </name>

i.e. nameID="8" is not used here and the foundry appears to be only
encoded in other names like the family name (nameID="1"). According to
the description in the table this family name is what the user sees
and consequently should be unique.

Considering this I think it makes sense to prepend the bdf-property
FOUNDRY to the family name in case of bitmap fonts to make the family
names visible to the user sufficiently unique.

-- 
Mike Fabian   <address@hidden>   http://www.suse.de/~mfabian
睡眠不足はいい仕事の敵だ。



reply via email to

[Prev in Thread] Current Thread [Next in Thread]