Linux sans serif font

Linux Firefox default sans-serif font

Which font is the default sans-serif font in Linux? When I go in Windows in Firefox to Options > Font > Advanced I can see that the default sans-serif font is Arial, but in Linux it only shows sans-serif as a font by itself. Any idea how can I check which sans-serif font is this?

Nice question! I thought Firefox’s font was a very beautiful one, and it was frustrating not to know its name. Then I found out it’s «DejaVu Sans» for those who have it installed.

4 Answers 4

If fonts are handled by fontconfig then they are defined in /etc/fonts. It seems the command fc-match does the mapping from ‘serif’, ‘sans-serif’, etc. to the actual fonts:

$ fc-match sans-serif Vera.ttf: "Bitstream Vera Sans" "Roman" $ fc-match monospace VeraMono.ttf: "Bitstream Vera Sans Mono" "Roman" 

Awesome! This helped me lay out a document downloaded from Google Docs because the download does not have my browser font stored that I used in the editor.

The sans-serif font will be an open-source alternative to the proprietary fonts you may be accustomed to.

As a generalisation, Linux distributions have support for TrueType fonts like Lucida, Helvetica and Arial, but you have to download them separately — they don’t come pre-installed.

Most modern GNU/Linux distributions, like OpenSuSE and Fedora for example, use fontconfig for fonts management and configuration. The configuration is stored in /etc/fonts/ and it’s sub-directories. There will be a mapping file there, but the name of the file varies from distribution to distribution and from version to version. For example in OpenSuSE 12.3 you can find default mappings in /etc/fonts/conf.d/58-suse-post-user.conf

Читайте также:  Segmentation fault linux gcc

Agreed. Firefox for Linux (at least version 28) depends on the system language setting for selecting the script type (English is for example: Western). Unless the distro has configured that section it shows simply Serif: serif etc. On most Linux distros fontconfig determines the default serif etc. in /etc/fonts/conf.d/ . On Slackware for example it selects in 45-latin.conf DejaVu. BTW on my system the command fc-match , did not show the default font.

Источник

Operating systems default sans-serif fonts

No doubt that you’ve probably seen a css font-family declaration that didn’t include a specific webfont, but just the sans-serif fallback, or values like -apple-system , system-ui , and BlinkMacSystemFont .

All of those values will return the operating system’s default sans-serif font, with some differences:

  • -apple-system works only for newer MacOS versions (El Capitan and newer) and iOS
  • BlinkMacSystemFont works only for older Mac OS versions (Yosemite and older)
  • system-ui works for all operating systems, but there’s one notable exception: it doesn’t work in the Firefox browser. Firefox doesn’t support this value, so your text will be displayed in the default fallback which is a serif font
  • sans-serif will work in all browsers and operating systems, but should be only used as fallback, because in some cases operating systems have quirks like different sans font set for web than in its interface

Whether you use a custom font or not, the recommended complete css font-family declaration is:

font-family: system-ui, -apple-system, BlinkMacSystemFont, «Segoe UI», Roboto, Ubuntu, «Helvetica Neue», Oxygen, Cantarell, sans-serif;

You can safely omit Oxygen and Cantarell since they are targeted to certain Linux versions only. Roboto, Ubuntu, sans-serif will be ok for Linux distros.

Читайте также:  Linux перезапустить все сервисы

Default sans-serif font in MacOS

Please note that — although for interface San Francisco is the default sans-serif font — for web -apple-system will need to be used, as the sans-serif fallback will display Helvetica instead of San Francisco. (this is one of the quirks I mentioned earlier)

Default sans-serif font in Windows

The difference between Microsoft Sans Serif and MS Sans Serif is that MS Sans Serif was a bitmap/raster font available in 8, 10, 12, 14, 18, and 24 sizes and Microsoft Sans Serif is a TrueType scalable font.

MS Sans Serif was based on Helvetica and in all versions up to Windows 3.1 it was called Helv.

Default sans-serif font in Linux

Many Linux users re-configure defaults to other fonts like Inter UI or others. So it’s almost impossible to accurately mention defaults, except for the Ubuntu distro which has its own font as default. Red Hat also has commissioned its own fonts, Red Hat Display and Red Hat Text.

Источник

Оцените статью
Adblock
detector