* src/bdf/bdfdrivr.c (bdf_interpret_style), src/pcf/pcfread.c

(pcf_interpret_style): Replace spaces with dashes in properties
SETWIDTH_NAME and ADD_STYLE_NAME to simplify parsing.
This commit is contained in:
Werner Lemberg 2003-11-15 17:44:13 +00:00
parent 68e5427abe
commit 0b58b0a94c
3 changed files with 23 additions and 7 deletions

View File

@ -1,3 +1,9 @@
2003-11-13 John A. Boyd Jr. <jaboydjr@netwalk.com>
* src/bdf/bdfdrivr.c (bdf_interpret_style), src/pcf/pcfread.c
(pcf_interpret_style): Replace spaces with dashes in properties
SETWIDTH_NAME and ADD_STYLE_NAME to simplify parsing.
2003-11-11 Werner Lemberg <wl@gnu.org>
* docs/CHANGES: Updated.

View File

@ -238,7 +238,8 @@ THE SOFTWARE.
face->style_name = (char *)"Regular";
else
{
char *style, *s;
char *style, *s;
unsigned int i;
if ( FT_ALLOC( style, len + parts ) )
@ -248,8 +249,10 @@ THE SOFTWARE.
if ( astr )
{
ft_strcpy( s, astr);
s += ft_strlen( astr );
ft_strcpy( s, astr );
for ( i = 0; i < ft_strlen( astr ); i++, s++ )
if ( *s == ' ' )
*s = '-'; /* replace spaces with dashes */
*(s++) = ' ';
}
if ( bstr )
@ -267,7 +270,9 @@ THE SOFTWARE.
if ( sstr )
{
ft_strcpy( s, sstr );
s += ft_strlen( sstr );
for ( i = 0; i < ft_strlen( sstr ); i++, s++ )
if ( *s == ' ' )
*s = '-'; /* replace spaces with dashes */
*(s++) = ' ';
}
*(--s) = '\0'; /* overwrite last ' ', terminate the string */

View File

@ -926,7 +926,8 @@ THE SOFTWARE.
face->style_name = (char *)"Regular";
else
{
char *style, *s;
char *style, *s;
unsigned int i;
if ( FT_ALLOC( style, len + parts ) )
@ -937,7 +938,9 @@ THE SOFTWARE.
if ( astr )
{
ft_strcpy( s, astr );
s += ft_strlen( astr );
for ( i = 0; i < ft_strlen( astr ); i++, s++ )
if ( *s == ' ' )
*s = '-'; /* replace spaces with dashes */
*(s++) = ' ';
}
if ( bstr )
@ -955,7 +958,9 @@ THE SOFTWARE.
if ( sstr )
{
ft_strcpy( s, sstr );
s += ft_strlen( sstr );
for ( i = 0; i < ft_strlen( sstr ); i++, s++ )
if ( *s == ' ' )
*s = '-'; /* replace spaces with dashes */
*(s++) = ' ';
}
*(--s) = '\0'; /* overwrite last ' ', terminate the string */