Install license free fonts in Ubuntu
First find a good font licensed under a free license, such as the Apache License or the SIL OpenFont License: https://fontsarena.com/licenses-explained/
This example from https://www.1001fonts.com/free-for-commercial-use-fonts.html uses Open Sans Font Family: https://www.1001fonts.com/open-sans-font.html.
Create a folder for it, enter the folder, download the font, and unzip it:
mkdir -p ~/.fonts/truetype/open-sans cd ~/.fonts/truetype/open-sans wget https://www.1001fonts.com/download/open-sans.zip unzip open-sans.zip
If the program you want to use it in is open (such as Gimp or Inkscape) you need to restart it, to enable the font.