Formatting.
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 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248
diff --git a/include/freetype/internal/ftobjs.h b/include/freetype/internal/ftobjs.h
index 5fa341f..16385fa 100644
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -342,12 +342,6 @@ FT_BEGIN_HEADER
/* this data when first opened. This field exists only if */
/* @FT_CONFIG_OPTION_INCREMENTAL is defined. */
/* */
- /* refcount :: */
- /* A counter initialized to~1 at the time an @FT_Face structure is */
- /* created. @FT_Reference_Face increments this counter, and */
- /* @FT_Done_Face only destroys a face if the counter is~1, */
- /* otherwise it simply decrements it. */
- /* */
/* no_stem_darkening :: */
/* Overrides the module-level default, see @stem-darkening[cff], */
/* for example. FALSE and TRUE toggle stem darkening on and off, */
@@ -357,11 +351,17 @@ FT_BEGIN_HEADER
/* Overrides the library default with custom weights for the 5-tap */
/* FIR filter. `{0, 0, 0, 0, 0}' means to use the library default. */
/* */
+ /* refcount :: */
+ /* A counter initialized to~1 at the time an @FT_Face structure is */
+ /* created. @FT_Reference_Face increments this counter, and */
+ /* @FT_Done_Face only destroys a face if the counter is~1, */
+ /* otherwise it simply decrements it. */
+ /* */
typedef struct FT_Face_InternalRec_
{
- FT_Matrix transform_matrix;
- FT_Vector transform_delta;
- FT_Int transform_flags;
+ FT_Matrix transform_matrix;
+ FT_Vector transform_delta;
+ FT_Int transform_flags;
FT_ServiceCacheRec services;
@@ -369,14 +369,13 @@ FT_BEGIN_HEADER
FT_Incremental_InterfaceRec* incremental_interface;
#endif
- FT_Int refcount;
-
- FT_Char no_stem_darkening;
-
+ FT_Char no_stem_darkening;
#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
FT_LcdFiveTapFilter lcd_weights; /* preset or custom filter weights */
#endif
+ FT_Int refcount;
+
} FT_Face_InternalRec;
@@ -843,14 +842,17 @@ FT_BEGIN_HEADER
/* handle to the current renderer for the */
/* FT_GLYPH_FORMAT_OUTLINE format. */
/* */
- /* auto_hinter :: XXX */
+ /* auto_hinter :: The auto-hinter module interface. */
/* */
/* raster_pool :: The raster object's render pool. This can */
/* ideally be changed dynamically at run-time. */
/* */
/* raster_pool_size :: The size of the render pool in bytes. */
/* */
- /* debug_hooks :: XXX */
+ /* debug_hooks :: An array of four function pointers that allow */
+ /* debuggers to hook into a font format's */
+ /* interpreter. Currently, only the TrueType */
+ /* bytecode debugger uses this. */
/* */
/* lcd_filter :: If subpixel rendering is activated, the */
/* selected LCD filter mode. */
diff --git a/include/freetype/internal/tttypes.h b/include/freetype/internal/tttypes.h
index e779647..d6c57ce 100644
--- a/include/freetype/internal/tttypes.h
+++ b/include/freetype/internal/tttypes.h
@@ -1457,7 +1457,7 @@ FT_BEGIN_HEADER
/***********************************************************************/
/* */
- /* TrueType-specific fields (ignored by the OTF-Type2 driver) */
+ /* TrueType-specific fields (ignored by the CFF driver) */
/* */
/***********************************************************************/
diff --git a/src/cff/cffdrivr.c b/src/cff/cffdrivr.c
index c0466d0..fe28574 100644
--- a/src/cff/cffdrivr.c
+++ b/src/cff/cffdrivr.c
@@ -833,6 +833,7 @@
{
FT_UInt* hinting_engine = (FT_UInt*)value;
+
if ( *hinting_engine == FT_CFF_HINTING_ADOBE
#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
|| *hinting_engine == FT_CFF_HINTING_FREETYPE
diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c
index a639350..f0320af 100644
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -684,62 +684,56 @@
}
#endif /* FT_DEBUG_LEVEL_TRACE */
-
-
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
-
- {
- FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm;
-
- FT_Int instance_index = face_index >> 16;
-
-
- if ( FT_HAS_MULTIPLE_MASTERS( cffface ) &&
- mm &&
- instance_index > 0 )
{
- FT_MM_Var* mm_var;
-
+ FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm;
- error = mm->get_mm_var( cffface, NULL );
- if ( error )
- goto Exit;
+ FT_Int instance_index = face_index >> 16;
- mm->get_var_blend( cffface, NULL, NULL, &mm_var );
- if ( mm_var->namedstyle )
+ if ( FT_HAS_MULTIPLE_MASTERS( cffface ) &&
+ mm &&
+ instance_index > 0 )
{
- FT_Var_Named_Style* named_style;
- FT_String* style_name;
+ FT_MM_Var* mm_var;
- /* in `face_index', the instance index starts with value 1 */
- named_style = mm_var->namedstyle + instance_index - 1;
- error = sfnt->get_name( face,
- (FT_UShort)named_style->strid,
- &style_name );
+ error = mm->get_mm_var( cffface, NULL );
if ( error )
goto Exit;
- /* set style name; if already set, replace it */
- if ( face->root.style_name )
- FT_FREE( face->root.style_name );
- face->root.style_name = style_name;
+ mm->get_var_blend( cffface, NULL, NULL, &mm_var );
- /* finally, select the named instance */
- error = mm->set_var_design( cffface,
- mm_var->num_axis,
- named_style->coords );
- if ( error )
- goto Exit;
+ if ( mm_var->namedstyle )
+ {
+ FT_Var_Named_Style* named_style;
+ FT_String* style_name;
+
+
+ /* in `face_index', the instance index starts with value 1 */
+ named_style = mm_var->namedstyle + instance_index - 1;
+ error = sfnt->get_name( face,
+ (FT_UShort)named_style->strid,
+ &style_name );
+ if ( error )
+ goto Exit;
+
+ /* set style name; if already set, replace it */
+ if ( face->root.style_name )
+ FT_FREE( face->root.style_name );
+ face->root.style_name = style_name;
+
+ /* finally, select the named instance */
+ error = mm->set_var_design( cffface,
+ mm_var->num_axis,
+ named_style->coords );
+ if ( error )
+ goto Exit;
+ }
}
}
- }
-
#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */
-
-
if ( !dict->has_font_matrix )
dict->units_per_em = pure_cff ? 1000 : face->root.units_per_EM;
@@ -1022,7 +1016,6 @@
cffface->style_flags = flags;
}
-
#ifndef FT_CONFIG_OPTION_NO_GLYPH_NAMES
/* CID-keyed CFF fonts don't have glyph names -- the SFNT loader */
/* has unset this flag because of the 3.0 `post' table. */
@@ -1033,7 +1026,6 @@
if ( dict->cid_registry != 0xFFFFU && pure_cff )
cffface->face_flags |= FT_FACE_FLAG_CID_KEYED;
-
/*******************************************************************/
/* */
/* Compute char maps. */
diff --git a/src/cff/cffobjs.h b/src/cff/cffobjs.h
index 5d26977..2b88e0e 100644
--- a/src/cff/cffobjs.h
+++ b/src/cff/cffobjs.h
@@ -118,10 +118,9 @@ FT_BEGIN_HEADER
{
FT_DriverRec root;
- FT_UInt hinting_engine;
- FT_Bool no_stem_darkening;
-
- FT_Int darken_params[8];
+ FT_UInt hinting_engine;
+ FT_Bool no_stem_darkening;
+ FT_Int darken_params[8];
} CFF_DriverRec;
diff --git a/src/cff/cfftypes.h b/src/cff/cfftypes.h
index 412712c..0c24ed5 100644
--- a/src/cff/cfftypes.h
+++ b/src/cff/cfftypes.h
@@ -389,6 +389,7 @@ FT_BEGIN_HEADER
/* since version 2.4.12 */
FT_Generic cf2_instance;
+ /* since version 2.7.1 */
CFF_VStoreRec vstore; /* parsed vstore structure */
} CFF_FontRec;