* include/freetype/fttrigon.h (FT_Vector_Normalize): Removed.

* 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.
This commit is contained in:
Werner Lemberg 2003-06-01 21:30:04 +00:00
parent 65ba724b66
commit 64591b7657
4 changed files with 34 additions and 31 deletions

View File

@ -1,3 +1,14 @@
2003-05-31 Werner Lemberg <wl@gnu.org>
* include/freetype/fttrigon.h (FT_Vector_Normalize): Removed.
2003-05-31 <Ron.Dev@gmx.de>
* 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 <wl@gnu.org>
Avoid overwriting of numeric font dictionary entries for synthetic

View File

@ -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

View File

@ -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: */

View File

@ -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 */