[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Devel] Type42 cleanup
From: |
Roberto Alameda |
Subject: |
[Devel] Type42 cleanup |
Date: |
21 Jun 2002 23:46:19 +0200 |
Hi,
I just saw that somehow there was a double definition of T42_Face, one
in t42objs.h and one in t42types.h.
This patch cleans it up.
Index: include/freetype/internal/t42types.h
===================================================================
RCS file: /cvs/freetype/freetype2/include/freetype/internal/t42types.h,v
retrieving revision 1.1
diff -u -r1.1 t42types.h
--- t42types.h 2002/05/21 14:13:00 1.1
+++ t42types.h 2002/06/21 21:44:32
@@ -30,40 +30,11 @@
FT_BEGIN_HEADER
- typedef struct T42_FontRec_
- {
- /* font info dictionary */
- PS_FontInfoRec font_info;
-
- /* top-level dictionary */
- FT_String* font_name;
-
- T1_EncodingType encoding_type;
- T1_EncodingRec encoding;
-
- FT_Byte* charstrings_block;
- FT_Byte* glyph_names_block;
-
- FT_Int num_glyphs;
- FT_String** glyph_names; /* array of glyph names */
- FT_Byte** charstrings; /* array of glyph charstrings */
- FT_Int* charstrings_len;
-
- FT_Byte paint_type;
- FT_Byte font_type;
- FT_Matrix font_matrix; /* From FontMatrix field: a, b, c, d */
- FT_Vector font_offset; /* From FontMatrix field: tx, ty */
- FT_BBox font_bbox;
-
- FT_Int stroke_width;
-
- } T42_FontRec, *T42_Font;
-
typedef struct T42_FaceRec_
{
FT_FaceRec root;
- T42_FontRec type42;
+ T1_FontRec type1;
const void* psnames;
const void* psaux;
const void* afm_data;
Index: src/base/fttype1.c
===================================================================
RCS file: /cvs/freetype/freetype2/src/base/fttype1.c,v
retrieving revision 1.4
diff -u -r1.4 fttype1.c
--- fttype1.c 2002/06/20 21:03:48 1.4
+++ fttype1.c 2002/06/21 21:44:32
@@ -41,7 +41,7 @@
else if ( ft_strcmp( driver_name, "t1cid" ) == 0 )
font_info = &((CID_Face)face)->cid.font_info;
else if ( ft_strcmp( driver_name, "type42" ) == 0 )
- font_info = &((T42_Face)face)->type42.font_info;
+ font_info = &((T42_Face)face)->type1.font_info;
}
if ( font_info != NULL )
{
@@ -76,6 +76,7 @@
driver_name = face->driver->root.clazz->module_name;
result = ( ft_strcmp( driver_name, "type1" ) == 0 ||
+ ft_strcmp( driver_name, "type42" ) == 0 ||
ft_strcmp( driver_name, "cff" ) == 0 );
}
Index: src/type42/t42objs.h
===================================================================
RCS file: /cvs/freetype/freetype2/src/type42/t42objs.h,v
retrieving revision 1.2
diff -u -r1.2 t42objs.h
--- t42objs.h 2002/06/08 06:47:18 1.2
+++ t42objs.h 2002/06/21 21:44:37
@@ -22,6 +22,7 @@
#include FT_FREETYPE_H
#include FT_TYPE1_TABLES_H
#include FT_INTERNAL_TYPE1_TYPES_H
+#include FT_INTERNAL_TYPE42_TYPES_H
#include FT_INTERNAL_OBJECTS_H
#include FT_INTERNAL_DRIVER_H
#include FT_INTERNAL_POSTSCRIPT_NAMES_H
@@ -29,25 +30,6 @@
FT_BEGIN_HEADER
-
- /* Type42 face */
- typedef struct T42_FaceRec_
- {
- FT_FaceRec root;
- T1_FontRec type1;
- const void* psnames;
- const void* psaux;
- const void* afm_data;
-
- FT_CharMapRec charmaprecs[2];
- FT_CharMap charmaps[2];
- PS_Unicodes unicode_map;
-
- FT_Byte* ttf_data;
- FT_ULong ttf_size;
- FT_Face ttf_face;
-
- } T42_FaceRec, *T42_Face;
/* Type42 size */
- [Devel] Type42 cleanup,
Roberto Alameda <=