[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.
This commit is contained in:
parent
40623a1f3a
commit
3cc076dae7
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
||||
2015-04-28 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[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.
|
||||
|
||||
2015-04-27 Alexei Podtelezhnikov <apodtele@gmail.com>
|
||||
|
||||
[truetype] Speed up IUP.
|
||||
|
@ -437,9 +437,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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user