[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Freetype] Certain characters of pbf fonts don't render?
From: |
Jan-Åke Larsson |
Subject: |
Re: [Freetype] Certain characters of pbf fonts don't render? |
Date: |
Tue, 27 Jan 2004 12:52:37 +0100 |
User-agent: |
Mutt/1.4i |
Werner LEMBERG wrote:
> FreeType can only provide information the font offers. utmr8a.pfb
> says that it uses /StandardEncoding by default; this is what FreeType
> correctly reports. What you want is a mechanism to add a charmap to a
> font.
First of all, my comment was more directed to Joris; using
FT_ENCODING_ADOBE_CUSTOM may not always work.
Once I found out how to do it, it is not a big problem. I'm not sure
there is a real need for this in FT2.
Of course, you are right that any PostScript code might be used to
reencode the font. Fortunately, in TeX the encodings follow a specific
format [1] which I can easily parse. Once that is done it is also easy
to
FT_Get_Name_Index( face, enc_charname[c] )
> Hmm, we need a kind of FT_Define_Charmap to create a
> user-defined charmap which can be attached to a font. Any
> suggestions how such an interface could look like?
_Ideally_ one would like to load the encoding files [1]:
struct FT_CharMapRec_* FT_Load_Charmap(FT_String* encodingfile);
This would be a simple API call but probably very restricted to the
TeX case. Possibly, one would do this per-face, i.e., add a face as
argument to the above. If you do find this useful for more people than
me and actually want to implement it, you would probably
(also/instead) want to have
struct FT_CharMapRec_* FT_Init_Charmap(void);
FT_Error FT_Done_Charmap(FT_CharMapRec_* charmap);
FT_Error FT_Set_Char_Index(FT_CharMapRec_* charmap, FT_UInt charindex,
FT_UInt glyphindex);
FT_Error FT_Set_Char_Name(FT_CharMapRec_* charmap, FT_String* charname,
FT_UInt glyphindex);
These also possibly per-face.
> And is there a volunteer who wants to implement that (provided that
> we all agree that such a feature is useful)?
I would if I had the time. Unfortunately I don't. On the other hand, I
already have the functionality I need (and I would not miss this
feature overly much).
In any case I also have to parse some files to map TeX font name into
{ PostScript font name, extend factor, slant factor, encodingname },
and to find the font file and the encoding file. Adding a few lines of
code for the encoding parsing is no big deal. But (to those of you
rendering TeX output with FT2:) one should be aware that this is
needed.
Thanks,
/Jan-Åke
[1] Examples:
---------
/StandardEncoding [
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl
/numbersign /dollar /percent /ampersand /quoteright /parenleft
/parenright /asterisk /plus /comma /hyphen /period /slash
<snip>
----------
/TeXBase1Encoding [
% 0x00
/.notdef /dotaccent /fi /fl
/fraction /hungarumlaut /Lslash /lslash
/ogonek /ring /.notdef
/breve /minus /.notdef
/Zcaron /zcaron
% 0x10
/caron /dotlessi
/dotlessj /ff /ffi /ffl
/.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef
/grave /quotesingle
% 0x20 (ASCII begins)
/space /exclam /quotedbl /numbersign
/dollar /percent /ampersand /quoteright
/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash
<snip>
- [Freetype] Certain characters of pbf fonts don't render?, (continued)
- [Freetype] Certain characters of pbf fonts don't render?, Joris van der Hoeven, 2004/01/22
- Re: [Freetype] Certain characters of pbf fonts don't render?, Jan-Åke Larsson, 2004/01/23
- Re: [Freetype] Certain characters of pbf fonts don't render?, Joris van der Hoeven, 2004/01/23
- Re: [Freetype] Certain characters of pbf fonts don't render?, Joris van der Hoeven, 2004/01/23
- Re: [Freetype] Certain characters of pbf fonts don't render?, Werner LEMBERG, 2004/01/24
- Re: [Freetype] Certain characters of pbf fonts don't render?, Joris van der Hoeven, 2004/01/24
- Re: [Freetype] Certain characters of pbf fonts don't render?, Jan-Åke Larsson, 2004/01/26
- Re: [Freetype] Certain characters of pbf fonts don't render?, Werner LEMBERG, 2004/01/26
- Re: [Freetype] Certain characters of pbf fonts don't render?, Jan-Åke Larsson, 2004/01/26
- Re: [Freetype] Certain characters of pbf fonts don't render?, Werner LEMBERG, 2004/01/26
- Re: [Freetype] Certain characters of pbf fonts don't render?,
Jan-Åke Larsson <=
- Re: [Freetype] Certain characters of pbf fonts don't render?, Werner LEMBERG, 2004/01/28
- Re: [Freetype] Certain characters of pbf fonts don't render?, Werner LEMBERG, 2004/01/24