LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-04-2012, 06:34 AM   #1
ddragos
LQ Newbie
 
Registered: Jan 2011
Posts: 3

Rep: Reputation: 0
linux find system font files


I do not know how to correctly find the system font files on linux.

From what I have learned, my current algorith is this:
1. read the /etc/fonts/fonts.conf
note all direcotry paths from <dir></dir> elements

example:
I note /usr/share/fonts fonts <dir>/usr/share/fonts</dir>

2. use fc-match to match a font family. get the font file name from the output from fc-match. search inside the directories from (1) for that font file.

example:
fc-match arial
n019003l.pfb: "Nimbus Sans L" "Regular"

find /usr/share/fonts/ -name n019003l.pfb
/usr/share/fonts/default/Type1/n019003l.pfb

//------

Is this approach for finding fonts portable? Can I use this on Ubuntu, Centos, Debian etc.?
Is fc-match itself portable?

Thanks
 
Old 04-04-2012, 07:04 AM   #2
ddragos
LQ Newbie
 
Registered: Jan 2011
Posts: 3

Original Poster
Rep: Reputation: 0
found out that if I run fc-match verbouse it gives me the file path. So step 1 is no longer needed.

example:
fc-match -v "Times":bold:italic
Pattern has 25 elts (size 32)
family: "Nimbus Roman No9 L"(s)
style: "Bold Italic"(s)
slant: 100(i)(s)
weight: 200(i)(s)
width: 100(i)(s)
size: 12(f)(s)
pixelsize: 12.5(f)(s)
foundry: "urw"(s)
hintstyle: 3(i)(s)
hinting: FcTrue(s)
verticallayout: FcFalse(s)
autohint: FcFalse(s)
globaladvance: FcTrue(s)
file: "/usr/share/fonts/default/Type1/n021024l.pfb"(s)
...

Last edited by ddragos; 04-04-2012 at 07:05 AM.
 
Old 04-04-2012, 07:44 AM   #3
ddragos
LQ Newbie
 
Registered: Jan 2011
Posts: 3

Original Poster
Rep: Reputation: 0
tested fc-match on Ubuntu, Suse, Centos.
fc-match -v output is consitant on all these platforms.

It remains to find a modern distro where fc-match does not work.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Learn Linux, 101: Find and place system files LXer Syndicated Linux News 0 06-10-2010 10:41 AM
Need help to find linux programs that hack or view widows system files lilsandi30 Linux - Newbie 2 12-08-2009 09:10 PM
how to find files on the linux system? arcow Linux - Software 1 02-07-2006 02:29 AM
Can I find links in the system that point to certain files throughout the system? HGeneAnthony Linux - Newbie 3 02-18-2005 08:28 AM
Can find files on my system! pmorkert Linux - Software 2 07-30-2003 11:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration