June 20, 2014 AT 8:00 am

Displaying Raspberry Pi Truetype Fonts #piday #raspberrypi @Raspberry_Pi

Pasted Image 6 20 14 5 31 AM

Here’s another handy Raspberry Pi project from Jamie Jackson — a method for Displaying Raspberry Pi Truetype Fonts:

I’ve been enjoying tinkering about with AdaFruit’s PiTFT 2.8″ touchscreen for the Raspberry Pi.  Working out how to display text and graphics on the screen using the frame buffer with, Python, my programming language of choice.  It took little research to get text to display on the frame buffer.  It took a little more to work out how to identify and list installed Truetype fonts. So I thought I’d post the code I used to list the Truetype fonts installed on a Raspberry Pi in case it proves helpful to others.

Truetype fonts are installed in the systems shared directories:


or in the user’s home directory:


A couple of good sources of free TrueType Fonts:

  • 1001 Free Fonts
  • Freeware Fonts

Code snippet lists the installed Truetype fonts from both locations.  It is best run from a SSH login….

Read more, including the code to try for yourself.

Pasted Image 6 20 14 5 32 AM

998Each Friday is PiDay here at Adafruit! Be sure to check out our posts, tutorials and new Raspberry Pi related products. Adafruit has the largest and best selection of Raspberry Pi accessories and all the code & tutorials to get you up and running in no time!

Check out all the Circuit Playground Episodes! Our new kid’s show and subscribe!

Have an amazing project to share? Join the SHOW-AND-TELL every Wednesday night at 7:30pm ET on Google+ Hangouts.

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Learn resistor values with Mho’s Resistance or get the best electronics calculator for engineers “Circuit Playground”Adafruit’s Apps!

No Comments

No comments yet.

Sorry, the comment form is closed at this time.