ReactOS  0.4.15-dev-439-g292f67a
t42drivr.c File Reference
#include "t42drivr.h"
#include "t42objs.h"
#include "t42error.h"
Include dependency graph for t42drivr.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FT_COMPONENT   trace_t42
 

Functions

static FT_Error t42_get_glyph_name (T42_Face face, FT_UInt glyph_index, FT_Pointer buffer, FT_UInt buffer_max)
 
static FT_UInt t42_get_name_index (T42_Face face, FT_String *glyph_name)
 
static const chart42_get_ps_font_name (T42_Face face)
 
static FT_Error t42_ps_get_font_info (FT_Face face, PS_FontInfoRec *afont_info)
 
static FT_Error t42_ps_get_font_extra (FT_Face face, PS_FontExtraRec *afont_extra)
 
static FT_Int t42_ps_has_glyph_names (FT_Face face)
 
static FT_Error t42_ps_get_font_private (FT_Face face, PS_PrivateRec *afont_private)
 
 T42_Get_Interface (FT_Module module, const FT_String *t42_interface)
 

Variables

static const FT_Service_GlyphDictRec t42_service_glyph_dict
 
static const FT_Service_PsFontNameRec t42_service_ps_font_name
 
static const FT_Service_PsInfoRec t42_service_ps_info
 
static const FT_ServiceDescRec t42_services []
 
const FT_Driver_ClassRec t42_driver_class
 

Macro Definition Documentation

◆ FT_COMPONENT

#define FT_COMPONENT   trace_t42

Definition at line 50 of file t42drivr.c.

Function Documentation

◆ t42_get_glyph_name()

static FT_Error t42_get_glyph_name ( T42_Face  face,
FT_UInt  glyph_index,
FT_Pointer  buffer,
FT_UInt  buffer_max 
)
static

Definition at line 60 of file t42drivr.c.

64  {
65  FT_STRCPYN( buffer, face->type1.glyph_names[glyph_index], buffer_max );
66 
67  return FT_Err_Ok;
68  }
GLuint buffer
Definition: glext.h:5915
return FT_Err_Ok
Definition: ftbbox.c:511
#define FT_STRCPYN(dst, src, size)
Definition: ftmemory.h:382
GLenum GLuint GLint GLenum face
Definition: glext.h:7025

◆ T42_Get_Interface()

T42_Get_Interface ( FT_Module  module,
const FT_String t42_interface 
)

Definition at line 191 of file t42drivr.c.

193  {
194  FT_UNUSED( module );
195 
196  return ft_service_list_lookup( t42_services, t42_interface );
197  }
ft_service_list_lookup(FT_ServiceDesc service_descriptors, const char *service_id)
Definition: ftobjs.c:98
static const FT_ServiceDescRec t42_services[]
Definition: t42drivr.c:180
#define FT_UNUSED(arg)
Definition: ftconfig.h:101

◆ t42_get_name_index()

static FT_UInt t42_get_name_index ( T42_Face  face,
FT_String glyph_name 
)
static

Definition at line 72 of file t42drivr.c.

74  {
75  FT_Int i;
76 
77 
78  for ( i = 0; i < face->type1.num_glyphs; i++ )
79  {
80  FT_String* gname = face->type1.glyph_names[i];
81 
82 
83  if ( glyph_name[0] == gname[0] && !ft_strcmp( glyph_name, gname ) )
84  return (FT_UInt)ft_strtol( (const char *)face->type1.charstrings[i],
85  NULL, 10 );
86  }
87 
88  return 0;
89  }
signed int FT_Int
Definition: fttypes.h:220
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
smooth NULL
Definition: ftsmooth.c:416
char FT_String
Definition: fttypes.h:187
unsigned int FT_UInt
Definition: fttypes.h:231
GLenum GLuint GLint GLenum face
Definition: glext.h:7025
#define ft_strcmp
Definition: ftstdlib.h:86
#define ft_strtol
Definition: ftstdlib.h:145

◆ t42_get_ps_font_name()

static const char* t42_get_ps_font_name ( T42_Face  face)
static

Definition at line 106 of file t42drivr.c.

107  {
108  return (const char*)face->type1.font_name;
109  }
GLenum GLuint GLint GLenum face
Definition: glext.h:7025

◆ t42_ps_get_font_extra()

static FT_Error t42_ps_get_font_extra ( FT_Face  face,
PS_FontExtraRec afont_extra 
)
static

Definition at line 135 of file t42drivr.c.

137  {
138  *afont_extra = ((T42_Face)face)->type1.font_extra;
139 
140  return FT_Err_Ok;
141  }
return FT_Err_Ok
Definition: ftbbox.c:511
FT_BEGIN_HEADER struct T42_FaceRec_ * T42_Face
GLenum GLuint GLint GLenum face
Definition: glext.h:7025

◆ t42_ps_get_font_info()

static FT_Error t42_ps_get_font_info ( FT_Face  face,
PS_FontInfoRec afont_info 
)
static

Definition at line 125 of file t42drivr.c.

