Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
8
rated 0 times [  8] [ 0]  / answers: 1 / hits: 19713  / 1 Year ago, thu, november 17, 2022, 2:52:56

I found references at various places running dmenu like so :



dmenu_run -b -fn 'Inconsolata 12'


However, whatever variation of the font name I try, I always get dmenu: warning: cannot load font <font name>



fc-list | grep cons gives me:



/usr/share/fonts/truetype/inconsolata/Inconsolata.otf: Inconsolata:style=Medium


It does not show in xlsfonts and all the fonts that do show up with xlsfonts work fine.



What is the correct way to reference these fonts from command line ?



Also, is that a standard way to reference fonts or will it change when using programs like pango?


More From » fonts

 Answers
7

The standard version of dmenu doesn't include support for xft fonts. To use fonts like Inconsolata you'll need to build a patched version of dmenu.




  1. Download the source code and the patch.

  2. Open up a terminal, cd to the directory containing both the source code and the patch.

  3. Run the following commands to apply the patch:



    tar zxvf dmenu-4.5.tar.gz
    cd dmenu-4.5
    mv ../dmenu-4.5-xft.diff .
    patch -p1 < dmenu-4.5-xft.diff

  4. To build the modified version of dmenu, you'll need to have the following packages installed: libxft-dev libxft2 libxinerama-dev


  5. UPDATE on UBUNTU 14.04 the build fails with




    fatal error: ft2build.h: No such file or directory




    to fix this edit the config.mk File and change




    XFTINC = -I/usr/local/include/freetype2




    to




    XFTINC = -I/usr/include/freetype2



  6. Run the following commands to build and install the modified version of dmenu:



    make
    sudo make install


[#30137] Thursday, November 17, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ugeeport

Total Points: 181
Total Questions: 108
Total Answers: 99

Location: El Salvador
Member since Tue, Jun 29, 2021
3 Years ago
ugeeport questions
;