From de465e40c3bb9afe3902efa23155a022a3a046d5 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Thu, 15 May 2003 06:44:09 +0000 Subject: [PATCH] * src/base/ftmac.c (FT_New_Face_From_SFNT): Handle CFF files also. * include/freetype/freetype.h: Fix typo in comment (FT_HAS_FIXED_SIZES). --- ChangeLog | 9 +++++++++ include/freetype/freetype.h | 2 +- src/base/ftbbox.c | 6 +++--- src/base/ftmac.c | 8 +++++++- src/base/fttrigon.c | 6 +++--- 5 files changed, 23 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index e882564f6..4f976c15b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2003-05-14 George Williams + + * src/base/ftmac.c (FT_New_Face_From_SFNT): Handle CFF files also. + +2003-05-14 Werner Lemberg + + * include/freetype/freetype.h: Fix typo in comment + (FT_HAS_FIXED_SIZES). + 2003-05-10 Dan Williams * builds/unix/aclocal.m4: Comment out definition of diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h index 96979bb1e..7d20a4b64 100644 --- a/include/freetype/freetype.h +++ b/include/freetype/freetype.h @@ -1016,7 +1016,7 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ /* @macro: */ - /* FT_IS_FIXED_SIZES( face ) */ + /* FT_HAS_FIXED_SIZES( face ) */ /* */ /* @description: */ /* A macro that returns true whenever a face object contains some */ diff --git a/src/base/ftbbox.c b/src/base/ftbbox.c index dd445d810..f71c9f0db 100644 --- a/src/base/ftbbox.c +++ b/src/base/ftbbox.c @@ -98,9 +98,9 @@ static void BBox_Conic_Check( FT_Pos y1, FT_Pos y2, - FT_Pos y3, - FT_Pos* min, - FT_Pos* max ) + FT_Pos y3, + FT_Pos* min, + FT_Pos* max ) { if ( y1 <= y3 ) { diff --git a/src/base/ftmac.c b/src/base/ftmac.c index 4dbd825de..ba018bcc9 100644 --- a/src/base/ftmac.c +++ b/src/base/ftmac.c @@ -588,6 +588,7 @@ size_t sfnt_size; FT_Error error = 0; FT_Memory memory = library->memory; + int is_cff; sfnt = GetResource( 'sfnt', sfnt_id ); @@ -606,11 +607,16 @@ HUnlock( sfnt ); ReleaseResource( sfnt ); + is_cff = rlen > 4 && sfnt_data[0] == 'O' && + sfnt_data[1] == 'T' && + sfnt_data[2] == 'T' && + sfnt_data[3] == 'O'; + return open_face_from_buffer( library, sfnt_data, sfnt_size, face_index, - "truetype", + is_cff ? "cff" : "truetype", aface ); } diff --git a/src/base/fttrigon.c b/src/base/fttrigon.c index c16fa2468..5bf55eb7c 100644 --- a/src/base/fttrigon.c +++ b/src/base/fttrigon.c @@ -4,7 +4,7 @@ /* */ /* FreeType trigonometric functions (body). */ /* */ -/* Copyright 2001 by */ +/* Copyright 2001, 2002, 2003 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -366,8 +366,8 @@ FT_Vector v; - v.x = vec->x; - v.y = vec->y; + v.x = vec->x; + v.y = vec->y; if ( angle && ( v.x != 0 || v.y != 0 ) ) {