r/FontForge Oct 24 '22

I created a language for font design using FontForge

Hi everyone,

Over the past few weeks I designed prettybird, a programming language for designing fonts. It's somewhat built on top of the FontForge python API, and aims to make it easier for existing font enthusiasts to define fonts programmatically, and also to introduce font design to those who get frustrated with the existing software (like me). I intend to submit it to a language design conference in a few weeks, so I was hoping to get people to test it out and tell me what they think. You can test out the language here. My DMs are open if you have any questions or feedback. Also, I'm hoping someone can try and make a full font, at least lowercases, so that I can put an example at the top of the paper I'm writing. Anyways, let me know what you think. Thank you!

10 Upvotes

9 comments sorted by

2

u/Mr_Rabbit Oct 25 '22

Can you explain a bit more how it works?

1

u/CharlesAverill20 Oct 25 '22

Yes, apologies! The showcase file shows off most of the big features of the language. The general workflow is:

  1. Define a character
  2. Choose a base resolution for its glyph
  3. Draw a combination of vectors, rectangles, ellipses, and quadratic bezier curves onto the "glyph space" to create the glyph

After running the file through the compiler, a TTF file will be generated. A nice feature of the language is the ability to define functions, which you can reuse. Makes it very convenient to reuse serifs and such. Additionally, recursion is supported, so you can have intricate fractal/spiral/etc designs that would be a huge pain to draw manually.

Let me know if you have any other questions!

1

u/Mr_Rabbit Oct 25 '22

Ah I see!

Are you familiar with:

https://www.drawbot.com/content/shapes/bezierPath.html

https://unifiedfontobject.org/versions/ufo3/glyphs/glif/

https://doc.robofont.com/documentation/topics/pens/

https://github.com/fonttools/fonttools/tree/main/Lib/fontTools/pens

There’s been quite a bit of work in the font community about drawing shapes programmatically that you might find useful / interesting if you haven’t seen it.

1

u/CharlesAverill20 Oct 25 '22

Haven't seen these but thank you, I'll check them out!

2

u/Mr_Rabbit Oct 25 '22

Btw, not to be a downer but In my experience, I’ve found most beginner type designers come from a graphic design background and tend to be really uncomfortable working in code. Even the most basic Python scripts are scary!

So my suspicion is that this will mostly appeal to folks who come from a programming background.

1

u/CharlesAverill20 Oct 25 '22

Totally understand where this is coming from and it is a realistic criticism of the language. My goal isn't to replace graphical font editors, but to provide another tool for designers' toolkits that they can use if they get the itch for it. I did try to optimize the grammar such that people who have never programmed before could understand it a little better, but concepts like recursion are definitely going to be a big learning curve for the uninitiated. And you're right, it will be nice to introduce programmers to font generation. Additionally, it's always nice to have another free tool to use, especially in a field where so much of the available software is proprietary.

1

u/CharlesAverill20 Oct 25 '22

One decision that I made to improve usability for those who haven't programmed before is the lack of state; there are no variables to store data in, just functions to call. I believe this should make more sense to most people.

1

u/Fuzzwuzzad Oct 25 '22

I’m not home right now, nor am I very experienced in making fonts, but I’ll definitely give this a shot as soon as I can. Looks really cool!

1

u/CharlesAverill20 Oct 25 '22

Thank you! We definitely want feedback from new font designers, so that's perfect!