LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   How to use custom fonts in fluxbox (https://www.linuxquestions.org/questions/linux-desktop-74/how-to-use-custom-fonts-in-fluxbox-4175610088/)

jonny789 07-18-2017 05:14 AM

How to use custom fonts in fluxbox
 
Hi all..

I have just started learning theming of fluxbox. I have some ttf-font files. I want to use them in fluxbox theme. Tutorials I found on net use inbuilt fonts.

Where do I need to put my .ttf file to use in fluxbox ? Where is the global location for fonts that is used by all the fluxbox themes ?

I am running Stretch.
Here is my fluxbox info ::
Code:

Fluxbox version: 1.3.5
GIT Revision: this_is_tar_ball_build
Compiled: Feb 25 2014 03:56:46
Compiler: GCC
Compiler version: 6.3.0 20170221
Defaults:
    menu: /etc/X11/fluxbox/fluxbox.menu-user
  style: /usr/share/fluxbox/styles//Squared_for_Debian
    keys: /etc/X11/fluxbox/keys
    init: /etc/X11/fluxbox/init
    nls: /usr/share/fluxbox/nls

Compiled options (- => disabled):
BIDI
-DEBUG
EWMH
IMLIB2
NLS
REMEMBER
RENDER
SHAPE
SLIT
SYSTEMTRAY
TOOLBAR
RANDR1.2
XFT
XINERAMA
XMB
XPM


Myk267 07-18-2017 05:11 PM

You can likely place them somewhere under /usr/share/fonts/, but placing "outside" files into global filesystem locations might not be a good idea in the long run. Maybe placing them in your home directory might be smarter.

I used to drop my downloaded fonts into ~/.fonts/ but that seems to be deprecated in favor of ~/.local/share/fonts now. I would still try the first one, first. Afterwards, run fc-cache to reset the font database, and you should be ready to add your new fonts into your fluxbox config.

jonny789 07-20-2017 01:58 PM

Quote:

Originally Posted by Myk267 (Post 5736813)
You can likely place them somewhere under /usr/share/fonts/, but placing "outside" files into global filesystem locations might not be a good idea in the long run. Maybe placing them in your home directory might be smarter.

I used to drop my downloaded fonts into ~/.fonts/ but that seems to be deprecated in favor of ~/.local/share/fonts now. I would still try the first one, first. Afterwards, run fc-cache to reset the font database, and you should be ready to add your new fonts into your fluxbox config.

Thanks. It worked.

I copied font ttf file to ~./font directory. Ran
Code:

fc-cache ; fc-list
fc-list showed all the installed fonts with their location and name.

Now, the problem is with the font name having spaces. Those are not working for me. I have tried with enclosing them in quotes and using backslash.
How can I use those fonts ?

Can fluxbox theme load all sort of ttf fonts, as many large size(~500kB) font files are not working for me ?


All times are GMT -5. The time now is 06:41 AM.