Fonts: Difference between revisions

From miki
Jump to navigation Jump to search
No edit summary
 
(22 intermediate revisions by the same user not shown)
Line 1: Line 1:
== References ==
== Installing Fonts on Ubuntu ==
* [https://github.com/qrpike/Web-Font-Load Install Google Fonts]
* [https://www.nerdfonts.com/ Nerd Fonts] — patches dev targeted fonts with a high number of glyphs.
* [https://www.codingfont.com/] — a tournament to pick your favorite fonts.

See also [[Bookmarks]].

== Administration ==
=== Installing Fonts on Ubuntu ===
* References
* References
** See [https://wiki.ubuntu.com/Fonts here].
** See [https://wiki.ubuntu.com/Fonts here].
Line 21: Line 29:
sudo fc-cache -f -v
sudo fc-cache -f -v
</source>
</source>

=== Querying font ===
'''fc-match''' matches available fonts:
<source lang=bash>
fc-match calibri
</source>
calibri.ttf: "Calibri" "Regular"

Use <code>ttfdump</code> to display content of a TTF/OTF font:
<source lang="bash">
ttfdump somefont.ttf
</source>

=== Viewing font ===
Use <code>display</code> (from ImageMagick):

<source lang="bash">
display somefont.ttf
</source>

To compare / browse fonts, use '''Font Manager''' (package {{deb|font-manager}}).

Other tools:
* ''Gnome Font Viewer'' ({{deb|gnome-font-viewer}}), but very slow / bad.
* ''FontyPython'' ({{deb|fontypython}}), but strange, not convenient.


== Nice Fonts ==
== Nice Fonts ==
* [http://www.lowing.org/fonts/ List of monospace fonts]
* [http://www.slant.co/topics/67/~programming-fonts What are the best programming fonts?]

=== Monospace ===
=== Monospace ===
; [https://github.com/belluzj/fantasque-sans Fantasque Sans Mono]
* BitStream Vera Sans Mono<br/>''Used to be my favorite monospace''
* Seen in [https://github.com/morhetz/gruvbox gruvbox screenshots].
* [http://dejavu-fonts.org/wiki/Main_Page DejaVu] &mdash; Based on BitStream Vera, but with better Unicode support.
; [https://carrois.com/projects/Fira/ Fira]
* Lucida Console<br/>''My new favorite, got from MacBuntu 10.04 theme''
* Seen in [https://github.com/morhetz/gruvbox gruvbox screenshots].
* [http://blogs.adobe.com/typblography/2012/09/source-code-pro.html Source Code Pro]
; Bitstream Vera Sans Mono
:My previous favorite
; Consolas
; [http://dejavu-fonts.org/wiki/Main_Page DejaVu Sans Mono]
:Based on BitStream Vera (almost identical), but with better Unicode support.
; [http://levien.com/type/myfonts/inconsolata.html Inconsolata]
:''Looks nice but fonts are really small at size 9''
; Lucida Console
:My current favorite for terminal, got from MacBuntu 10.04 theme
; Monospace
:Same as Bitstream Vera Sans Mono
; [http://adobe-fonts.github.io/source-code-pro/ Source Code Pro]
; Ubuntu Mono

=== Serif ===
* [https://fonts.google.com/specimen/Roboto+Slab Roboto Slab]
:Nice Serif fonts, see [http://nolannicholson.com/looper.html this site]. [https://www.fontsquirrel.com/fonts/roboto-slab Download].
:Best combined with [https://www.fontsquirrel.com/fonts/roboto-2014 Roboto].
* [http://adobe-fonts.github.io/source-serif-pro/ Source Serif Pro]

=== Sans ===
* [http://adobe-fonts.github.io/source-sans-pro/ Source Sans Pro]

=== Special ===
* [https://www.google.com/get/noto/ Noto], a font from Google containing '''all''' glyphs in Unicode. Quite big...

=== linefont / wavefont ===
[https://github.com/dy/linefont linefont] and [https://github.com/dy/wavefont wavefont] are too fonts that can render line charts or vertical bar data.

== Technical ==
See [[Typography]].

== Troubleshooting ==
=== MS Fonts not rendering correctly ===
This occurs for instance with font '''Calibri'''. At small size, normal character appears aliased, but ligatures are anti-aliased.


Solution is to disable use of ''embedded bitmaps'' [http://askubuntu.com/questions/594976/how-to-get-calibri-font-to-display-nicely]:
* Add to file {{file|~/.config/font-manager/local.conf}} (before Ubuntu 14.04, edit {{file|~/.fonts.conf}}. Some tips also suggest file {{file|~/.config/fontconfig/fonts.conf}}):
<source lang=xml>
<!-- disable embedded bitmaps in fonts to fix Calibri, Cambria, etc. -->
<match target="font">
<edit mode="assign" name="embeddedbitmap"><bool>false</bool></edit>
</match>
</source>

* rebuild font cache:
<source lang=bash>
sudo fc-cache -v -f
</source>
* Restart compiz:
<source lang=bash>
compiz --replace&
</source>

Latest revision as of 12:50, 29 January 2024

References

See also Bookmarks.

Administration

Installing Fonts on Ubuntu

  • References

Fonts are kept in different locations, as defined in /etc/fonts/fonts.conf. By default these are:

  • /usr/share/fonts
  • /usr/local/share/fonts
  • /home/username/.fonts

To install a new font, copy the font to the relevant directory (or a sub-directory), and update the cache with

sudo fc-cache -f -v

Alternatively the cache is immediately refreshed after reboot.

For instance to install Arial Unicode MS (ARIALUNI.TTF, can be found on Windows XP for instance):

sudo mkdir /usr/share/fonts/truetype/windows
sudo cp ARIALUNI.TTF /usr/share/fonts/truetype/windows
sudo chmod 644 /usr/share/fonts/truetype/windows/*
sudo fc-cache -f -v

Querying font

fc-match matches available fonts:

fc-match calibri
calibri.ttf: "Calibri" "Regular"

Use ttfdump to display content of a TTF/OTF font:

ttfdump somefont.ttf

Viewing font

Use display (from ImageMagick):

display somefont.ttf

To compare / browse fonts, use Font Manager (package font-manager).

Other tools:

  • Gnome Font Viewer (gnome-font-viewer), but very slow / bad.
  • FontyPython (fontypython), but strange, not convenient.

Nice Fonts

Monospace

Fantasque Sans Mono
Fira
Bitstream Vera Sans Mono
My previous favorite
Consolas
DejaVu Sans Mono
Based on BitStream Vera (almost identical), but with better Unicode support.
Inconsolata
Looks nice but fonts are really small at size 9
Lucida Console
My current favorite for terminal, got from MacBuntu 10.04 theme
Monospace
Same as Bitstream Vera Sans Mono
Source Code Pro
Ubuntu Mono

Serif

Nice Serif fonts, see this site. Download.
Best combined with Roboto.

Sans

Special

  • Noto, a font from Google containing all glyphs in Unicode. Quite big...

linefont / wavefont

linefont and wavefont are too fonts that can render line charts or vertical bar data.

Technical

See Typography.

Troubleshooting

MS Fonts not rendering correctly

This occurs for instance with font Calibri. At small size, normal character appears aliased, but ligatures are anti-aliased.


Solution is to disable use of embedded bitmaps [2]:

  • Add to file ~/.config/font-manager/local.conf (before Ubuntu 14.04, edit ~/.fonts.conf. Some tips also suggest file ~/.config/fontconfig/fonts.conf):
<!-- disable embedded bitmaps in fonts to fix Calibri, Cambria, etc. -->
<match target="font">
        <edit mode="assign" name="embeddedbitmap"><bool>false</bool></edit>
</match>
  • rebuild font cache:
sudo fc-cache -v -f
  • Restart compiz:
compiz --replace&