ref: 64591b765710775d95852eecc3981cc1c865bec3
parent: 65ba724b66724f19c52d5794b95f8a75402054ff
author: Werner Lemberg <[email protected]>
date: Sun Jun 1 17:30:04 EDT 2003
* 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.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2003-05-31 Werner Lemberg <[email protected]>
+
+ * include/freetype/fttrigon.h (FT_Vector_Normalize): Removed.
+
+2003-05-31 <[email protected]>
+
+ * 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 <[email protected]>
Avoid overwriting of numeric font dictionary entries for synthetic
--- a/builds/unix/freetype2.in
+++ b/builds/unix/freetype2.in
@@ -5,7 +5,7 @@
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
--- 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, */
@@ -255,22 +255,6 @@
/* */
FT_EXPORT( FT_Fixed )
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 );
/*************************************************************************/
--- 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 */