diff --git a/ChangeLog b/ChangeLog index 936e90f1a..ea05487f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2003-05-31 Werner Lemberg + + * include/freetype/fttrigon.h (FT_Vector_Normalize): Removed. + +2003-05-31 + + * src/type1/t1objs.c (T1_Face_Init): Improve algorithm for guessing + the font style by ignoring spaces and hyphens. + + * builds/unix/freetype2.in: Fix `Version' field. + 2003-05-30 Werner Lemberg Avoid overwriting of numeric font dictionary entries for synthetic diff --git a/builds/unix/freetype2.in b/builds/unix/freetype2.in index 2b1a6b399..0bc22d1ba 100644 --- a/builds/unix/freetype2.in +++ b/builds/unix/freetype2.in @@ -5,7 +5,7 @@ includedir=@includedir@ Name: FreeType 2 Description: A free, high-quality, and portable font engine. -Version: @VERSION@ +Version: @ft_version@ Requires: Libs: -L${libdir} -lfreetype @LIBZ@ Cflags: -I${includedir}/freetype2 diff --git a/include/freetype/fttrigon.h b/include/freetype/fttrigon.h index 3b8257b6d..cf0650e2f 100644 --- a/include/freetype/fttrigon.h +++ b/include/freetype/fttrigon.h @@ -4,7 +4,7 @@ /* */ /* FreeType trigonometric functions (specification). */ /* */ -/* Copyright 2001 by */ +/* Copyright 2001, 2003 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -257,22 +257,6 @@ FT_BEGIN_HEADER FT_Vector_Length( FT_Vector* vec ); - /*************************************************************************/ - /* */ - /* @function: */ - /* FT_Vector_Normalize */ - /* */ - /* @description: */ - /* Normalize a given vector (i.e. compute the equivalent unit */ - /* vector). */ - /* */ - /* @inout: */ - /* vec :: The address of target vector. */ - /* */ - FT_EXPORT( void ) - FT_Vector_Normalize( FT_Vector* vec ); - - /*************************************************************************/ /* */ /* @function: */ diff --git a/src/type1/t1objs.c b/src/type1/t1objs.c index 6209e3358..6edb96d5b 100644 --- a/src/type1/t1objs.c +++ b/src/type1/t1objs.c @@ -351,6 +351,8 @@ /* get style name -- be careful, some broken fonts only */ /* have a `/FontName' dictionary entry! */ root->family_name = info->family_name; + /* assume "Regular" style if we don't know better */ + root->style_name = (char *)"Regular"; if ( root->family_name ) { char* full = info->full_name; @@ -359,28 +361,34 @@ if ( full ) { - while ( *family && *full == *family ) + while ( *full ) { - family++; - full++; + if ( *full == *family ) + { + family++; + full++; + } + else + { + if ( *full == ' ' || *full == '-' ) + full++; + else if ( *family == ' ' || *family == '-' ) + family++; + else + { + if ( !*family ) + root->style_name = full; + break; + } + } } - - if ( *full == ' ' || *full == '-' ) - root->style_name = full + 1; - else - root->style_name = (char *)"Regular"; } - else - root->style_name = (char *)"Regular"; } else { /* do we have a `/FontName'? */ if ( type1->font_name ) - { root->family_name = type1->font_name; - root->style_name = (char *)"Regular"; - } } /* compute style flags */