/**************************************************************************** * * t42drivr.c * * High-level Type 42 driver interface (body). * * Copyright (C) 2002-2023 by * Roberto Alameda. * * This file is part of the FreeType project, and may only be used, * modified, and distributed under the terms of the FreeType project * license, LICENSE.TXT. By continuing to use, modify, or distribute * this file you indicate that you have read the license and * understand and accept it fully. * */ /************************************************************************** * * This driver implements Type42 fonts as described in the * Technical Note #5012 from Adobe, with these limitations: * * 1) CID Fonts are not currently supported. * 2) Incremental fonts making use of the GlyphDirectory keyword * will be loaded, but the rendering will be using the TrueType * tables. * 3) As for Type1 fonts, CDevProc is not supported. * 4) The Metrics dictionary is not supported. * 5) AFM metrics are not supported. * * In other words, this driver supports Type42 fonts derived from * TrueType fonts in a non-CID manner, as done by usual conversion * programs. * */ #include "t42drivr.h" #include "t42objs.h" #include "t42error.h" #include <freetype/internal/ftdebug.h> #include <freetype/internal/services/svfntfmt.h> #include <freetype/internal/services/svgldict.h> #include <freetype/internal/services/svpostnm.h> #include <freetype/internal/services/svpsinfo.h> #undef FT_COMPONENT #define FT_COMPONENT … /* * * GLYPH DICT SERVICE * */ FT_CALLBACK_DEF( FT_Error ) t42_get_glyph_name( FT_Face face, /* T42_Face */ FT_UInt glyph_index, FT_Pointer buffer, FT_UInt buffer_max ) { … } FT_CALLBACK_DEF( FT_UInt ) t42_get_name_index( FT_Face face, /* T42_Face */ const FT_String* glyph_name ) { … } static const FT_Service_GlyphDictRec t42_service_glyph_dict = …; /* * * POSTSCRIPT NAME SERVICE * */ FT_CALLBACK_DEF( const char* ) t42_get_ps_font_name( FT_Face face ) /* T42_Face */ { … } static const FT_Service_PsFontNameRec t42_service_ps_font_name = …; /* * * POSTSCRIPT INFO SERVICE * */ FT_CALLBACK_DEF( FT_Error ) t42_ps_get_font_info( FT_Face face, PS_FontInfoRec* afont_info ) { … } FT_CALLBACK_DEF( FT_Error ) t42_ps_get_font_extra( FT_Face face, PS_FontExtraRec* afont_extra ) { … } FT_CALLBACK_DEF( FT_Int ) t42_ps_has_glyph_names( FT_Face face ) { … } static const FT_Service_PsInfoRec t42_service_ps_info = …; /* * * SERVICE LIST * */ static const FT_ServiceDescRec t42_services[] = …; FT_CALLBACK_DEF( FT_Module_Interface ) T42_Get_Interface( FT_Module module, const FT_String* t42_interface ) { … } const FT_Driver_ClassRec t42_driver_class = …; /* END */