the "type1z" driver uses it to parse Type 1 charstrings (not to parse the Type 1 token stream yet though)..VER-2-0-4-PATCH
parent
6d315e33bd
commit
7711109239
21 changed files with 1484 additions and 1781 deletions
@ -0,0 +1,7 @@ |
||||
make_module_list: add_psaux_module |
||||
|
||||
add_psaux_module: |
||||
$(OPEN_DRIVER)psaux_module_class$(CLOSE_DRIVER)
|
||||
$(ECHO_DRIVER)psaux $(ECHO_DRIVER_DESC)Postscript Type 1 & Type 2 helper module$(ECHO_DRIVER_DONE)
|
||||
|
||||
# EOF
|
@ -0,0 +1,16 @@ |
||||
#define FT_MAKE_OPTION_SINGLE_OBJECT |
||||
|
||||
#ifdef FT_FLAT_COMPILE |
||||
|
||||
#include "psobjs.c" |
||||
#include "psmodule.c" |
||||
#include "t1decode.c" |
||||
|
||||
#else |
||||
|
||||
#include <psaux/psobjs.c> |
||||
#include <psaux/psmodule.c> |
||||
#include <psaux/t1decode.c> |
||||
|
||||
#endif |
||||
|
@ -0,0 +1,82 @@ |
||||
#include <psaux/psmodule.h> |
||||
#include <psaux/psobjs.h> |
||||
#include <psaux/t1decode.h> |
||||
|
||||
static |
||||
const PS_Table_Funcs ps_table_funcs = |
||||
{ |
||||
PS_Table_New, |
||||
PS_Table_Done, |
||||
PS_Table_Add, |
||||
PS_Table_Release |
||||
}; |
||||
|
||||
|
||||
static |
||||
const T1_Parser_Funcs t1_parser_funcs = |
||||
{ |
||||
T1_Init_Parser, |
||||
T1_Done_Parser, |
||||
T1_Skip_Spaces, |
||||
T1_Skip_Alpha, |
||||
T1_ToInt, |
||||
T1_ToFixed, |
||||
T1_ToCoordArray, |
||||
T1_ToFixedArray, |
||||
T1_ToToken, |
||||
T1_ToTokenArray, |
||||
T1_Load_Field, |
||||
T1_Load_Field_Table |
||||
}; |
||||
|
||||
|
||||
static |
||||
const T1_Builder_Funcs t1_builder_funcs = |
||||
{ |
||||
T1_Builder_Init, |
||||
T1_Builder_Done, |
||||
T1_Builder_Check_Points, |
||||
T1_Builder_Add_Point, |
||||
T1_Builder_Add_Point1, |
||||
T1_Builder_Add_Contour, |
||||
T1_Builder_Start_Point, |
||||
T1_Builder_Close_Contour |
||||
}; |
||||
|
||||
|
||||
static |
||||
const T1_Decoder_Funcs t1_decoder_funcs = |
||||
{ |
||||
T1_Decoder_Init, |
||||
T1_Decoder_Done, |
||||
T1_Decoder_Parse_Charstrings |
||||
}; |
||||
|
||||
|
||||
static |
||||
const PSAux_Interface psaux_interface = |
||||
{ |
||||
&ps_table_funcs, |
||||
&t1_parser_funcs, |
||||
&t1_builder_funcs, |
||||
&t1_decoder_funcs, |
||||
|
||||
T1_Decrypt |
||||
}; |
||||
|
||||
|
||||
FT_CPLUSPLUS(const FT_Module_Class) psaux_module_class = |
||||
{ |
||||
0, |
||||
sizeof( FT_ModuleRec ), |
||||
"psaux", |
||||
0x10000L, |
||||
0x20000L, |
||||
|
||||
&psaux_interface, /* module-specific interface */ |
||||
|
||||
(FT_Module_Constructor) 0, |
||||
(FT_Module_Destructor) 0, |
||||
(FT_Module_Requester) 0 |
||||
}; |
||||
|
@ -0,0 +1,16 @@ |
||||
#ifndef PSMODULE_H |
||||
#define PSMODULE_H |
||||
|
||||
#include <freetype/ftmodule.h> |
||||
|
||||
#ifdef __cplusplus |
||||
extern "C" { |
||||
#endif |
||||
|
||||
FT_EXPORT_VAR( const FT_Module_Class ) psaux_driver_class; |
||||
|
||||
#ifdef __cplusplus |
||||
} |
||||
#endif |
||||
|
||||
#endif /* PSMODULE_H */ |
@ -0,0 +1,70 @@ |
||||
#
|
||||
# FreeType 2 PSAUX driver configuration rules
|
||||
#
|
||||
|
||||
|
||||
# Copyright 1996-2000 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# 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.
|
||||
|
||||
|
||||
# PSAUX driver directory
|
||||
#
|
||||
PSAUX_DIR := $(SRC_)psaux
|
||||
PSAUX_DIR_ := $(PSAUX_DIR)$(SEP)
|
||||
|
||||
|
||||
# compilation flags for the driver
|
||||
#
|
||||
PSAUX_COMPILE := $(FT_COMPILE)
|
||||
|
||||
|
||||
# PSAUX driver sources (i.e., C files)
|
||||
#
|
||||
PSAUX_DRV_SRC := $(PSAUX_DIR_)psobjs.c \
|
||||
$(PSAUX_DIR_)t1decode.c \
|
||||
$(PSAUX_DIR_)psmodule.c
|
||||
|
||||
# PSAUX driver headers
|
||||
#
|
||||
PSAUX_DRV_H := $(PSAUX_DRV_SRC:%c=%h)
|
||||
|
||||
|
||||
# PSAUX driver object(s)
|
||||
#
|
||||
# PSAUX_DRV_OBJ_M is used during `multi' builds.
|
||||
# PSAUX_DRV_OBJ_S is used during `single' builds.
|
||||
#
|
||||
PSAUX_DRV_OBJ_M := $(PSAUX_DRV_SRC:$(PSAUX_DIR_)%.c=$(OBJ_)%.$O)
|
||||
PSAUX_DRV_OBJ_S := $(OBJ_)psaux.$O
|
||||
|
||||
# PSAUX driver source file for single build
|
||||
#
|
||||
PSAUX_DRV_SRC_S := $(PSAUX_DIR_)psaux.c
|
||||
|
||||
|
||||
# PSAUX driver - single object
|
||||
#
|
||||
$(PSAUX_DRV_OBJ_S): $(PSAUX_DRV_SRC_S) $(PSAUX_DRV_SRC) \
|
||||
$(FREETYPE_H) $(PSAUX_DRV_H)
|
||||
$(PSAUX_COMPILE) $T$@ $(PSAUX_DRV_SRC_S)
|
||||
|
||||
|
||||
# PSAUX driver - multiple objects
|
||||
#
|
||||
$(OBJ_)%.$O: $(PSAUX_DIR_)%.c $(FREETYPE_H) $(PSAUX_DRV_H) |
||||
$(PSAUX_COMPILE) $T$@ $<
|
||||
|
||||
|
||||
# update main driver object lists
|
||||
#
|
||||
DRV_OBJS_S += $(PSAUX_DRV_OBJ_S)
|
||||
DRV_OBJS_M += $(PSAUX_DRV_OBJ_M)
|
||||
|
||||
|
||||
# EOF
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,32 @@ |
||||
#ifndef T1DECODE_H |
||||
#define T1DECODE_H |
||||
|
||||
#include <freetype/internal/psaux.h> |
||||
#include <freetype/internal/psnames.h> |
||||
#include <freetype/internal/t1types.h> |
||||
|
||||
LOCAL_DEF |
||||
const T1_Decoder_Funcs t1_decoder_funcs; |
||||
|
||||
LOCAL_DEF |
||||
FT_Error T1_Decoder_Parse_Glyph( T1_Decoder* decoder, |
||||
FT_UInt glyph_index ); |
||||
|
||||
LOCAL_DEF |
||||
FT_Error T1_Decoder_Parse_Charstrings( T1_Decoder* decoder, |
||||
FT_Byte* base, |
||||
FT_UInt len ); |
||||
|
||||
LOCAL_DEF |
||||
FT_Error T1_Decoder_Init( T1_Decoder* decoder, |
||||
FT_Face face, |
||||
FT_Size size, |
||||
FT_GlyphSlot slot, |
||||
FT_Byte** glyph_names, |
||||
T1_Blend* blend, |
||||
T1_Decoder_Parse_Func parse_glyph ); |
||||
|
||||
LOCAL_DEF |
||||
void T1_Decoder_Done( T1_Decoder* decoder ); |
||||
|
||||
#endif /* T1DECODE_H */ |
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue