Hot answers tagged

214

Often times when in a Unix/Linux terminal (Bash) for example you'll use the commands more or less or cat to view a file. When you do this and the file isn't meant to be viewed (such as /bin/ls) you'll get output like this:                  What's going on here is that you just ...


102

I use character maps heavily and decides to make one which you access from anywhere using a web interface and requires no installation. Works best on Chrome. Features Select your own font file Provides font and character information Character copy-able Supports TTF/OTF Supports Icon fonts Simple interface No installation necessary No server upload ...


49

I've had an occasion where none of the usual tricks, reset or stty sane, worked (after accidentally calling print on a python bytearray). I had success with method 2 listed on this helpful blog. I've since created a most helpful alias: alias fix='echo -e "\033c"'


47

So there are a few open source fonts targeting programmers that support ligatures, namely FiraCode Hasklig Monoid Iosevka CascadiaCode However, very few opensource terminals that run natively on Linux yet support this. But you can find an current list in the FiraCode docs Kitty I am using Kitty on i3 and I really love it Black Screen (slow in browser ...


37

I've had this issue for ages, maybe it's time to do something about it! It comes done to ClearType, Microsoft and patents from what I read. Most *nix distro's disable any patent protected font rendering by default. Read about Debian and fonts here, you want Subpixel-hinting and Font-smoothing section. There's a config file on that page but I will add here ...


32

Have you tried ? fc-list | grep -i "media" Also give a try to fc-scan, fc-match


28

help printf defers to printf(1) for the escape sequences interpreted, and the docs for GNU printf says: printf interprets two character syntaxes introduced in ISO C 99: \u for 16-bit Unicode (ISO/IEC 10646) characters, specified as four hexadecimal digits hhhh, and \U for 32-bit Unicode characters, specified as eight hexadecimal digits hhhhhhhh. ...


26

The command fc-list can list all available fonts according to their properties. In your case one needs to search for the spacing corresponding to mono, that would be 100, so fc-list :spacing=100. Simpler form fc-list :mono should probably work too. Example: $ fc-list :spacing=100 /usr/share/fonts/urw-fonts/n022003l.pfb: Nimbus Mono L:style=Regular /usr/...


24

In Linux, if you have .ttf fonts, you most probably also have fontconfig, which comes with the fc-scan utility. You can parse the output for the information you want, or use the badly documented --format option. For example: fc-scan --format "%{foundry} : %{family}\n" /usr/share/fonts/truetype/msttcorefonts/arialbd.ttf The font properties you can ...


23

This fixed the problem for me. Install the dejavu fonts. sudo pacman -S ttf-dejavu


23

This is documented at: http://mscorefonts2.sourceforge.net/ yum install curl cabextract xorg-x11-font-utils fontconfig yum install https://downloads.sourceforge.net/project/mscorefonts2/rpms/msttcore-fonts-installer-2.6-1.noarch.rpm


22

display OpenSans-CondBold.ttf display is part of imagemagick, so you will need it to be installed. Answer possible thanks to this forum post. This problem has been bugging me for years, because it is only every few months that I want to preview a font and I never remembered which software solved it last time, so I made a video version of this answer to ...


21

In ~/.Xresources, put, for example, the below config. (There are some other configurations of urxvt that might interest you here (note that this is a plain text file, posted on the web; you may want to use "View Source" to read it).  There you also find another color scheme, that might be better if you ever experience eye problems because of too bright ...


20

The appres utility lists the resources used by an application, both user and default. appres XTerm xterm The first argument is the class name (xterm -class Xxx). The second argument, which is optional, is the instance name (xterm -name xxx). The “Large” font is .VT100.font5 or .VT100.utf8Fonts.font5. See the manual for whether .utf8Fonts is used, it's a ...


20

Urxvt has an option for basic kerning: letterSpace. See man urxvt: -letsp number Compile frills: Amount to adjust the computed character width by to control overall letter spacing. Negative values will tighten up the letter spacing, positive values will space letters out more. Useful to work around odd font metrics; ...


20

AFAIK there is no existing ports of this font to any outline variant. Here are however some detail, and hacks, that might help you on the way. The t.fnt, Tektite, was created by the (former?) clySmic Software, and likely Ralph B Smith Jr, President/Chief Programmer/Cook/Bottle Washer. It is a bitmap font which was included with the VFONT program for DOS and ...


19

I found it - the "Default font" combo is (mis)placed in the "Widget" tab. I really don't understand why they didn't put it in the "Font" tab.


18

This page has specific information for installing font packages on Debian. https://en.wikipedia.org/wiki/Help:Multilingual_support_(East_Asian) Chinese (both Simplified & Traditional) Serif: fonts-arphic-ukai Sans-serif: fonts-arphic-uming Japanese Serif: fonts-ipafont-mincho Sans-serif: fonts-ipafont-gothic Korean All: fonts-unfonts-core After ...


18

Using fontconfig, > fc-list ':charset=<hex_code1> <hex_code2>' e.g. > fc-list ':charset=2713 2717' will display any font filenames containing ✓ and ✗. To get the codepoint corresponding to the character use (for example) > printf "%x" \'✓ 2713> This uses a somewhat obscure feature of the POSIX printf utility: If the leading ...


18

TL;DR: Understanding fontconfig requires understanding why it was created and what problems it is trying to solve. That require a lot of understanding of Xorg. Font configuration on UNIX machines went through different phases and fontconfig is simply one of the possibilities you can use to use fonts through Xorg. Reading the source of fontconfig without a ...


17

I came across this in 2016. A single TTF/OTF font is never going to cover all utf-8 characters. There is a hard limit of 65535 glyphs in a font, and over 1 million utf-8 glphys. You will need to use a font-family for this to work. A good font-family is the noto font family: https://www.google.com/get/noto/


17

You can use fc-match to see which fonts match that pattern: # fc-match "Monospace" DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book" To see the whole priority list matching that pattern, use: fc-match --sort "Monospace" Reference: man fc-match fc-match matches pattern (empty pattern by default) using the normal fontconfig matching rules to ...


17

fc-match is the utility to use. For example, fc-match monospace will tell you the font used for monospace, and fc-match -s monospace will tell you fallback fonts as well, in order. The first font on the list will be what is used in most cases, and all fonts after are fallback fonts for missing glyphs.


16

According to the manual, setting URxvt.boldFont to empty will disable the bold font, and uses regular font instead. This is the preferred way I think. URxvt.boldFont:


16

This is not necessarily the best method, and it sure isn't user-friendly, but it's easy to get working: here's a Python script to do it. Install the Python-fontconfig library. Either get it from your distribution (e.g. sudo apt-get install python-fontconfig on Debian and derivatives) or install it in your home directory (pip install --user python-fontconfig)....


15

No single prior answer worked for me. But this seemed to do the trick in .bashrc add: alias fix='reset; stty sane; tput rs1; clear; echo -e "\033c"' and then when the problem occurs type this (even though you probably can't see it!) (ctl-c, ctl-c, ctl-c) fix Much thanks to the prior submitters. Also, as a side note, the reason that your terminal goes ...


14

You should edit the file /etc/default/console-setup and change the FONTSIZE variable. Once you've made your changes you must reconfigure your terminal by running: $ sudo service console-setup restart


13

I spent the better part of tonight solving this same issue, even though it's 2 years later! So to avoid a DenverCoder9 moment for future visitors, here's what solved my issue. From this email thread: As root, edit /usr/lib/systemd/system/systemd-vconsole-setup.service Change the After= and Before= lines to: After=sysinit.target Before=shutdown.target ...


13

Add this to yours ~/.config/fontconfig/fonts.conf file to set Font B as default monospace font <match target="pattern"> <test name="family" qual="any"> <string>monospace</string> </test> <edit binding="strong" mode="prepend" name="family"> <string&...


13

If you need to install a lot of fonts, then copy the files to ~/.fonts or /usr/share/fonts for system-wide installation and issue the command fc-cache -fv.


Only top voted, non community-wiki answers of a minimum length are eligible