freetype-commit
[Top][All Lists]
Advanced

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

[freetype2] master 338b4e884: [type42] Fix `FT_Get_PS_Font_Private` for


From: Werner Lemberg
Subject: [freetype2] master 338b4e884: [type42] Fix `FT_Get_PS_Font_Private` for this format.
Date: Fri, 11 Feb 2022 13:38:17 -0500 (EST)

branch: master
commit 338b4e88468e0fe1b9e50f3c01ca77165a78366c
Author: Werner Lemberg <wl@gnu.org>
Commit: Werner Lemberg <wl@gnu.org>

    [type42] Fix `FT_Get_PS_Font_Private` for this format.
    
    Since Type42 fonts don't have a 'Private' dictionary, the return value
    should be `FT_Err_Invalid_Argument`.
    
    * src/type42/t42drivr.c (t42_ps_get_font_private): Removed.
    (t42_service_ps_info): Updated.
---
 src/type42/t42drivr.c | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/src/type42/t42drivr.c b/src/type42/t42drivr.c
index 6befb1d9a..45d8c3821 100644
--- a/src/type42/t42drivr.c
+++ b/src/type42/t42drivr.c
@@ -150,22 +150,13 @@
   }
 
 
-  static FT_Error
-  t42_ps_get_font_private( FT_Face         face,
-                           PS_PrivateRec*  afont_private )
-  {
-    *afont_private = ((T42_Face)face)->type1.private_dict;
-
-    return FT_Err_Ok;
-  }
-
-
   static const FT_Service_PsInfoRec  t42_service_ps_info =
   {
     (PS_GetFontInfoFunc)   t42_ps_get_font_info,    /* ps_get_font_info    */
     (PS_GetFontExtraFunc)  t42_ps_get_font_extra,   /* ps_get_font_extra   */
     (PS_HasGlyphNamesFunc) t42_ps_has_glyph_names,  /* ps_has_glyph_names  */
-    (PS_GetFontPrivateFunc)t42_ps_get_font_private, /* ps_get_font_private */
+    /* Type42 fonts don't have a Private dict */
+    (PS_GetFontPrivateFunc)NULL,                    /* ps_get_font_private */
     /* not implemented */
     (PS_GetFontValueFunc)  NULL                     /* ps_get_font_value   */
   };



reply via email to

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