127  {
128  *afont_info = ((T42_Face)face)->type1.font_info;
129 
130  return FT_Err_Ok;
131  }
return FT_Err_Ok
Definition: ftbbox.c:511
FT_BEGIN_HEADER struct T42_FaceRec_ * T42_Face
GLenum GLuint GLint GLenum face
Definition: glext.h:7025

◆ t42_ps_get_font_private()

static FT_Error t42_ps_get_font_private ( FT_Face  face,
PS_PrivateRec afont_private 
)
static

Definition at line 154 of file t42drivr.c.

156  {
157  *afont_private = ((T42_Face)face)->type1.private_dict;
158 
159  return FT_Err_Ok;
160  }
return FT_Err_Ok
Definition: ftbbox.c:511
FT_BEGIN_HEADER struct T42_FaceRec_ * T42_Face
GLenum GLuint GLint GLenum face
Definition: glext.h:7025

◆ t42_ps_has_glyph_names()

static FT_Int t42_ps_has_glyph_names ( FT_Face  face)
static

Definition at line 145 of file t42drivr.c.

146  {
147  FT_UNUSED( face );
148 
149  return 1;
150  }
#define FT_UNUSED(arg)
Definition: ftconfig.h:101
GLenum GLuint GLint GLenum face
Definition: glext.h:7025

Variable Documentation

◆ t42_driver_class

const FT_Driver_ClassRec t42_driver_class

Definition at line 200 of file t42drivr.c.

◆ t42_service_glyph_dict

const FT_Service_GlyphDictRec t42_service_glyph_dict
static
Initial value:
=
{
}
FT_UInt(* FT_GlyphDict_NameIndexFunc)(FT_Face face, FT_String *glyph_name)
Definition: svgldict.h:44
static FT_Error t42_get_glyph_name(T42_Face face, FT_UInt glyph_index, FT_Pointer buffer, FT_UInt buffer_max)
Definition: t42drivr.c:60
static FT_UInt t42_get_name_index(T42_Face face, FT_String *glyph_name)
Definition: t42drivr.c:72
FT_Error(* FT_GlyphDict_GetNameFunc)(FT_Face face, FT_UInt glyph_index, FT_Pointer buffer, FT_UInt buffer_max)
Definition: svgldict.h:38

Definition at line 92 of file t42drivr.c.

◆ t42_service_ps_font_name

const FT_Service_PsFontNameRec t42_service_ps_font_name
static
Initial value:
=
{
}
static const char * t42_get_ps_font_name(T42_Face face)
Definition: t42drivr.c:106
const char *(* FT_PsName_GetFunc)(FT_Face face)
Definition: svpostnm.h:41

Definition at line 112 of file t42drivr.c.

◆ t42_service_ps_info

const FT_Service_PsInfoRec t42_service_ps_info
static
Initial value:
=
{
}
smooth NULL
Definition: ftsmooth.c:416
FT_Long(* PS_GetFontValueFunc)(FT_Face face, PS_Dict_Keys key, FT_UInt idx, void *value, FT_Long value_len)
Definition: svpsinfo.h:48
static FT_Int t42_ps_has_glyph_names(FT_Face face)
Definition: t42drivr.c:145
static FT_Error t42_ps_get_font_info(FT_Face face, PS_FontInfoRec *afont_info)
Definition: t42drivr.c:125
FT_Error(* PS_GetFontExtraFunc)(FT_Face face, PS_FontExtraRec *afont_extra)
Definition: svpsinfo.h:37
static FT_Error t42_ps_get_font_private(FT_Face face, PS_PrivateRec *afont_private)
Definition: t42drivr.c:154
FT_Int(* PS_HasGlyphNamesFunc)(FT_Face face)
Definition: svpsinfo.h:41
FT_Error(* PS_GetFontPrivateFunc)(FT_Face face, PS_PrivateRec *afont_private)
Definition: svpsinfo.h:44
static FT_Error t42_ps_get_font_extra(FT_Face face, PS_FontExtraRec *afont_extra)
Definition: t42drivr.c:135
FT_Error(* PS_GetFontInfoFunc)(FT_Face face, PS_FontInfoRec *afont_info)
Definition: svpsinfo.h:33

Definition at line 163 of file t42drivr.c.

◆ t42_services

const FT_ServiceDescRec t42_services[]
static
Initial value:
=
{
{ NULL, NULL }
}
#define FT_FONT_FORMAT_TYPE_42
Definition: svfntfmt.h:40
static const FT_Service_PsFontNameRec t42_service_ps_font_name
Definition: t42drivr.c:112
static const FT_Service_PsInfoRec t42_service_ps_info
Definition: t42drivr.c:163
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_POSTSCRIPT_FONT_NAME
Definition: cffdrivr.c:1018
#define FT_SERVICE_ID_FONT_FORMAT
Definition: svfntfmt.h:34
static const FT_Service_GlyphDictRec t42_service_glyph_dict
Definition: t42drivr.c:92
smooth NULL
Definition: ftsmooth.c:416
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_GLYPH_DICT
Definition: cffdrivr.c:1018
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_POSTSCRIPT_INFO
Definition: cffdrivr.c:1018

Definition at line 180 of file t42drivr.c.

Referenced by T42_Get_Interface().