From 56ceaa4853c408abae3e94b8a7bd670ef287e06c Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Mon, 14 May 2007 18:53:58 +0000 Subject: [PATCH] Formatting. --- ChangeLog | 13 +++++++----- include/freetype/ftcache.h | 42 ++++++++++++++++++++------------------ src/cache/ftcbasic.c | 7 ++++--- src/truetype/ttobjs.c | 2 +- 4 files changed, 35 insertions(+), 29 deletions(-) diff --git a/ChangeLog b/ChangeLog index ed3f311d5..677fe8153 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,11 +5,14 @@ 2007-05-11 David Turner - * src/cache/ftbasic.c, include/freetype/ftcache.h: introduce - two new functions FTC_ImageCache_LookupScaler and - FTC_SBitCache_LookupScaler that allows us to lookup glyphs using a - FTC_Scaler object to specify the size. This allows fractional pixel - sizes + * src/cache/ftbasic.c, include/freetype/ftcache.h + (FTC_ImageCache_LookupScaler, FTC_SBit_Cache_LookupScaler): Two new + functions that allow us to look up glyphs using an FTC_Scaler object + to specify the size, making it possible to use fractional pixel + sizes. + + * src/truetype/ttobjs.c (tt_size_ready_bytecode): Set + `size->cvt_ready'. Reported by Boris Letocha. 2007-05-09 Graham Asher diff --git a/include/freetype/ftcache.h b/include/freetype/ftcache.h index 8b74cf505..e713b2584 100644 --- a/include/freetype/ftcache.h +++ b/include/freetype/ftcache.h @@ -4,7 +4,7 @@ /* */ /* FreeType Cache subsystem (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -782,25 +782,25 @@ FT_BEGIN_HEADER /* FTC_ImageCache_LookupScaler */ /* */ /* */ - /* A variant of @FTC_ImageCache_Lookup that uses a @FTC_ScalerRec */ - /* to specify the face id and its size */ + /* A variant of @FTC_ImageCache_Lookup that uses an @FTC_ScalerRec */ + /* to specify the face ID and its size. */ /* */ /* */ /* cache :: A handle to the source glyph image cache. */ /* */ /* scaler :: A pointer to a scaler descriptor. */ /* */ - /* load_flags :: corresponding load flags */ + /* load_flags :: The corresponding load flags. */ /* */ - /* gindex :: The glyph index to retrieve. */ + /* gindex :: The glyph index to retrieve. */ /* */ /* */ - /* aglyph :: The corresponding @FT_Glyph object. 0 in case of */ - /* failure. */ + /* aglyph :: The corresponding @FT_Glyph object. 0 in case of */ + /* failure. */ /* */ - /* anode :: Used to return the address of of the corresponding cache */ - /* node after incrementing its reference count (see note */ - /* below). */ + /* anode :: Used to return the address of of the corresponding */ + /* cache node after incrementing its reference count */ + /* (see note below). */ /* */ /* */ /* FreeType error code. 0 means success. */ @@ -829,6 +829,7 @@ FT_BEGIN_HEADER FT_Glyph *aglyph, FTC_Node *anode ); + /*************************************************************************/ /* */ /* */ @@ -982,30 +983,31 @@ FT_BEGIN_HEADER FTC_SBit *sbit, FTC_Node *anode ); + /*************************************************************************/ /* */ /* */ /* FTC_SBitCache_LookupScaler */ /* */ /* */ - /* A variant of @FTC_SBitCache_Lookup that uses a @FTC_ScalerRec */ - /* to specify the face id and its size. */ + /* A variant of @FTC_SBitCache_Lookup that uses an @FTC_ScalerRec */ + /* to specify the face ID and its size. */ /* */ /* */ - /* cache :: A handle to the source sbit cache. */ + /* cache :: A handle to the source sbit cache. */ /* */ - /* scaler :: A pointer to the scaler descriptor. */ + /* scaler :: A pointer to the scaler descriptor. */ /* */ - /* load_flags :: corresponding load flags */ + /* load_flags :: The corresponding load flags. */ /* */ - /* gindex :: The glyph index. */ + /* gindex :: The glyph index. */ /* */ /* */ - /* sbit :: A handle to a small bitmap descriptor. */ + /* sbit :: A handle to a small bitmap descriptor. */ /* */ - /* anode :: Used to return the address of of the corresponding cache */ - /* node after incrementing its reference count (see note */ - /* below). */ + /* anode :: Used to return the address of of the corresponding */ + /* cache node after incrementing its reference count */ + /* (see note below). */ /* */ /* */ /* FreeType error code. 0 means success. */ diff --git a/src/cache/ftcbasic.c b/src/cache/ftcbasic.c index 91465bfee..a568b975b 100644 --- a/src/cache/ftcbasic.c +++ b/src/cache/ftcbasic.c @@ -4,7 +4,7 @@ /* */ /* The FreeType basic cache interface (body). */ /* */ -/* Copyright 2003, 2004, 2005, 2006 by */ +/* Copyright 2003, 2004, 2005, 2006, 2007 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -383,7 +383,6 @@ } - /* documentation is in ftcache.h */ FT_EXPORT_DEF( FT_Error ) @@ -709,6 +708,8 @@ } + /* documentation is in ftcache.h */ + FT_EXPORT_DEF( FT_Error ) FTC_SBitCache_LookupScaler( FTC_SBitCache cache, FTC_Scaler scaler, @@ -737,7 +738,7 @@ /* beware, the hash must be the same for all glyph ranges! */ hash = FTC_BASIC_ATTR_HASH( &query.attrs ) + - gindex / FTC_SBIT_ITEMS_PER_NODE; + gindex / FTC_SBIT_ITEMS_PER_NODE; FTC_GCACHE_LOOKUP_CMP( cache, ftc_basic_family_compare, diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c index 57c197e1c..7155cca63 100644 --- a/src/truetype/ttobjs.c +++ b/src/truetype/ttobjs.c @@ -693,7 +693,7 @@ size->GS = tt_default_graphics_state; error = tt_size_run_prep( size ); - if (!error) + if ( !error ) size->cvt_ready = 1; } Exit: