[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Devel] Handling broken Type1 full name fields
From: |
Keith Packard |
Subject: |
[Devel] Handling broken Type1 full name fields |
Date: |
Sun, 11 Feb 2001 09:29:21 -0800 |
I've a few fonts with broken names; the face name is common to
several faces while the full name is unique, it doesn't simply contain the
face name followed by the style. Here's what I did to make these fonts be
identifiable by name:
Index: src/type1/t1objs.c
===================================================================
RCS file: /cvsroot/freetype2/src/type1/t1objs.c,v
retrieving revision 1.37
diff -u -r1.37 t1objs.c
--- t1objs.c 2001/02/07 01:14:53 1.37
+++ t1objs.c 2001/02/12 01:43:02
@@ -239,8 +239,15 @@
full++;
}
- root->style_name = ( *full == ' ' ? full + 1
- : (char *)"Regular" );
+ if (*full == ' ')
+ {
+ root->style_name = full + 1;
+ }
+ else
+ {
+ root->family_name = face->type1.font_info.full_name;
+ root->style_name = "Regular";
+ }
}
else
{
Because Xft matches fonts based on names, I really need accurate names, or
at least unique ones.
Thoughts on whether this is a good idea?
address@hidden XFree86 Core Team SuSE, Inc.
- [Devel] Handling broken Type1 full name fields,
Keith Packard <=