summaryrefslogtreecommitdiffstats
path: root/src/psaux
diff options
context:
space:
mode:
Diffstat (limited to 'src/psaux')
-rw-r--r--src/psaux/Jamfile31
-rw-r--r--src/psaux/module.mk23
-rw-r--r--src/psaux/psconv.c14
-rw-r--r--src/psaux/psobjs.c10
-rw-r--r--src/psaux/rules.mk73
-rw-r--r--src/psaux/t1cmap.c18
-rw-r--r--src/psaux/t1decode.c11
7 files changed, 32 insertions, 148 deletions
diff --git a/src/psaux/Jamfile b/src/psaux/Jamfile
deleted file mode 100644
index faeded9..0000000
--- a/src/psaux/Jamfile
+++ /dev/null
@@ -1,31 +0,0 @@
-# FreeType 2 src/psaux Jamfile
-#
-# Copyright 2001, 2002 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.
-
-SubDir FT2_TOP $(FT2_SRC_DIR) psaux ;
-
-{
- local _sources ;
-
- if $(FT2_MULTI)
- {
- _sources = psauxmod psobjs t1decode t1cmap
- psconv afmparse
- ;
- }
- else
- {
- _sources = psaux ;
- }
-
- Library $(FT2_LIB) : $(_sources).c ;
-}
-
-# end of src/psaux Jamfile
diff --git a/src/psaux/module.mk b/src/psaux/module.mk
deleted file mode 100644
index 5431522..0000000
--- a/src/psaux/module.mk
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# FreeType 2 PSaux module definition
-#
-
-
-# Copyright 1996-2000, 2006 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.
-
-
-FTMODULE_H_COMMANDS += PSAUX_MODULE
-
-define 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)
-endef
-
-# EOF
diff --git a/src/psaux/psconv.c b/src/psaux/psconv.c
index 3bbeab6..d824b59 100644
--- a/src/psaux/psconv.c
+++ b/src/psaux/psconv.c
@@ -4,7 +4,7 @@
/* */
/* Some convenience conversions (body). */
/* */
-/* Copyright 2006 by */
+/* Copyright 2006, 2008 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -187,10 +187,18 @@
if ( c < 0 || c >= 10 )
break;
- if ( divider < 10000000L )
+ if ( !integral && power_ten > 0 )
{
+ power_ten--;
decimal = decimal * 10 + c;
- divider *= 10;
+ }
+ else
+ {
+ if ( divider < 10000000L )
+ {
+ decimal = decimal * 10 + c;
+ divider *= 10;
+ }
}
}
}
diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c
index 9570856..b7b84ac 100644
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -4,7 +4,7 @@
/* */
/* Auxiliary functions for PostScript fonts (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -169,7 +169,7 @@
void* object,
FT_PtrDist length )
{
- if ( idx < 0 || idx > table->max_elems )
+ if ( idx < 0 || idx >= table->max_elems )
{
FT_ERROR(( "ps_table_add: invalid index\n" ));
return PSaux_Err_Invalid_Argument;
@@ -1483,12 +1483,6 @@
builder->hints_funcs = glyph->internal->glyph_hints;
}
- if ( size )
- {
- builder->scale_x = size->metrics.x_scale;
- builder->scale_y = size->metrics.y_scale;
- }
-
builder->pos_x = 0;
builder->pos_y = 0;
diff --git a/src/psaux/rules.mk b/src/psaux/rules.mk
deleted file mode 100644
index 7a1be37..0000000
--- a/src/psaux/rules.mk
+++ /dev/null
@@ -1,73 +0,0 @@
-#
-# FreeType 2 PSaux driver configuration rules
-#
-
-
-# Copyright 1996-2000, 2002, 2003, 2006 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_DIR)/psaux
-
-
-# compilation flags for the driver
-#
-PSAUX_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(PSAUX_DIR))
-
-
-# PSAUX driver sources (i.e., C files)
-#
-PSAUX_DRV_SRC := $(PSAUX_DIR)/psobjs.c \
- $(PSAUX_DIR)/t1decode.c \
- $(PSAUX_DIR)/t1cmap.c \
- $(PSAUX_DIR)/afmparse.c \
- $(PSAUX_DIR)/psconv.c \
- $(PSAUX_DIR)/psauxmod.c
-
-# PSAUX driver headers
-#
-PSAUX_DRV_H := $(PSAUX_DRV_SRC:%c=%h) \
- $(PSAUX_DIR)/psauxerr.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_DIR)/%.$O)
-PSAUX_DRV_OBJ_S := $(OBJ_DIR)/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$(subst /,$(COMPILER_SEP),$@ $(PSAUX_DRV_SRC_S))
-
-
-# PSAUX driver - multiple objects
-#
-$(OBJ_DIR)/%.$O: $(PSAUX_DIR)/%.c $(FREETYPE_H) $(PSAUX_DRV_H)
- $(PSAUX_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
-
-
-# update main driver object lists
-#
-DRV_OBJS_S += $(PSAUX_DRV_OBJ_S)
-DRV_OBJS_M += $(PSAUX_DRV_OBJ_M)
-
-
-# EOF
diff --git a/src/psaux/t1cmap.c b/src/psaux/t1cmap.c
index 2934686..67a23db 100644
--- a/src/psaux/t1cmap.c
+++ b/src/psaux/t1cmap.c
@@ -4,7 +4,7 @@
/* */
/* Type 1 character map support (body). */
/* */
-/* Copyright 2002, 2003, 2006 by */
+/* Copyright 2002, 2003, 2006, 2007 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -135,7 +135,9 @@
(FT_CMap_InitFunc) t1_cmap_standard_init,
(FT_CMap_DoneFunc) t1_cmap_std_done,
(FT_CMap_CharIndexFunc)t1_cmap_std_char_index,
- (FT_CMap_CharNextFunc) t1_cmap_std_char_next
+ (FT_CMap_CharNextFunc) t1_cmap_std_char_next,
+
+ NULL, NULL, NULL, NULL, NULL
};
@@ -154,7 +156,9 @@
(FT_CMap_InitFunc) t1_cmap_expert_init,
(FT_CMap_DoneFunc) t1_cmap_std_done,
(FT_CMap_CharIndexFunc)t1_cmap_std_char_index,
- (FT_CMap_CharNextFunc) t1_cmap_std_char_next
+ (FT_CMap_CharNextFunc) t1_cmap_std_char_next,
+
+ NULL, NULL, NULL, NULL, NULL
};
@@ -245,7 +249,9 @@
(FT_CMap_InitFunc) t1_cmap_custom_init,
(FT_CMap_DoneFunc) t1_cmap_custom_done,
(FT_CMap_CharIndexFunc)t1_cmap_custom_char_index,
- (FT_CMap_CharNextFunc) t1_cmap_custom_char_next
+ (FT_CMap_CharNextFunc) t1_cmap_custom_char_next,
+
+ NULL, NULL, NULL, NULL, NULL
};
@@ -326,7 +332,9 @@
(FT_CMap_InitFunc) t1_cmap_unicode_init,
(FT_CMap_DoneFunc) t1_cmap_unicode_done,
(FT_CMap_CharIndexFunc)t1_cmap_unicode_char_index,
- (FT_CMap_CharNextFunc) t1_cmap_unicode_char_next
+ (FT_CMap_CharNextFunc) t1_cmap_unicode_char_next,
+
+ NULL, NULL, NULL, NULL, NULL
};
diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c
index f790643..550ba64 100644
--- a/src/psaux/t1decode.c
+++ b/src/psaux/t1decode.c
@@ -4,7 +4,7 @@
/* */
/* PostScript Type 1 decoding routines (body). */
/* */
-/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2007 by */
+/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -1062,10 +1062,11 @@
case op_closepath:
FT_TRACE4(( " closepath" ));
- close_contour( builder );
- if ( !( builder->parse_state == T1_Parse_Have_Path ||
- builder->parse_state == T1_Parse_Have_Moveto ) )
- goto Syntax_Error;
+ /* if there is no path, `closepath' is a no-op */
+ if ( builder->parse_state == T1_Parse_Have_Path ||
+ builder->parse_state == T1_Parse_Have_Moveto )
+ close_contour( builder );
+
builder->parse_state = T1_Parse_Have_Width;
break;