0

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:

/usr/share/fonts/truetype

or in the user’s home directory:

~/.font

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!


Join 4,000+ makers on Adafruit’s Discord channels and be part of the community! http://adafru.it/discord

Learn “How Computers Work” with Bill Gates, Ladyada and more – From Code.org !

CircuitPython in 2018 – Python on Microcontrollers is here!

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!

Follow Adafruit on Instagram for top secret new products, behinds the scenes and more https://www.instagram.com/adafruit/


Maker Business — The Public Radio’s inventory dashboard

Wearables — Glue for the occasion

Electronics — Ew! Sticky!

Biohacking — Using Insulin Load for Better Sleep and Recovery

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at AdafruitDaily.com !



No Comments

No comments yet.

Sorry, the comment form is closed at this time.