[base,cff,cid] Whitespace, 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 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 5722c55..79e7511 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -337,11 +337,11 @@
FT_Pixel_Mode pixel_mode;
- FT_BBox cbox;
- FT_Pos x_shift = 0;
- FT_Pos y_shift = 0;
- FT_Pos x_left, y_top;
- FT_Pos width, height, pitch;
+ FT_BBox cbox;
+ FT_Pos x_shift = 0;
+ FT_Pos y_shift = 0;
+ FT_Pos x_left, y_top;
+ FT_Pos width, height, pitch;
if ( slot->internal && ( slot->internal->flags & FT_GLYPH_OWN_BITMAP ) )
@@ -353,8 +353,8 @@
y_shift = origin->y;
}
- /* compute the control box, and grid fit it */
- /* taking into account the origin shift */
+ /* compute the control box, and grid-fit it, */
+ /* taking into account the origin shift */
FT_Outline_Get_CBox( outline, &cbox );
cbox.xMin += x_shift;
@@ -422,8 +422,8 @@
x_shift -= cbox.xMin;
y_shift -= cbox.yMin;
- x_left = cbox.xMin >> 6;
- y_top = cbox.yMax >> 6;
+ x_left = cbox.xMin >> 6;
+ y_top = cbox.yMax >> 6;
width = ( (FT_ULong)cbox.xMax - (FT_ULong)cbox.xMin ) >> 6;
height = ( (FT_ULong)cbox.yMax - (FT_ULong)cbox.yMin ) >> 6;
@@ -431,15 +431,18 @@
switch ( pixel_mode )
{
case FT_PIXEL_MODE_MONO:
- pitch = ( ( width + 15 ) >> 4 ) << 1;
+ pitch = ( ( width + 15 ) >> 4 ) << 1;
break;
+
case FT_PIXEL_MODE_LCD:
width *= 3;
pitch = FT_PAD_CEIL( width, 4 );
break;
+
case FT_PIXEL_MODE_LCD_V:
height *= 3;
/* fall through */
+
case FT_PIXEL_MODE_GRAY:
default:
pitch = width;
diff --git a/src/cff/cffdrivr.c b/src/cff/cffdrivr.c
index 419cdfd..340de9c 100644
--- a/src/cff/cffdrivr.c
+++ b/src/cff/cffdrivr.c
@@ -744,8 +744,8 @@
const void* value,
FT_Bool value_is_string )
{
- FT_Error error = FT_Err_Ok;
- PS_Driver driver = (PS_Driver)module;
+ FT_Error error = FT_Err_Ok;
+ PS_Driver driver = (PS_Driver)module;
#ifndef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
FT_UNUSED( value_is_string );
@@ -910,8 +910,8 @@
const char* property_name,
const void* value )
{
- FT_Error error = FT_Err_Ok;
- PS_Driver driver = (PS_Driver)module;
+ FT_Error error = FT_Err_Ok;
+ PS_Driver driver = (PS_Driver)module;
if ( !ft_strcmp( property_name, "darkening-parameters" ) )
@@ -1099,13 +1099,14 @@
FT_DEFINE_SERVICE_CFFLOADREC(
cff_service_cff_load,
- (FT_Get_Standard_Encoding_Func) cff_get_standard_encoding,
- (FT_Load_Private_Dict_Func) cff_load_private_dict,
- (FT_FD_Select_Get_Func) cff_fd_select_get,
- (FT_Blend_Check_Vector_Func) cff_blend_check_vector,
- (FT_Blend_Build_Vector_Func) cff_blend_build_vector
+ (FT_Get_Standard_Encoding_Func)cff_get_standard_encoding,
+ (FT_Load_Private_Dict_Func) cff_load_private_dict,
+ (FT_FD_Select_Get_Func) cff_fd_select_get,
+ (FT_Blend_Check_Vector_Func) cff_blend_check_vector,
+ (FT_Blend_Build_Vector_Func) cff_blend_build_vector
)
+
/*************************************************************************/
/*************************************************************************/
/*************************************************************************/
diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c
index 9a2080b..5429460 100644
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -145,6 +145,7 @@
PSAux_Service psaux = (PSAux_Service)face->psaux;
const CFF_Decoder_Funcs decoder_funcs = psaux->cff_decoder_funcs;
+
*max_advance = 0;
/* Initialize load decoder */
diff --git a/src/cff/cffload.c b/src/cff/cffload.c
index 21dd423..0875ead 100644
--- a/src/cff/cffload.c
+++ b/src/cff/cffload.c
@@ -2097,7 +2097,8 @@
do
{
face->root.internal->random_seed =
- (FT_Int32)psaux->cff_random( (FT_UInt32)face->root.internal->random_seed );
+ (FT_Int32)psaux->cff_random(
+ (FT_UInt32)face->root.internal->random_seed );
} while ( face->root.internal->random_seed < 0 );
}
diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c
index 29a14f9..c794d32 100644
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -504,8 +504,8 @@
FT_Library library = cffface->driver->root.library;
- sfnt = (SFNT_Service)FT_Get_Module_Interface(
- library, "sfnt" );
+ sfnt = (SFNT_Service)FT_Get_Module_Interface( library,
+ "sfnt" );
if ( !sfnt )
{
FT_ERROR(( "cff_face_init: cannot access `sfnt' module\n" ));
@@ -515,11 +515,11 @@
FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS );
- pshinter = (PSHinter_Service)FT_Get_Module_Interface(
- library, "pshinter" );
+ pshinter = (PSHinter_Service)FT_Get_Module_Interface( library,
+ "pshinter" );
- psaux = (PSAux_Service)FT_Get_Module_Interface(
- library, "psaux" );
+ psaux = (PSAux_Service)FT_Get_Module_Interface( library,
+ "psaux" );
if ( !psaux )
{
FT_ERROR(( "cff_face_init: cannot access `psaux' module\n" ));
diff --git a/src/cff/cffparse.c b/src/cff/cffparse.c
index 888b2d5..e4e2bcd 100644
--- a/src/cff/cffparse.c
+++ b/src/cff/cffparse.c
@@ -1303,12 +1303,11 @@
PSAux_Service psaux;
#endif
-
FT_Byte* p = start;
FT_Error error = FT_Err_Ok;
FT_Library library = parser->library;
- FT_UNUSED( library );
+ FT_UNUSED( library );
parser->top = parser->stack;
@@ -1394,8 +1393,7 @@
cff_rec.top_font.font_dict.num_axes = parser->num_axes;
decoder.cff = &cff_rec;
- psaux = (PSAux_Service)FT_Get_Module_Interface(
- library, "psaux" );
+ psaux = (PSAux_Service)FT_Get_Module_Interface( library, "psaux" );
if ( !psaux )
{
FT_ERROR(( "cff_parser_run: cannot access `psaux' module\n" ));
@@ -1403,10 +1401,8 @@
goto Exit;
}
- error = psaux->cff_decoder_funcs->parse_charstrings_old( &decoder,
- charstring_base,
- charstring_len,
- 1 );
+ error = psaux->cff_decoder_funcs->parse_charstrings_old(
+ &decoder, charstring_base, charstring_len, 1 );
/* Now copy the stack data in the temporary decoder object, */
/* converting it back to charstring number representations */
diff --git a/src/cid/cidgload.c b/src/cid/cidgload.c
index f0b4988..8541cca 100644
--- a/src/cid/cidgload.c
+++ b/src/cid/cidgload.c
@@ -56,11 +56,11 @@
FT_ULong glyph_length = 0;
PSAux_Service psaux = (PSAux_Service)face->psaux;
- FT_Bool force_scaling = FALSE;
+ FT_Bool force_scaling = FALSE;
#ifdef FT_CONFIG_OPTION_INCREMENTAL
- FT_Incremental_InterfaceRec *inc =
- face->root.internal->incremental_interface;
+ FT_Incremental_InterfaceRec *inc =
+ face->root.internal->incremental_interface;
#endif
@@ -176,11 +176,13 @@
psaux->t1_decrypt( charstring, glyph_length, 4330 );
/* choose which renderer to use */
- if ( ((PS_Driver)FT_FACE_DRIVER( face ))->hinting_engine == FT_T1_HINTING_FREETYPE ||
- decoder->builder.metrics_only )
- error = psaux->t1_decoder_funcs->parse_charstrings_old( decoder,
- charstring + cs_offset,
- glyph_length - cs_offset );
+ if ( ( (PS_Driver)FT_FACE_DRIVER( face ) )->hinting_engine ==
+ FT_T1_HINTING_FREETYPE ||
+ decoder->builder.metrics_only )
+ error = psaux->t1_decoder_funcs->parse_charstrings_old(
+ decoder,
+ charstring + cs_offset,
+ glyph_length - cs_offset );
else
{
PS_Decoder psdecoder;
@@ -189,12 +191,15 @@
psaux->ps_decoder_init( &psdecoder, decoder, TRUE );
- psaux->t1_make_subfont( FT_FACE( face ), &dict->private_dict, &subfont );
+ psaux->t1_make_subfont( FT_FACE( face ),
+ &dict->private_dict,
+ &subfont );
psdecoder.current_subfont = &subfont;
- error = psaux->t1_decoder_funcs->parse_charstrings( &psdecoder,
- charstring + cs_offset,
- glyph_length - cs_offset );
+ error = psaux->t1_decoder_funcs->parse_charstrings(
+ &psdecoder,
+ charstring + cs_offset,
+ glyph_length - cs_offset );
/* Adobe's engine uses 16.16 numbers everywhere; */
/* as a consequence, glyphs larger than 2000ppem get rejected */
@@ -207,9 +212,10 @@
force_scaling = TRUE;
- error = psaux->t1_decoder_funcs->parse_charstrings( &psdecoder,
- charstring + cs_offset,
- glyph_length - cs_offset );
+ error = psaux->t1_decoder_funcs->parse_charstrings(
+ &psdecoder,
+ charstring + cs_offset,
+ glyph_length - cs_offset );
}
}
}
@@ -386,9 +392,9 @@
if ( error )
goto Exit;
- /* Copy flags back for forced scaling */
- hinting = glyph->hint;
- scaled = glyph->scaled;
+ /* copy flags back for forced scaling */
+ hinting = glyph->hint;
+ scaled = glyph->scaled;
font_matrix = decoder.font_matrix;
font_offset = decoder.font_offset;