Custom Font Support

I want to create a large text clock face which fills the entire display. I could accomplish this by embedding a PNG into the app for each number, and then mapping those. However, I would prefer to create a custom font in BDF format that includes each number as glyphs. I could imagine other users wanting to use different fonts as well.

Would it be possible to base64 encode a BDF file for custom font support, as has been done for images?

Fortunately, my use case was relatively simple to implement: big clock. I only needed to create 10 glyphs as images. The images have a black background (to match the background of the clock) and transparent foreground. This allows us to change the color dynamically.

Custom font support would still simplify this use case significantly IMO.

1 Like

Hey @joeyhoer,

Here it is on a Tidbyt:

I gotta say, it looks really awesome! =)

The plan for the prepackaged clock app is to provide a couple of different faces, and something like this would be incredible to have there.

As for fonts, there’s currently no way to insert a BDF font at runtime; they have to baked in when Pixlet itself is built. But changing that shouldn’t be too hard. I’ll add a ticket for it on Github, and in the meantime we’ll have to resort to embedding PNGs the way you did.

Sorry for not responding sooner. The final days of the campaign have been a bit hectic! =)

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.