Search code examples
windowsfontscygwintruetype

How do I use third party TTF fonts on Cygwinx? How about Windows fonts?


This is 2 questions in one. Should I split them in two separate questions? I think in the end is the same thing.

I want to use some third party ttf fonts on my Cygwinx programs and I've being searching the web and Cygwin's docs and FAQs to see how to install this fonts on it. If it is possible to use third party fonts. How do I use all the fonts that windows already has installed?

It is as simple as that, I have a lot of fonts on windows and installed Cygwin on top of windows. I thought that Cygwin would automatically use all those nice fonts, but no! there is only a subset of them, and I'm starting to think that this subset of fonts are just open fonts that come with Cygwin with some aliases.

What have I tried?

  • Searching on Google, a lot!
  • Reading and searching CygwinX docs.
  • Searching Cygwin files for ttf fonts or related fonts configs.
  • Tried to understand /etc/fonts/* by myself.
  • Searching for some "font-update" program that is mentioned on some old (2005) emails of the Cygwin mailing list.

All that without any real achievement.

I'm using Windows 10 (64 bits) and Cygwin64 (installed through the Cygwin-Setup version 2.891).


Solution

  • The subset of windows fonts used by cygwin is defined by postinstall script

    /etc/postinstall/zp_fontconfig_cache_1.sh

    the Windows fonts are linked in /usr/share/fonts/microsoft

    On my system around 229 of the 350 present under C:\windows\Fonts are selected.

    You can copy your extra fonts in the same directory and run the same script.