[smooth,type1] Formatting, whitespace.
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
diff --git a/src/smooth/ftsmooth.c b/src/smooth/ftsmooth.c
index db3a1c3..938d295 100644
--- a/src/smooth/ftsmooth.c
+++ b/src/smooth/ftsmooth.c
@@ -231,9 +231,9 @@
FT_Byte* temp;
FT_Int i, j;
- unsigned int height = bitmap->rows;
- unsigned int width = bitmap->width;
- int pitch = bitmap->pitch;
+ unsigned int height = bitmap->rows;
+ unsigned int width = bitmap->width;
+ int pitch = bitmap->pitch;
/* Render 3 separate monochrome bitmaps, shifting the outline */
@@ -247,7 +247,7 @@
goto Exit;
FT_Outline_Translate( outline, -21, 0 );
- x_shift -= 21;
+ x_shift -= 21;
bitmap->buffer += width;
error = render->raster_render( render->raster, ¶ms );
@@ -255,7 +255,7 @@
goto Exit;
FT_Outline_Translate( outline, 42, 0 );
- x_shift += 42;
+ x_shift += 42;
bitmap->buffer -= 2 * width;
error = render->raster_render( render->raster, ¶ms );
@@ -284,7 +284,7 @@
}
else if ( vmul ) /* lcd_v */
{
- int pitch = bitmap->pitch;
+ int pitch = bitmap->pitch;
/* Render 3 separate monochrome bitmaps, shifting the outline */
@@ -299,7 +299,7 @@
goto Exit;
FT_Outline_Translate( outline, 0, 21 );
- y_shift += 21;
+ y_shift += 21;
bitmap->buffer += pitch;
error = render->raster_render( render->raster, ¶ms );
@@ -307,7 +307,7 @@
goto Exit;
FT_Outline_Translate( outline, 0, -42 );
- y_shift -= 42;
+ y_shift -= 42;
bitmap->buffer -= 2 * pitch;
error = render->raster_render( render->raster, ¶ms );
@@ -324,8 +324,10 @@
Exit:
if ( !error )
+ {
/* everything is fine; the glyph is now officially a bitmap */
slot->format = FT_GLYPH_FORMAT_BITMAP;
+ }
else if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )
{
FT_FREE( bitmap->buffer );
diff --git a/src/type1/t1gload.c b/src/type1/t1gload.c
index 341d71a..30ca186 100644
--- a/src/type1/t1gload.c
+++ b/src/type1/t1gload.c
@@ -49,9 +49,9 @@
T1_Font type1 = &face->type1;
FT_Error error = FT_Err_Ok;
- PSAux_Service psaux = (PSAux_Service)face->psaux;
- const T1_Decoder_Funcs decoder_funcs = psaux->t1_decoder_funcs;
- PS_Decoder psdecoder;
+ PSAux_Service psaux = (PSAux_Service)face->psaux;
+ const T1_Decoder_Funcs decoder_funcs = psaux->t1_decoder_funcs;
+ PS_Decoder psdecoder;
#ifdef FT_CONFIG_OPTION_INCREMENTAL
FT_Incremental_InterfaceRec *inc =
@@ -60,6 +60,7 @@
PS_Driver driver = (PS_Driver)FT_FACE_DRIVER( face );
+
decoder->font_matrix = type1->font_matrix;
decoder->font_offset = type1->font_offset;
@@ -84,10 +85,11 @@
{
/* choose which renderer to use */
if ( driver->hinting_engine == FT_T1_HINTING_FREETYPE ||
- decoder->builder.metrics_only )
- error = decoder_funcs->parse_charstrings_old( decoder,
- (FT_Byte*)char_string->pointer,
- (FT_UInt)char_string->length );
+ decoder->builder.metrics_only )
+ error = decoder_funcs->parse_charstrings_old(
+ decoder,
+ (FT_Byte*)char_string->pointer,
+ (FT_UInt)char_string->length );
else
{
CFF_SubFontRec subfont;
@@ -95,12 +97,14 @@
psaux->ps_decoder_init( &psdecoder, decoder, TRUE );
- psaux->t1_make_subfont( FT_FACE( face ), &face->type1.private_dict, &subfont );
+ psaux->t1_make_subfont( FT_FACE( face ),
+ &face->type1.private_dict, &subfont );
psdecoder.current_subfont = &subfont;
- error = decoder_funcs->parse_charstrings( &psdecoder,
- (FT_Byte*)char_string->pointer,
- (FT_ULong)char_string->length );
+ error = decoder_funcs->parse_charstrings(
+ &psdecoder,
+ (FT_Byte*)char_string->pointer,
+ (FT_ULong)char_string->length );
/* Adobe's engine uses 16.16 numbers everywhere; */
/* as a consequence, glyphs larger than 2000ppem get rejected */
@@ -113,12 +117,12 @@
*force_scaling = TRUE;
- error = decoder_funcs->parse_charstrings( &psdecoder,
- (FT_Byte*)char_string->pointer,
- (FT_ULong)char_string->length );
+ error = decoder_funcs->parse_charstrings(
+ &psdecoder,
+ (FT_Byte*)char_string->pointer,
+ (FT_ULong)char_string->length );
}
}
-
}
#ifdef FT_CONFIG_OPTION_INCREMENTAL
@@ -154,9 +158,9 @@
{
FT_Data glyph_data;
FT_Bool force_scaling = FALSE;
- FT_Error error = T1_Parse_Glyph_And_Get_Char_String(
- decoder, glyph_index, &glyph_data,
- &force_scaling );
+ FT_Error error = T1_Parse_Glyph_And_Get_Char_String(
+ decoder, glyph_index, &glyph_data,
+ &force_scaling );
#ifdef FT_CONFIG_OPTION_INCREMENTAL