freetype-devel
[Top][All Lists]
Advanced

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

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


From: 山内 英敏
Subject: [Devel] Preliminary support to CMap files on CID-keyed fonts.
Date: Sun, 03 Aug 2003 19:50:14 +0900 (JST)

Hello,

Here is a patch to support CMap files for CID-keyed fonts.
The functions, Get_Char and Next_Char, already work.
And I introduce new encoding, FT_ENCODING_UNKNOWN.
It is still beta and there are many bugs and many restrictions yet.

0. Builiding with ftjam fails becase any Jamfiles are not unmodifiled.
1. We cannot read any CMaps which use the "usecmap" operator.
2. We cannot read CMaps like as follows because the patch assume
   src is not decrease.

   2 begincidrange
   <1000> <1001> 0
   <0000> <0001> 10
   endcidrange

3. I want to read CMap files via FT_New_Face but I do not imprement
   it yet.
4. We cannot read any ToUnicode mapping files and any rearrange font
   files.  And I will not support these files because of there are
   some difficulties.


Please review and test.  Any comments are highly welcomed.

----- Yamano-uchi, Hidetoshi

---- sample code ----
#include <ft2build.h>
#include FT_FREETYPE_H

main()
{
  FT_Error error;
  FT_Library library;
  FT_Face face;
  FT_UInt i, j;

  error = FT_Init_FreeType( &library );

  error = FT_New_Face( library, "CIDFont/WadaMin-Regular", 0, &face);

  error = FT_Attach_File( face, "CMap/EUC-H");

  FT_Set_Charmap( face, face->charmaps[0] );

  for (i=0;i<0x10000;i++) {
    j = FT_Get_Char_Index( face, i );
    printf("%x, %d\n", i, j);
  }
  FT_Done_Face( face );
  FT_Done_FreeType( library );
}
-----

Attachment: ft2cidcmap_20030802.diff.bz2
Description: Binary data


reply via email to

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