* include/freetype/t1tables.h (PS_PrivateRec): Add `expansion_factor'. * src/pshinter/pshglob (psh_blues_scale_zones): Fix computation of blues->no_overshoots -- `blues_scale' is stored with a magnification of 1000, and `scale' returns fractional pixels. * src/type1/t1load.c (T1_Open_Face): Initialize `blue_shift', `blue_fuzz', `expansion_factor', and `blue_scale' according to the Type 1 specification. * src/type1/t1tokens.h: Handle `ExpansionFactor'. * docs/CHANGES: Updated.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
diff --git a/ChangeLog b/ChangeLog
index eb598ab..271e040 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,21 @@
-2004-02-17 Masatake YAMATO <jet@gyve.org>
+2004-02-24 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/t1tables.h (PS_PrivateRec): Add
+ `expansion_factor'.
+
+ * src/pshinter/pshglob (psh_blues_scale_zones): Fix computation
+ of blues->no_overshoots -- `blues_scale' is stored with a
+ magnification of 1000, and `scale' returns fractional pixels.
+
+ * src/type1/t1load.c (T1_Open_Face): Initialize `blue_shift',
+ `blue_fuzz', `expansion_factor', and `blue_scale' according to the
+ Type 1 specification.
+
+ * src/type1/t1tokens.h: Handle `ExpansionFactor'.
+
+ * docs/CHANGES: Updated.
+
+2004-02-24 Masatake YAMATO <jet@gyve.org>
Provide generic access to MacOS resource forks.
diff --git a/docs/CHANGES b/docs/CHANGES
index 3353442..77e815f 100644
--- a/docs/CHANGES
+++ b/docs/CHANGES
@@ -63,6 +63,10 @@ LATEST CHANGES BETWEEN 2.1.8 and 2.1.7
mechanism if compiled with FT_DEBUG_LEVEL_TRACE. See the file
`ftdebug.h' for more details.
+ - YAMATO Masatake contributed improved handling of MacOS resource
+ forks on non-MacOS platforms (for example, Linux can mount MacOS
+ file systems).
+
- The cache sub-system has been rewritten.
- There is now support for deinstallation of faces.
diff --git a/include/freetype/t1tables.h b/include/freetype/t1tables.h
index af8c416..1b89c5f 100644
--- a/include/freetype/t1tables.h
+++ b/include/freetype/t1tables.h
@@ -5,7 +5,7 @@
/* Basic Type 1/Type 2 tables definitions and interface (specification */
/* only). */
/* */
-/* Copyright 1996-2001, 2002, 2003 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -135,6 +135,8 @@ FT_BEGIN_HEADER
FT_Short snap_widths [13]; /* including std width */
FT_Short snap_heights[13]; /* including std height */
+ FT_Fixed expansion_factor;
+
FT_Long language_group;
FT_Long password;
@@ -163,7 +165,7 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* A set of flags used to indicate which fields are present in a */
- /* given blen dictionary (font info or private). Used to support */
+ /* given blend dictionary (font info or private). Used to support */
/* Multiple Masters fonts. */
/* */
typedef enum
diff --git a/src/pshinter/pshglob.c b/src/pshinter/pshglob.c
index 3971c59..a2edd0c 100644
--- a/src/pshinter/pshglob.c
+++ b/src/pshinter/pshglob.c
@@ -5,7 +5,7 @@
/* PostScript hinter global hinting management (body). */
/* Inspired by the new auto-hinter module. */
/* */
-/* Copyright 2001, 2002, 2003 by */
+/* Copyright 2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used */
@@ -377,7 +377,7 @@
/* parameter to the raw bluescale value. Here is why: */
/* */
/* We need to suppress overshoots for all pointsizes. */
- /* At 300dpi that satisfy: */
+ /* At 300dpi that satisfies: */
/* */
/* pointsize < 240*bluescale + 0.49 */
/* */
@@ -396,7 +396,16 @@
/* */
/* "scale < bluescale" */
/* */
- blues->no_overshoots = FT_BOOL( scale < blues->blue_scale );
+ /* Note that `blue_scale' is stored 1000 times its real */
+ /* real value, and that `scale' converts from font units */
+ /* to fractional pixels. */
+ /* */
+
+ /* 1000 / 64 = 125 / 8 */
+ if ( scale >= 0x20C49BAL )
+ blues->no_overshoots = FT_BOOL( scale < blues->blue_scale * 8 / 125 );
+ else
+ blues->no_overshoots = FT_BOOL( scale * 125 < blues->blue_scale * 8 );
/* */
/* The blue threshold is the font units distance under */
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index 3065443..6b33b68 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -1736,6 +1736,7 @@
T1_LoaderRec loader;
T1_Parser parser;
T1_Font type1 = &face->type1;
+ PS_Private priv = &type1->private_dict;
FT_Error error;
FT_Byte keyword_flags[T1_FIELD_COUNT];
@@ -1744,11 +1745,12 @@
t1_init_loader( &loader, face );
- /* default lenIV */
- type1->private_dict.lenIV = 4;
-
- /* default blue fuzz, we put it there since 0 is a valid value */
- type1->private_dict.blue_fuzz = 1;
+ /* default values */
+ priv->blue_shift = 7;
+ priv->blue_fuzz = 1;
+ priv->lenIV = 4;
+ priv->expansion_factor = (FT_Fixed)( 0.06 * 0x10000L );
+ priv->blue_scale = (FT_Fixed)( 0.039625 * 0x10000L * 1000 );
parser = &loader.parser;
error = T1_New_Parser( parser,
diff --git a/src/type1/t1tokens.h b/src/type1/t1tokens.h
index 23e0411..a3cc952 100644
--- a/src/type1/t1tokens.h
+++ b/src/type1/t1tokens.h
@@ -4,7 +4,7 @@
/* */
/* Type 1 tokenizer (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -60,6 +60,8 @@
T1_FIELD_NUM_TABLE ( "StemSnapH", snap_widths, 12 )
T1_FIELD_NUM_TABLE ( "StemSnapV", snap_heights, 12 )
+ T1_FIELD_FIXED ( "ExpansionFactor", expansion_factor )
+
#undef FT_STRUCTURE
#define FT_STRUCTURE T1_FontRec