freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] Preliminary support to CMap files on CID-keyed fonts.


From: 山内 英敏
Subject: Re: [Devel] Preliminary support to CMap files on CID-keyed fonts.
Date: Thu, 14 Aug 2003 21:10:26 +0900 (JST)

Hello PORTHOS,

From: PORTHOS <address@hidden>
Subject: Re: [Devel] Preliminary support to CMap files on CID-keyed fonts.
Date: Wed, 6 Aug 2003 22:19:59 +0200

> I am busy with reading PDF-Files. So called Type0-Fonts require a
> CMap-parser (as well as ToUnicode-CMaps are to be read).
> 
> I *MUST* parse the CMap myself because the Subfont may be accessed by
> a CID (embedded CFF) or a GID that is converted from the CID by a
> special array (embedded TrueType).

The CMap parser is for the t1cid driver, not for the CFF drivers.
I do not think we shuold attach any CMap files to OpenType/CFF fonts.

When you want to use CMap files with other font formats, I think
it is natual to write a code as follows.

{
  FT_New_Face( library, fontface, fontfile );
  FT_Select_Charmap( fontface, cid_charmap );

  // The following function is not imprement yet.
  FT_New_Face( library, cmapface, cmapfile );
....
  FT_Select_Charmap( cmapface, charmap );

  cid = FT_Get_Char_Index( cmapface, charcode );
  FT_Load_Char( fontface, cid );
}

> Even if I use FreeTypes CMap-Parser I need CID for a number of
> reasons (determine the glyphs width e.t.c).
> 
> So, after loading a CID-keyed-CFF-Font I am missing:
> - FT_Load_Char() works with CID instead of charcode OR
> - FT_Load_Glyph() works with CID instead of charindex OR
> - "FT_Load_CID()" is created.

I do not think is is "FT_Load_CID" shuold create.   On CID-Keyed CFF fonts,
we should create FT_CharMap to convert cid to sid.

> As fas as I know - there is no chance of loading a glyph by CID until
> now!
> 

It is a week point of the current API on FT_CharMap.  The design of
FT_CharMap is too depend on TTF.  It is better to create "FT_NewCharMapRec".

---- YAMANO-UCHI, Hidetoshi



reply via email to

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