Bug 153324 - RFE: list font paths without any extra garbage
RFE: list font paths without any extra garbage
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: chkfontpath (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Mike A. Harris
Ben Levenson
:
Depends On:
Blocks: FC5Target
  Show dependency treegraph
 
Reported: 2005-04-04 15:42 EDT by Mike A. Harris
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: 1.10.1-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-16 09:03:08 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Mike A. Harris 2005-04-04 15:42:18 EDT
"chkfontpath --list" spits out a formatted list of font paths, which
is pretty to the human eye, but useless as-is for scripts which want
to do something with the list of font path elements, such as the
xfs initscript.

xfs.init used to do:

/usr/sbin/chkfontpath --list | cut -f 2 -d ':' | sort | uniq

Which kindof worked, but is insufficient and prone to errors.  Ultimately,
chkfontpath should provide the font path information in a script friendly
manner, to avoid scripts from having to hand massage the output into
something useful, potentially making mistakes when doing so.

I've updated the xfs initscript to do the following which is a bit
better now, but still ugly as sin:

/usr/sbin/chkfontpath --list | sed -e '/^Current/d;s#.*:
##g;s#^/.*:[a-z]*$##g;/^[[:space:]]*$/d' | sort | uniq

(hopefully the above all fits in one line in bugzilla)

A new commandline option named something like --listfontpaths which
displays raw font paths, one per line, with no extra formatting or
whitespace is desireable.

If this gets implemented, we can enhance the xfs initscript to use
the likely more reliable new mechanism.
Comment 2 Mike A. Harris 2006-02-16 08:25:18 EST
Implemented in chkfontpath CVS head as new --listfp option in order to keep
compatibility with scripts out there which may expect the --list option to
work as it has before.

pts/6 mharris@laser:~/src/redhat/chkfontpath$ ./chkfontpath --listfp
/usr/X11R6/lib/X11/fonts/korean
/usr/X11R6/lib/X11/fonts/misc:unscaled
/usr/X11R6/lib/X11/fonts/75dpi:unscaled
/usr/X11R6/lib/X11/fonts/100dpi:unscaled
/usr/X11R6/lib/X11/fonts/misc
/usr/X11R6/lib/X11/fonts/Type1
/usr/X11R6/lib/X11/fonts/Speedo
/usr/X11R6/lib/X11/fonts/cyrillic
/usr/X11R6/lib/X11/fonts/TTF
/usr/X11R6/lib/X11/fonts/OTF
/usr/share/fonts/default/Type1
/usr/lib/openoffice/share/fonts/truetype
/usr/share/fonts/ja/misc:unscaled
/usr/share/fonts/ja/misc
/usr/share/fonts/ja/TrueType
/usr/share/fonts/ISO8859-2/misc:unscaled
/usr/share/fonts/ISO8859-2/75dpi:unscaled
/usr/share/fonts/ISO8859-2/100dpi:unscaled
/usr/share/fonts/ISO8859-2/misc
/usr/share/fonts/ISO8859-2/75dpi
/usr/share/fonts/ISO8859-2/100dpi
/usr/share/fonts/zh_CN/TrueType
/usr/share/fonts/zh_TW/TrueType
/usr/share/fonts/KOI8-R/misc:unscaled
/usr/share/fonts/KOI8-R/75dpi:unscaled
/usr/share/fonts/KOI8-R/100dpi:unscaled
/usr/share/fonts/KOI8-R/misc
/usr/share/fonts/KOI8-R/75dpi
/usr/share/fonts/KOI8-R/100dpi
/usr/share/fonts/ko/TrueType
/usr/share/fonts/tv-fonts
Comment 3 Mike A. Harris 2006-02-16 09:03:08 EST
Fixed in 1.10.1-1 and built in rawhide.

Note You need to log in before you can comment on or make changes to this bug.