After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 83098 - Freetype doesn't find fonts on RH7.3
Freetype doesn't find fonts on RH7.3
Status: VERIFIED FIXED
Product: dia
Classification: Other
Component: general
0.90
Other Linux
: Normal normal
: ---
Assigned To: Dia maintainers
Dia maintainers
Depends on:
Blocks:
 
 
Reported: 2002-05-27 02:22 UTC by Robert Young
Modified: 2006-07-15 17:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for above - interogates xfs config file for more font paths (3.31 KB, patch)
2002-05-27 02:23 UTC, Robert Young
none Details | Review
New patch against 0.90RC2 (4.60 KB, patch)
2002-05-30 02:29 UTC, Robert Young
none Details | Review
Patch 3 to fix multiple face issue. (6.28 KB, patch)
2002-05-30 05:11 UTC, Robert Young
none Details | Review

Description Robert Young 2002-05-27 02:22:21 UTC
XFree86 will remove paths from its font path list which do not contain
fonts that it understands.

On RH7.3 XFree86 default install uses a font server which has its own
configuration file and does not obtain font paths from X. XFree86 therefore
is not configured to use the modules which load truetype and other
'freetype' fonts.

As a result of all this, calling XGetFontPath returns only a path to the
fonts that X understands. On RH7.3 this means that dia cannot locate any
fonts to use with freetype.

This will stop all RH7.3 users from using freetype, unless they wish to
reconfigure their XFree86. It will stop a .rpm for 7.3 being made available
with freetype support.

Without a solution to this, dia is guaranteed to segfault on RH7.3 with
freetype enabled.

I have attached a patch which looks for an xfs (X font server)
configuration file if it appears that an X font server is being used. The
benefit of this is that for RH and debian users, dia will discover the
standard installed fonts without user intervention.

I do not necessarily consider this to be a good patch, and would appreciate
comments on improving it.
Comment 1 Robert Young 2002-05-27 02:23:28 UTC
Created attachment 8737 [details] [review]
Patch for above - interogates xfs config file for more font paths
Comment 2 Robert Young 2002-05-29 00:30:51 UTC
> From: Zhang Lin-bo [mailto:zlb@lsec.cc.ac.cn]
> Sent: Wednesday, 29 May 2002 12:24 AM
> To: dia-list@gnome.org
> Subject: Re: printing on the Simpl. Chinese and other 
> non-latin1 locales

With freetype support enabled, the fonts listed in 'font_data'
are ignored (see the '#ifdef' line at font.c:904, and I don't know
if this is a bug or a feature). Since rh7.3 uses xfs, no fontpath will
be found through the 'XGetFontPath' function. The patch of Robert Young
did not work because there was a bug in his code in parsing the
fs/config file: most path names (in my system) were skipped because
they have a trailing comma (and also I think the code needs to be
rewritten to correctly retrieve fontpaths from the 'catalogue = ...'
entry of the fs/config file (or one can borrow some lines from xfs,
or simply run the 'chkfontpath' program?)).
Comment 3 Robert Young 2002-05-30 02:28:45 UTC
New patch against 0.90RC2. Has been tested with commas, joined lines,
only parses catalogue line until end of that section (no comma after
last path).

Comments please! or apply patch to CVS.

Comment 4 Robert Young 2002-05-30 02:29:47 UTC
Created attachment 8834 [details] [review]
New patch against 0.90RC2
Comment 5 Cyrille Chépélov 2002-05-30 05:01:02 UTC
Patch applied, thanks !
Comment 6 Robert Young 2002-05-30 05:09:59 UTC
New patch to follow, sorry. The previous patch would generate a
situation where the same font face is listed multiple times.

New patch improves this by only scanning each directory once by
generating a list of unique path names.

Also, checks each face for duplicates before adding face.

Comment 7 Robert Young 2002-05-30 05:11:19 UTC
Created attachment 8840 [details] [review]
Patch 3 to fix multiple face issue.
Comment 8 Cyrille Chépélov 2002-05-31 05:08:21 UTC
I applied patch3 before releasing RC3
Comment 9 Hans Breuer 2006-07-15 17:19:47 UTC
moving away form 0.90.RC1 to delete that label afterwards