ref: af03d1eaa173d9a1016370ed182fd98cda66965e
parent: 179caf5a618a684d3f8f25e0f3def3c41c2504ab
author: Werner Lemberg <[email protected]>
date: Sun Oct 1 05:23:42 EDT 2017
[smooth,type1] Formatting, whitespace.
--- 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 );
--- 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