freetype-commit
[Top][All Lists]
Advanced

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

[freetype2] master 6ca0a9356: [t1cid] Set FT_FACE_FLAG_CID_KEYED.


From: Werner Lemberg
Subject: [freetype2] master 6ca0a9356: [t1cid] Set FT_FACE_FLAG_CID_KEYED.
Date: Thu, 11 May 2023 10:31:34 -0400 (EDT)

branch: master
commit 6ca0a9356ff05c15edbc2bbd905221beacbef447
Author: suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
Commit: suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>

    [t1cid] Set FT_FACE_FLAG_CID_KEYED.
    
    * cidobjs.c (cid_face_init): Set FT_FACE_FLAG_CID_KEYED.
    
    * cidriver.c (cid_get_is_cid): Comment about the case that
    is_cid cannot guarantee the glyph collection specification.
---
 src/cid/cidobjs.c  | 8 ++++++++
 src/cid/cidriver.c | 8 +++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/src/cid/cidobjs.c b/src/cid/cidobjs.c
index 1fc121c00..e11c41d8b 100644
--- a/src/cid/cidobjs.c
+++ b/src/cid/cidobjs.c
@@ -374,6 +374,14 @@
       if ( info->is_fixed_pitch )
         cidface->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;
 
+      /*
+       * For the sfnt-wrapped CID fonts for MacOS, currently,
+       * its `cmap' tables are ignored, and the content in
+       * its `CID ' table is treated the same as naked CID-keyed
+       * font.  See ft_lookup_PS_in_sfnt_stream().
+       */
+      cidface->face_flags |= FT_FACE_FLAG_CID_KEYED;
+
       /* XXX: TODO: add kerning with .afm support */
 
       /* get style name -- be careful, some broken fonts only */
diff --git a/src/cid/cidriver.c b/src/cid/cidriver.c
index fd015ef2e..0907b1dcf 100644
--- a/src/cid/cidriver.c
+++ b/src/cid/cidriver.c
@@ -141,8 +141,14 @@
     FT_UNUSED( face );
 
 
+    /*
+     * XXX: If the ROS is Adobe-Identity-H or -V,
+     * the font has no reliable information about
+     * its glyph collection.  Should we not set
+     * *is_cid in such cases?
+     */
     if ( is_cid )
-      *is_cid = 1; /* cid driver is only used for CID keyed fonts */
+      *is_cid = 1;
 
     return error;
   }



reply via email to

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