summaryrefslogtreecommitdiff
path: root/Build/source/libs
diff options
context:
space:
mode:
authorJjgod Jiang <gzjjgod@gmail.com>2015-04-28 17:33:30 +0000
committerJjgod Jiang <gzjjgod@gmail.com>2015-04-28 17:33:30 +0000
commitd75e093e68fe674b696ed4920a214d0036261539 (patch)
treec4e2516c1d6ddd69f9a1587a50736f41d8916f61 /Build/source/libs
parentf2aeb0eb4039673528ffde33f86c0382907f1df3 (diff)
[cff] Use `name' table for PS name if we have a SFNT-CFF.
This follows the OpenType 1.7 specification. See http://tug.org/pipermail/tex-live/2015-April/036634.html for a discussion. * src/cff/cffdrivr.c (cff_get_ps_name): Use the `sfnt' service if we have an SFNT. git-svn-id: svn://tug.org/texlive/trunk@37096 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs')
-rw-r--r--Build/source/libs/freetype2/freetype-2.5.5-PATCHES/TL-Changes2
-rw-r--r--Build/source/libs/freetype2/freetype-2.5.5/src/cff/cffdrivr.c20
2 files changed, 21 insertions, 1 deletions
diff --git a/Build/source/libs/freetype2/freetype-2.5.5-PATCHES/TL-Changes b/Build/source/libs/freetype2/freetype-2.5.5-PATCHES/TL-Changes
index 87255205014..9bf9a23bd9d 100644
--- a/Build/source/libs/freetype2/freetype-2.5.5-PATCHES/TL-Changes
+++ b/Build/source/libs/freetype2/freetype-2.5.5-PATCHES/TL-Changes
@@ -13,3 +13,5 @@ Added newline at end of file:
builds/wince/vc2005-ce/freetype.vcproj
builds/windows/vc2005/freetype.vcproj
+Backported a fix from git (3cc076dae):
+ src/cff/cffdrivr.c
diff --git a/Build/source/libs/freetype2/freetype-2.5.5/src/cff/cffdrivr.c b/Build/source/libs/freetype2/freetype-2.5.5/src/cff/cffdrivr.c
index 3e8898e343c..65e5ba44135 100644
--- a/Build/source/libs/freetype2/freetype-2.5.5/src/cff/cffdrivr.c
+++ b/Build/source/libs/freetype2/freetype-2.5.5/src/cff/cffdrivr.c
@@ -383,9 +383,27 @@
static const char*
cff_get_ps_name( CFF_Face face )
{
- CFF_Font cff = (CFF_Font)face->extra.data;
+ CFF_Font cff = (CFF_Font)face->extra.data;
+ SFNT_Service sfnt = (SFNT_Service)face->sfnt;
+
+
+ /* following the OpenType specification 1.7, we return the name stored */
+ /* in the `name' table for a CFF wrapped into an SFNT container */
+
+ if ( sfnt )
+ {
+ FT_Library library = FT_FACE_LIBRARY( face );
+ FT_Module sfnt_module = FT_Get_Module( library, "sfnt" );
+ FT_Service_PsFontName service =
+ (FT_Service_PsFontName)ft_module_get_service(
+ sfnt_module,
+ FT_SERVICE_ID_POSTSCRIPT_FONT_NAME );
+ if ( service && service->get_ps_font_name )
+ return service->get_ps_font_name( FT_FACE( face ) );
+ }
+
return (const char*)cff->font_name;
}