picandies
Posts: 240
Joined: Wed Nov 26, 2014 5:13 pm

is calibri & Helvetica font usable?

Sun Apr 22, 2018 4:11 pm

Running some Tkinter examples, they use the standard Helvetica or Calibri font. But I noticed on the PC, things look very different, as though the rpi is not using these fonts. If I open Libre Office on the rpi, no such fonts are even listed, only some oddball sounding ones. So I'm not sure how my example is even running, or is the font being retrieved from some other directory?

What rpi fonts are common with the PC? I'd like things to look the same in both locations.

drgeoff
Posts: 10765
Joined: Wed Jan 25, 2012 6:39 pm

Re: is calibri & Helvetica font usable?

Sun Apr 22, 2018 6:47 pm

Many well known fonts are protected by copyright so I expect that Libre Office is using vaguely similar looking, but not identical to, ones in commercial software.

markkuk
Posts: 204
Joined: Thu Mar 22, 2018 1:02 pm
Location: Finland

Re: is calibri & Helvetica font usable?

Sun Apr 22, 2018 8:46 pm

Calibri is a Microsoft proprietary font. You can purchase a copy or install the compatible Carlito font by:

Code: Select all

sudo apt install fonts-crosextra-carlito
If you want fonts that can be used in any environment without license fees, try Google fonts.

tpylkko
Posts: 409
Joined: Tue Oct 14, 2014 5:21 pm

Re: is calibri & Helvetica font usable?

Sun Apr 22, 2018 9:44 pm

FWIW; Debian (and therefore Raspbian, I suspect) has a package called ttf-mscorefonts-installer, which will download and install some closed/proprietary microsoft fonts from microsoft.com on to the operating system. The fonts that ms allows you to use in this way don't have Helvetica or Calibri, however:
https://packages.debian.org/stretch/ttf-mscorefonts-installer wrote:Andale Mono
Arial Black
Arial (Bold, Italic, Bold Italic)
Comic Sans MS (Bold)
Courier New (Bold, Italic, Bold Italic)
Georgia (Bold, Italic, Bold Italic)
Impact
Times New Roman (Bold, Italic, Bold Italic)
Trebuchet (Bold, Italic, Bold Italic)
Verdana (Bold, Italic, Bold Italic)
Webdings


But it is important to realize that there are nearly identical looking free versions for all of these fonts. So, for most purposes you can probably just substitute...

picandies
Posts: 240
Joined: Wed Nov 26, 2014 5:13 pm

Re: is calibri & Helvetica font usable?

Sun Apr 22, 2018 9:56 pm

But it is important to realize that there are nearly identical looking free versions for all of these fonts

Well I'm no font expert...if the name on the rpi & the "look alike" on the PC have different names, what are they? What I mean, is there a font "conversion chart" between the rpi & PC? I'm not even sure what fonts are on the rpi.

User avatar
scruss
Posts: 3212
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: is calibri & Helvetica font usable?

Mon Apr 23, 2018 1:01 am

I know a bit about fonts … and it's a little complex. There's not much overlap between a stock Raspberry Pi and Windows in the font department. Microsoft pays a lot of money to develop typography, the Raspberry Pi Foundation uses whatever it can get.

The list of fonts installed on a stock Raspberry Pi/Raspbian is:

Code: Select all

DejaVu Math TeX Gyre
DejaVu Sans
DejaVu Sans Condensed
DejaVu Sans Light
DejaVu Sans Mono
DejaVu Serif
DejaVu Serif Condensed
Droid Sans Fallback
FreeMono
FreeSans
FreeSerif
Lato
Lato Black
Lato Hairline
Lato Heavy
Lato Light
Lato Medium
Lato Semibold
Lato Thin
Liberation Mono
Liberation Sans
Liberation Serif
Noto Mono
OpenSymbol
Piboto
Piboto Condensed
Piboto Light
PibotoLt
Piboto Thin
Short of installing Gnome Font Viewer, the easiest way to get the installed list is this snappy little number:

