summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/freetype/src/type1/t1driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/freetype/src/type1/t1driver.c')
-rw-r--r--src/3rdparty/freetype/src/type1/t1driver.c111
1 files changed, 63 insertions, 48 deletions
diff --git a/src/3rdparty/freetype/src/type1/t1driver.c b/src/3rdparty/freetype/src/type1/t1driver.c
index 557733da3b..a4cdf372a9 100644
--- a/src/3rdparty/freetype/src/type1/t1driver.c
+++ b/src/3rdparty/freetype/src/type1/t1driver.c
@@ -4,7 +4,7 @@
*
* Type 1 driver interface (body).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -16,7 +16,6 @@
*/
-#include <ft2build.h>
#include "t1driver.h"
#include "t1gload.h"
#include "t1load.h"
@@ -27,20 +26,20 @@
#include "t1afm.h"
#endif
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_HASH_H
-#include FT_INTERNAL_POSTSCRIPT_PROPS_H
-#include FT_DRIVER_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/fthash.h>
+#include <freetype/internal/ftpsprop.h>
+#include <freetype/ftdriver.h>
-#include FT_SERVICE_MULTIPLE_MASTERS_H
-#include FT_SERVICE_GLYPH_DICT_H
-#include FT_SERVICE_FONT_FORMAT_H
-#include FT_SERVICE_POSTSCRIPT_NAME_H
-#include FT_SERVICE_POSTSCRIPT_CMAPS_H
-#include FT_SERVICE_POSTSCRIPT_INFO_H
-#include FT_SERVICE_PROPERTIES_H
-#include FT_SERVICE_KERNING_H
+#include <freetype/internal/services/svmm.h>
+#include <freetype/internal/services/svgldict.h>
+#include <freetype/internal/services/svfntfmt.h>
+#include <freetype/internal/services/svpostnm.h>
+#include <freetype/internal/services/svpscmap.h>
+#include <freetype/internal/services/svpsinfo.h>
+#include <freetype/internal/services/svprop.h>
+#include <freetype/internal/services/svkern.h>
/**************************************************************************
@@ -57,28 +56,32 @@
*
*/
- static FT_Error
- t1_get_glyph_name( T1_Face face,
+ FT_CALLBACK_DEF( FT_Error )
+ t1_get_glyph_name( FT_Face face, /* T1_Face */
FT_UInt glyph_index,
FT_Pointer buffer,
FT_UInt buffer_max )
{
- FT_STRCPYN( buffer, face->type1.glyph_names[glyph_index], buffer_max );
+ T1_Face t1face = (T1_Face)face;
+
+
+ FT_STRCPYN( buffer, t1face->type1.glyph_names[glyph_index], buffer_max );
return FT_Err_Ok;
}
- static FT_UInt
- t1_get_name_index( T1_Face face,
+ FT_CALLBACK_DEF( FT_UInt )
+ t1_get_name_index( FT_Face face, /* T1_Face */
const FT_String* glyph_name )
{
- FT_Int i;
+ T1_Face t1face = (T1_Face)face;
+ FT_Int i;
- for ( i = 0; i < face->type1.num_glyphs; i++ )
+ for ( i = 0; i < t1face->type1.num_glyphs; i++ )
{
- FT_String* gname = face->type1.glyph_names[i];
+ FT_String* gname = t1face->type1.glyph_names[i];
if ( !ft_strcmp( glyph_name, gname ) )
@@ -91,8 +94,8 @@
static const FT_Service_GlyphDictRec t1_service_glyph_dict =
{
- (FT_GlyphDict_GetNameFunc) t1_get_glyph_name, /* get_name */
- (FT_GlyphDict_NameIndexFunc)t1_get_name_index /* name_index */
+ t1_get_glyph_name, /* FT_GlyphDict_GetNameFunc get_name */
+ t1_get_name_index /* FT_GlyphDict_NameIndexFunc name_index */
};
@@ -102,9 +105,12 @@
*/
static const char*
- t1_get_ps_name( T1_Face face )
+ t1_get_ps_name( FT_Face face ) /* T1_Face */
{
- return (const char*) face->type1.font_name;
+ T1_Face t1face = (T1_Face)face;
+
+
+ return (const char*) t1face->type1.font_name;
}
@@ -122,19 +128,28 @@
#ifndef T1_CONFIG_OPTION_NO_MM_SUPPORT
static const FT_Service_MultiMastersRec t1_service_multi_masters =
{
- (FT_Get_MM_Func) T1_Get_Multi_Master, /* get_mm */
- (FT_Set_MM_Design_Func) T1_Set_MM_Design, /* set_mm_design */
- (FT_Set_MM_Blend_Func) T1_Set_MM_Blend, /* set_mm_blend */
- (FT_Get_MM_Blend_Func) T1_Get_MM_Blend, /* get_mm_blend */
- (FT_Get_MM_Var_Func) T1_Get_MM_Var, /* get_mm_var */
- (FT_Set_Var_Design_Func) T1_Set_Var_Design, /* set_var_design */
- (FT_Get_Var_Design_Func) T1_Get_Var_Design, /* get_var_design */
- (FT_Set_Instance_Func) T1_Reset_MM_Blend, /* set_instance */
- (FT_Set_MM_WeightVector_Func)T1_Set_MM_WeightVector, /* set_mm_weightvector */
- (FT_Get_MM_WeightVector_Func)T1_Get_MM_WeightVector, /* get_mm_weightvector */
-
- (FT_Get_Var_Blend_Func) NULL, /* get_var_blend */
- (FT_Done_Blend_Func) T1_Done_Blend /* done_blend */
+ T1_Get_Multi_Master, /* FT_Get_MM_Func get_mm */
+ T1_Set_MM_Design, /* FT_Set_MM_Design_Func set_mm_design */
+ T1_Set_MM_Blend, /* FT_Set_MM_Blend_Func set_mm_blend */
+ T1_Get_MM_Blend, /* FT_Get_MM_Blend_Func get_mm_blend */
+ T1_Get_MM_Var, /* FT_Get_MM_Var_Func get_mm_var */
+ T1_Set_Var_Design, /* FT_Set_Var_Design_Func set_var_design */
+ T1_Get_Var_Design, /* FT_Get_Var_Design_Func get_var_design */
+ T1_Reset_MM_Blend, /* FT_Set_Named_Instance_Func set_named_instance */
+ NULL, /* FT_Get_Default_Named_Instance_Func get_default_named_instance */
+ T1_Set_MM_WeightVector,
+ /* FT_Set_MM_WeightVector_Func set_mm_weightvector */
+ T1_Get_MM_WeightVector,
+ /* FT_Get_MM_WeightVector_Func get_mm_weightvector */
+
+ NULL, /* FT_Construct_PS_Name_Func construct_ps_name */
+ NULL, /* FT_Var_Load_Delta_Set_Idx_Map_Func load_delta_set_idx_map */
+ NULL, /* FT_Var_Load_Item_Var_Store_Func load_item_variation_store */
+ NULL, /* FT_Var_Get_Item_Delta_Func get_item_delta */
+ NULL, /* FT_Var_Done_Item_Var_Store_Func done_item_variation_store */
+ NULL, /* FT_Var_Done_Delta_Set_Idx_Map_Func done_delta_set_index_map */
+ NULL, /* FT_Get_Var_Blend_Func get_var_blend */
+ T1_Done_Blend /* FT_Done_Blend_Func done_blend */
};
#endif
@@ -622,11 +637,11 @@
static const FT_Service_PsInfoRec t1_service_ps_info =
{
- (PS_GetFontInfoFunc) t1_ps_get_font_info, /* ps_get_font_info */
- (PS_GetFontExtraFunc) t1_ps_get_font_extra, /* ps_get_font_extra */
- (PS_HasGlyphNamesFunc) t1_ps_has_glyph_names, /* ps_has_glyph_names */
- (PS_GetFontPrivateFunc)t1_ps_get_font_private, /* ps_get_font_private */
- (PS_GetFontValueFunc) t1_ps_get_font_value, /* ps_get_font_value */
+ t1_ps_get_font_info, /* PS_GetFontInfoFunc ps_get_font_info */
+ t1_ps_get_font_extra, /* PS_GetFontExtraFunc ps_get_font_extra */
+ t1_ps_has_glyph_names, /* PS_HasGlyphNamesFunc ps_has_glyph_names */
+ t1_ps_get_font_private, /* PS_GetFontPrivateFunc ps_get_font_private */
+ t1_ps_get_font_value, /* PS_GetFontValueFunc ps_get_font_value */
};
@@ -646,9 +661,9 @@
FT_DEFINE_SERVICE_PROPERTIESREC(
t1_service_properties,
- (FT_Properties_SetFunc)ps_property_set, /* set_property */
- (FT_Properties_GetFunc)ps_property_get ) /* get_property */
-
+ ps_property_set, /* FT_Properties_SetFunc set_property */
+ ps_property_get /* FT_Properties_GetFunc get_property */
+ )
/*
* SERVICE LIST