You are not logged in.

#1 2011-07-26 09:03:50

gylns
Member
Registered: 2011-04-09
Posts: 4

Is there a tool to see what fonts is being used to render by X server?

I have seen there is such a tool on some where, but I didn't remembered the name and I googled but get nothing, whether anyone know such a tool, thanks!

Offline

#2 2011-07-26 09:52:08

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Is there a tool to see what fonts is being used to render by X server?

How do you mean exactly, the fonts (paths) that are available to X? In that case you can use:

$ xset q

Or do you mean xfontsel?


ᶘ ᵒᴥᵒᶅ

Offline

#3 2011-07-26 09:59:18

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Is there a tool to see what fonts is being used to render by X server?

And 'xlsfonts' will give you the list of all the fonts installed (all the styles and sizes) which you can display and filter in various ways.
There's also 'fc-list' which lists available fonts.

Last edited by karol (2011-07-26 10:05:21)

Offline

#4 2011-07-26 11:07:36

gylns
Member
Registered: 2011-04-09
Posts: 4

Re: Is there a tool to see what fonts is being used to render by X server?

I mean what font files is being used, I don't want to know fonts' names.

Offline

#5 2011-07-26 11:25:59

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Is there a tool to see what fonts is being used to render by X server?

gylns wrote:

I mean what font files is being used, I don't want to know fonts' names.

Sorry, but I still don't get it. Are you asking how do you configure stuff? I can use one font in one terminal, a second one in another terminal and yet another in my browser. Do you want to know where do you set which fonts to use where?

Offline

#6 2011-07-26 11:43:47

gylns
Member
Registered: 2011-04-09
Posts: 4

Re: Is there a tool to see what fonts is being used to render by X server?

Sorry for my poor english, I don't want to know how to configure fonts, my quesion is, for example, when the browser display the web page, the X server is using some font files to render,  I want to know what font files is being used? the answer will tell you the font files' name not the fonts' name.

Last edited by gylns (2011-07-26 11:44:08)

Offline

#7 2011-07-26 11:53:47

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Is there a tool to see what fonts is being used to render by X server?

I don't know any such tool, as https://addons.mozilla.org/en-US/firefo … nt-finder/ shows only the font name.
Same goes for https://addons.mozilla.org/en-US/firefo … text-font/ and https://chrome.google.com/webstore/deta … lpmlmfcogm

Last edited by karol (2011-07-26 11:59:44)

Offline

#8 2011-07-26 12:08:25

gylns
Member
Registered: 2011-04-09
Posts: 4

Re: Is there a tool to see what fonts is being used to render by X server?

Thanks for your reply, I have known the font-finder and it's not my want.
I am also not sure such a tool, it maybe not only show font files, but also tell other type files being used by X server.

Offline

#9 2011-07-26 19:02:05

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: Is there a tool to see what fonts is being used to render by X server?

If you can get the font name, running "fc-match" on that name will tell you what file that maps to:

$ fc-match sans
DejaVuSans.ttf: "DejaVu Sans" "Book"

Last edited by ataraxia (2011-07-26 19:02:33)

Offline

#10 2011-07-26 21:39:37

azleifel
Member
Registered: 2007-10-28
Posts: 486

Re: Is there a tool to see what fonts is being used to render by X server?

It's not too difficult to do this per application from the command line:

$ lsof -p $(ps -o pid --no-headers -C urxvtd) | grep fonts
urxvtd  1764 david  mem    REG                8,1   105428  46138 /usr/share/fonts/TTF/LiberationMono-Bold.ttf
urxvtd  1764 david  mem    REG                8,1   108140  64867 /usr/share/fonts/TTF/LiberationMono-Regular.ttf
$ lsof -p $(ps -o pid --no-headers -C firefox-bin) | grep fonts
firefox-b 9467 david  mem    REG                8,1  1123660    85597 /usr/share/fonts/TTF/Lucida Grande Bold.ttf
firefox-b 9467 david  mem    REG                8,1  1129000    84540 /usr/share/fonts/TTF/Lucida Grande.ttf
firefox-b 9467 david  mem    REG                8,1   672300    54678 /usr/share/fonts/TTF/DejaVuSans-Bold.ttf
firefox-b 9467 david  mem    REG                8,1   720012    54672 /usr/share/fonts/TTF/DejaVuSans.ttf
firefox-b 9467 david  mem    REG                8,1   206132    41633 /usr/share/fonts/TTF/ariali.ttf
firefox-b 9467 david  mem    REG                8,1   286620    40567 /usr/share/fonts/TTF/arialbd.ttf
firefox-b 9467 david  mem    REG                8,1   338776    54684 /usr/share/fonts/TTF/DejaVuSerif-Italic.ttf
firefox-b 9467 david  mem    REG                8,1   275572    45715 /usr/share/fonts/TTF/arial.ttf
firefox-b 9467 david  mem    REG                8,1   224692    40455 /usr/share/fonts/TTF/arialbi.ttf
firefox-b 9467 david  mem    REG                8,1    98520    22169 /usr/share/fonts/TTF/consola.ttf

Offline

#11 2011-07-26 21:52:11

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Is there a tool to see what fonts is being used to render by X server?

Is it the same as

lsof -p $(pgrep firefox) | awk '/fonts/ {print $NF}'
[karol@black ~]$ lsof -p $(pgrep urxvtd) | awk '/fonts/ {print $NF}'
/usr/share/fonts/TTF/DejaVuSansMono.ttf
/usr/share/fonts/TTF/odosung.ttc
/usr/share/fonts/TTF/DejaVuSerif.ttf
/usr/share/fonts/local/ter-x16b.pcf.gz
/usr/share/fonts/local/ter-x16n.pcf.gz
/usr/share/fonts/TTF/DejaVuSans.ttf
[karol@black ~]$ lsof -p $(pgrep firefox) | awk '/fonts/ {print $NF}'
/usr/share/fonts/TTF/DejaVuSans-Oblique.ttf
/usr/share/fonts/TTF/DejaVuSerif.ttf
/usr/share/fonts/TTF/DejaVuSerif-Bold.ttf
/usr/share/fonts/TTF/DejaVuSans.ttf
/usr/share/fonts/misc/9x18.pcf.gz
/usr/share/fonts/TTF/DejaVuSansMono.ttf
/usr/share/fonts/TTF/DejaVuSerif-Italic.ttf
/usr/share/fonts/TTF/DejaVuSansMono-Bold.ttf
/usr/share/fonts/TTF/DejaVuSans-Bold.ttf
/usr/share/fonts/misc/7x13B.pcf.gz

Last edited by karol (2011-07-26 21:53:25)

Offline

#12 2011-07-26 21:55:34

azleifel
Member
Registered: 2007-10-28
Posts: 486

Re: Is there a tool to see what fonts is being used to render by X server?

I have promised myself that one day I will learn how to use awk :-P

Offline

#13 2011-07-26 21:56:36

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Is there a tool to see what fonts is being used to render by X server?

azleifel wrote:

I have promised myself that one day I will learn how to use awk :-P

I have 'lsof' on my to-learn list ... somewhere ;P

<hat tip @azleifel>

Offline

#14 2011-07-26 22:09:15

azleifel
Member
Registered: 2007-10-28
Posts: 486

Re: Is there a tool to see what fonts is being used to render by X server?

We're all learning :-)

Last edited by azleifel (2011-07-26 22:09:28)

Offline

Board footer

Powered by FluxBB