freeciv21 icon indicating copy to clipboard operation
freeciv21 copied to clipboard

Bundle our own fonts

Open jwrober opened this issue 2 years ago • 5 comments

Is your feature request related to a problem? Please describe. Being a cross-platform application we rely on the available set of fonts across many OS ecosystems. To better control the look at feel of the text in fc21, I think we should look at bundling our own TTF fonts and reference those in the options dialog.

Describe the solution you'd like We need to find an open source licensed font set that supports a wide array of languages and character sets. The Liberation Fonts first written by Red Hat -- https://github.com/liberationfonts/liberation-fonts -- is a potential candidate. They use an open source license and support a wide array of languages. Another option is the GNU FreeFont set -- https://www.gnu.org/software/freefont/ -- that is licensed GPL same as fc21 and also supports a huge array of languages.

This enhancement will require a change to the packages as well to ensure the font files are included.

Describe alternatives you've considered None

Additional context This issue came up while working on a font bug fix in PR #1281

jwrober avatar Aug 17 '22 14:08 jwrober

Should we really bundle it for linux too ? Cant we add it as a dependency, like ttf-liberation or something ?

psampathkumar avatar Aug 17 '22 14:08 psampathkumar

Should we really bundle it for linux too ? Cant we add it as a dependency, like ttf-liberation or something ?

Yea, we could look at that if/when we come around to doing this PR

jwrober avatar Aug 17 '22 14:08 jwrober

Linux packaging is up to the packager -- if there is already a package, we should of course use it.

lmoureaux avatar Aug 19 '22 13:08 lmoureaux

I agree, for the Linux packages we should add dependency. For Windows we will need to add the MSYS2 package for the font set we go with and then include the files into the package. I think for the macOS package, we can go with what we would do with Linux, just add another brew command to the the package.

jwrober avatar Aug 19 '22 20:08 jwrober

When fonts aren't installed system-wide: https://doc.qt.io/qt-6/qfontdatabase.html#addApplicationFont

lmoureaux avatar Aug 22 '22 23:08 lmoureaux