Re: pango fonts default aliases --> gnome fonts?
- From: Akira TAGOH <tagoh redhat com>
- To: Radek Doulik <rodo ximian com>
- Cc: Chema Celorio <chema ximian com>, gnome-print-list gnome org
- Subject: Re: pango fonts default aliases --> gnome fonts?
- Date: Thu Jan 30 06:56:01 2003
>>>>> On Thu, 30 Jan 2003 20:44:55 +0900 (JST),
>>>>> "AT" == Akira TAGOH <tagoh redhat com> wrote:
AT> Attached patch will fixes this problem.
Err, this patch is correct.
Regards,
--
Akira TAGOH : tagoh gnome gr jp / Japan GNOME Users Group
at gclab org : tagoh gnome-db org / GNOME-DB Project
: tagoh redhat com / Red Hat, Inc.
: tagoh debian org / Debian Project
Index: gnome-font-face.c
===================================================================
RCS file: /cvs/gnome/libgnomeprint/libgnomeprint/gnome-font-face.c,v
retrieving revision 1.67
diff -u -r1.67 gnome-font-face.c
--- gnome-font-face.c 14 Jan 2003 01:23:26 -0000 1.67
+++ gnome-font-face.c 30 Jan 2003 11:53:01 -0000
@@ -774,6 +774,8 @@
FT_CharMap appleRoman = 0;
FT_CharMap symbol = 0;
const guchar *psname;
+ gchar *substitute_families[] = {"Sans", "Sans Serif", "Serif", "Monospace", NULL};
+ gchar *substitute_psname[] = {"Sans", "SansSerif", "Serif", "Monospace", NULL};
int n;
if (!ft_library) {
@@ -795,7 +797,14 @@
g_warning ("PS name is NULL, for \"%s\" using fallback", entry->file);
face->psname = g_strdup ("Helvetica");
} else {
- face->psname = g_strdup (psname);
+ for (n = 0; substitute_families[n]; n++) {
+ if (!g_strcasecmp (entry->familyname, substitute_families[n])) {
+ face->psname = g_strdup (substitute_psname[n]);
+ break;
+ }
+ }
+ if (!face->psname)
+ face->psname = g_strdup (psname);
}
/* FIXME: scalability (Lauris) */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]