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:47:02 2003
Hi,
>>>>> On 29 Jan 2003 11:07:54 +0100,
>>>>> "RD" == Radek Doulík <rodo ximian com> wrote:
RD> Modified patch attached.
Your patch breaks the printing, because psname is given from
actual font. when two or more fonts is used, then the
alias font points the font, which is already used, this
problem will appears.
Attached patch will fixes this problem.
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:40:19 -0000
@@ -774,6 +774,7 @@
FT_CharMap appleRoman = 0;
FT_CharMap symbol = 0;
const guchar *psname;
+ gchar *substitute_families[] = "Sans", "Sans Serif", "Serif", "Monospace", NULL};
int n;
if (!ft_library) {
@@ -795,7 +796,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 (psname);
+ 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]