Code: Select all

fc-list | awk -F: '{sub(/^ /,"",$2); split($2, variants, /,/); for (i in variants) {print variants[i];}}' | sort -u
The Raspberry Pi's font handler can quietly substitute for certain fonts. If you install Carlito, then ask for Calibri in your program, you should get Carlito without explicitly asking for it.

There are many reasons that fonts won't look dot-for-dot identical across platforms. Windows' Courier is different from Apple's. Apple's Helvetica tends to be Helvetica Neue. For cleanest results, install open-licensed fonts everywhere, such as Google Roboto, Google Noto, IBM Plex, Inconsolata, Courier Prime, …
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

picandies
Posts: 240
Joined: Wed Nov 26, 2014 5:13 pm

Re: is calibri & Helvetica font usable?

Mon Apr 23, 2018 1:08 am

Interesting....for a while now I used this in Tkinter:

myFontC = tkFont.Font(family = 'Helvetica', size = 20, weight = 'bold')

It displays very nicely....but then on the PC looks rather different......it appears that on the rpi it is not actually using Helvetica (I wouldn't know if it was or not until noticed difference on the PC)...I wonder what the rpi is actually using, since apparently Helvetica is not installed on the rpi ???...Also, not sure why it doesn't give an error...everything else sure does !!

gkreidl
Posts: 6326
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: is calibri & Helvetica font usable?

Mon Apr 23, 2018 6:16 am

picandies wrote:
Mon Apr 23, 2018 1:08 am
Interesting....for a while now I used this in Tkinter:

myFontC = tkFont.Font(family = 'Helvetica', size = 20, weight = 'bold')

It displays very nicely....but then on the PC looks rather different......it appears that on the rpi it is not actually using Helvetica (I wouldn't know if it was or not until noticed difference on the PC)...I wonder what the rpi is actually using, since apparently Helvetica is not installed on the rpi ???...Also, not sure why it doesn't give an error...everything else sure does !!
running
fc-match Helvetica
will tell you, which font is really used instead of Helvetica.
The best replacements for Helvetica, Times etc. are the GS fonts, which can be used by installing "gsfonts-x11". Unfortunately the use of these fonts is broken on the RPi. This bug is caused by the the "fontconfig-infinality" package (really a Fedora package) which you are forced to install by the "raspberrypi-ui-mods" (the Foundation desktop modifications).
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

User avatar
scruss
Posts: 3212
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: is calibri & Helvetica font usable?

Mon Apr 23, 2018 2:27 pm

gkreidl wrote:
Mon Apr 23, 2018 6:16 am
… The best replacements for Helvetica, Times etc. are the GS fonts, which can be used by installing "gsfonts-x11".
That might've been true until recently, but the URW++ fonts for gs are a bit old. The TeX Gyre fonts (in the fonts-texgyre package) are more up to date, and quietly replace Helvetica, Times and Courier with TeX Gyre Heros, Termes and Cursor respectively.
Unfortunately the use of these [gsfonts-x11] fonts is broken on the RPi. This bug is caused by the the "fontconfig-infinality" package (really a Fedora package) which you are forced to install by the "raspberrypi-ui-mods" (the Foundation desktop modifications).
I've found Infinality to be helpful: it adds sub-pixel rendering properly (or at least better than defaults) on most of my Linux systems.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

picandies
Posts: 240
Joined: Wed Nov 26, 2014 5:13 pm

Re: is calibri & Helvetica font usable?

Mon Apr 23, 2018 5:19 pm

the URW++ fonts for gs are a bit old. The TeX Gyre fonts (in the fonts-texgyre package)
Is there any trickery to installing these fonts on the rpi? Haven't had the need up till now
Once installed, is there anything that needs set/changed so that the rpi will actually use them in all apps?

tpylkko
Posts: 409
Joined: Tue Oct 14, 2014 5:21 pm

Re: is calibri & Helvetica font usable?

Mon Apr 23, 2018 7:28 pm

picandies wrote:
Sun Apr 22, 2018 9:56 pm
But it is important to realize that there are nearly identical looking free versions for all of these fonts

Well I'm no font expert...if the name on the rpi & the "look alike" on the PC have different names, what are they? What I mean, is there a font "conversion chart" between the rpi & PC? I'm not even sure what fonts are on the rpi.

Yes, there are except it is not "rpi" vs "pc" it is "proprietary vs free", that is the fonts that are used on the rpi are also widely used in the free software world. The reason the rpi is using the is because Raspbian is based on Debian, which has a policy to not include non-free software.

here is such a list:
http://www.linux-magazine.com/Online/Bl ... tary-fonts

But there are also more general "font related" ideas that can be considered, such as "serif fonts vs sans fonts" that can help in deciding how to pick similar fonts:

https://www.fonts.com/content/learning/ ... t-in-print

I mean that, instead of thinking about which fonts look identical, it might be more worthwhile to think about what kinds of fonts serve well what kinds of purposes. What are the actual difference between different kinds of fonts? Like do serifs make it easier to read long text faster? What about against a dark back ground? How official vs "laid back" you want to appear? I don't know what ever other similar questions... but I personally think that what the actual font is named is less relevant than how it fits the purpose that it is being chosen for.

picandies
Posts: 240
Joined: Wed Nov 26, 2014 5:13 pm

Re: is calibri & Helvetica font usable?

Tue Apr 24, 2018 5:26 am

As long as they are very close between the PC and rpi, should be ok....found out when moving a gui from the pc to rpi, the text mysteriously no longer fit into its assigned fields & textboxes, so it required a lot of unexpected editing on the rpi. At least now am aware of the issue, but would like to minimize it.

gkreidl
Posts: 6326
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: is calibri & Helvetica font usable?

Tue Apr 24, 2018 7:00 am

picandies wrote:
Tue Apr 24, 2018 5:26 am
As long as they are very close between the PC and rpi, should be ok....found out when moving a gui from the pc to rpi, the text mysteriously no longer fit into its assigned fields & textboxes, so it required a lot of unexpected editing on the rpi. At least now am aware of the issue, but would like to minimize it.
The main reason for a good font replacement system is, that a replaced font should not only look as similar a possible (without infringing on copyrights) but have the same height and run length. Otherwise it would break formatting in documents (or software).
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

User avatar
Imperf3kt
Posts: 3626
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: is calibri & Helvetica font usable?

Tue Apr 24, 2018 8:09 am

picandies wrote:
Tue Apr 24, 2018 5:26 am
As long as they are very close between the PC and rpi, should be ok....found out when moving a gui from the pc to rpi, the text mysteriously no longer fit into its assigned fields & textboxes, so it required a lot of unexpected editing on the rpi. At least now am aware of the issue, but would like to minimize it.
Did you use the same monitor/resolution?

Also, ming imperial is the best font for speed readers >:D
55:55:44:44:4C
52:4C:52:42:41

User avatar
scruss
Posts: 3212
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: is calibri & Helvetica font usable?

Tue Apr 24, 2018 1:53 pm

picandies wrote:
Mon Apr 23, 2018 5:19 pm
Is there any trickery to installing these fonts on the rpi? Haven't had the need up till now
Once installed, is there anything that needs set/changed so that the rpi will actually use them in all apps?
Nope. Just

Code: Select all

sudo apt install fonts-texgyre
They won't look identical, but they'll have the same metrics, so should fit in the same text boxes. Cross-platform font handling is best left at “This looks fine”, rather than “This looks identical”.

You might not be able to select the identically-named Windows fonts on the Raspberry Pi, but Fontconfig will substitute 'em when it sees 'em. fc-match, as mentioned by gkriedl, is handy for checking what's really going to be used.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

Return to “General discussion”