From 570b1fdb84297903af5c3d404d3d047faf14ddd3 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Sun, 5 Oct 2008 06:08:40 +0000 Subject: [PATCH] formatting --- ChangeLog | 25 ++++++++++++------------- include/freetype/tttags.h | 2 +- src/base/ftobjs.c | 2 +- src/sfnt/sfobjs.c | 12 ++++++------ src/sfnt/ttload.c | 12 +++++++----- 5 files changed, 27 insertions(+), 26 deletions(-) diff --git a/ChangeLog b/ChangeLog index e6731d135..7ecc19255 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,29 +5,28 @@ 2008-10-05 suzuki toshiya - * include/freetype/tttags.h: Fix wrong definitions of TTAG_TYP1 - and TTAG_typ1. + * include/freetype/tttags.h (TTAG_TYP1, TTAG_typ1): Fix definitions. * src/base/ftobjs.c: Include FT_TRUETYPE_TAGS_H. 2008-10-05 suzuki toshiya - * src/sfnt/sfobjs.c (sfnt_open_font): Allow 'typ1' version - tag in the beginning of sfnt container. + * src/sfnt/sfobjs.c (sfnt_open_font): Allow `typ1' version tag in + the beginning of sfnt container. * src/sfnt/ttload.c (check_table_dir): Return - `SFNT_Err_Table_Missing' when sfnt table directory structure - is correct but essential tables for TrueType fonts (`head', - `bhed' or `SING') are missing. Other errors are returned - by SFNT_Err_Unknown_File_Format. + `SFNT_Err_Table_Missing' when sfnt table directory structure is + correct but essential tables for TrueType fonts (`head', `bhed' or + `SING') are missing. Other errors are returned by + SFNT_Err_Unknown_File_Format. * src/base/ftobjs.c (FT_Open_Face): When TrueType driver returns - `FT_Err_Table_Missing', try `open_face_PS_from_sfnt_stream'. - It is enabled only when old mac font support is configured. + `FT_Err_Table_Missing', try `open_face_PS_from_sfnt_stream'. It is + enabled only when old mac font support is configured. 2008-10-04 suzuki toshiya - * include/freetype/tttags.h: Add TTAG_CID, TTAG_FOND, TTAG_LWFN, - TTAG_POST, TTAG_sfnt, TTAG_TYP1, TTAG_typ1 to simplify the - repeated calculations of these values in ftobjs.c and ftmac.c. + * include/freetype/tttags.h (TTAG_CID, TTAG_FOND, TTAG_LWFN, + TTAG_POST, TTAG_sfnt, TTAG_TYP1, TTAG_typ1): New tags to simplify + the repeated calculations of these values in ftobjs.c and ftmac.c. * src/base/ftobjs.c: Replace all FT_MAKE_TAG by new tags. * src/base/ftmac.c: Ditto. * builds/mac/ftmac.c: Ditto. diff --git a/include/freetype/tttags.h b/include/freetype/tttags.h index 4d344be33..307ce4b63 100644 --- a/include/freetype/tttags.h +++ b/include/freetype/tttags.h @@ -4,7 +4,7 @@ /* */ /* Tags for TrueType and OpenType tables (specification only). */ /* */ -/* Copyright 1996-2001, 2004, 2005, 2007 by */ +/* Copyright 1996-2001, 2004, 2005, 2007, 2008 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c index cfd9ad720..0d036f612 100644 --- a/src/base/ftobjs.c +++ b/src/base/ftobjs.c @@ -1954,7 +1954,7 @@ #ifdef FT_CONFIG_OPTION_MAC_FONTS if ( ft_strcmp( cur[0]->clazz->module_name, "truetype" ) == 0 && - FT_ERROR_BASE( error ) == FT_Err_Table_Missing ) + FT_ERROR_BASE( error ) == FT_Err_Table_Missing ) { /* TrueType but essential tables are missing */ if ( FT_Stream_Seek( stream, 0 ) ) diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c index 4f074d345..0b73f212e 100644 --- a/src/sfnt/sfobjs.c +++ b/src/sfnt/sfobjs.c @@ -363,12 +363,12 @@ if ( FT_READ_ULONG( tag ) ) return error; - if ( tag != 0x00010000UL && - tag != TTAG_ttcf && - tag != TTAG_OTTO && - tag != TTAG_true && - tag != TTAG_typ1 && - tag != 0x00020000UL ) + if ( tag != 0x00010000UL && + tag != TTAG_ttcf && + tag != TTAG_OTTO && + tag != TTAG_true && + tag != TTAG_typ1 && + tag != 0x00020000UL ) return SFNT_Err_Unknown_File_Format; face->ttc_header.tag = TTAG_ttcf; diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c index aa14e946f..5219627cb 100644 --- a/src/sfnt/ttload.c +++ b/src/sfnt/ttload.c @@ -141,12 +141,14 @@ /* - look for a `head' table, check its size, and parse it to check */ /* whether its `magic' field is correctly set */ /* */ - /* - errors (except of errors returned by stream handling) */ + /* - errors (except errors returned by stream handling) */ /* */ - /* SFNT_Err_Unknown_File_Format: no table is defined in directory, */ - /* it's not sfnt-wrapped data. */ - /* SFNT_Err_Table_Missing: table directory is valid, but essential */ - /* tables (head/bhed/SING) are missing. */ + /* SFNT_Err_Unknown_File_Format: */ + /* no table is defined in directory, it is not sfnt-wrapped */ + /* data */ + /* SFNT_Err_Table_Missing: */ + /* table directory is valid, but essential tables */ + /* (head/bhed/SING) are missing */ /* */ static FT_Error check_table_dir( SFNT_Header sfnt,