#47: Python in Typeface and Font Development Transcript
00:00 This week on Talk Python to Me, we'll dive into the world of typeface and font development.
00:04 Even though we spend our days immersed in fonts, from computer interfaces, signs, books, televisions, and more,
00:11 much of the process and thinking about fonts is invisible to us.
00:14 If we did dig into font development, we'd see that Python is a key component of the Font Developers Toolkit.
00:20 This week, we have a very special guest to tell us all about it.
00:24 We'll talk to Jost van Rossum about how he has helped pioneer the use of Python for font development.
00:30 This is episode number 47, recorded February 3rd, 2016.
00:49 Welcome to Talk Python to Me, a weekly podcast on Python, the language, the libraries, the ecosystem, and the personalities.
01:05 This is your host, Michael Kennedy.
01:07 Follow me on Twitter, where I'm @mkennedy.
01:09 Keep up with the show and listen to past episodes at talkpython.fm, and follow the show on Twitter via at Talk Python.
01:16 This episode is brought to you by Hired and SnapCI.
01:19 Thank them for supporting the show on Twitter via at Hired underscore HQ and at Snap underscore CI.
01:26 Hey, everyone.
01:28 I have a great conversation with Jost on Tap today.
01:30 But before we get to that, I want to give you a quick update on my online course project.
01:34 Recall from last week, I announced I'm starting work on a large set of online training courses for Python.
01:40 You can read about the whole story on my blog post, which I'll add to the show notes.
01:44 To launch this project, I put the first course, an intro to Python course called Python Jumpstart by building 10 apps, on Kickstarter.
01:52 The campaign has been out for a week, and the response has been amazing.
01:56 The Kickstarter was funded in 12 hours, met almost all of its stretch goals, and is still going strong.
02:01 I want to say thanks to all of you who backed it.
02:03 I know many of the backers are podcast listeners.
02:06 If this sounds interesting, check out the course at talkpython.fm/course.
02:10 And if someone you know or work with would benefit from it, send them a link.
02:14 Speaking of great ways to learn more about Python, EuroPython 2016 has announced their call for proposals.
02:20 If you're interested in speaking there, just visit europython.eu and click on Speakers in the menu bar.
02:25 Now, let's hear from Jost van Rossum about fonts and Python.
02:29 Jost, welcome to the show.
02:31 Thank you.
02:32 Thanks for having me.
02:32 Yeah, I'm really interested to learn about how Python is involved with font development.
02:38 This is something I knew nothing about, and one of the listeners, Chris Simpkins, sent me a message and said,
02:44 oh, you have to have Jost on the show?
02:46 He's doing all these cool things with Python and fonts, and so I'm ready to learn all about it.
02:51 Huh, that's cool.
02:52 Well, font production is a pretty rare profession or field, so it's kind of a niche market for tools.
03:00 I mean, there are many graphic designers and that group there are, there's a smaller group of typographic designers, and within that group, there's an even smaller group of type designers who are designing typefaces, which become fonts.
03:13 I tend to make a distinction between the word typeface and font.
03:15 It might be a technicality, but I mean, we see the word font.
03:19 A font is a technical representation of a typeface.
03:22 We design a typeface and we produce a font.
03:25 I see.
03:25 So, like, font might be, that's the thing, like, in the TTF file.
03:29 Right.
03:30 The TTF file is the font, and the font describes the typeface with coordinates and curves and splines and bases, whatever the format does.
03:38 Awesome.
03:39 So, I totally want to dig into that.
03:41 Before we do, though, maybe we could hear your story.
03:43 How did you get into programming and then Python?
03:46 You know, I'm the younger brother of Guido, Guido van Rossen, the inventor of Python, as you know.
03:51 We're about 10 years apart.
03:53 He just turned 60.
03:55 I will be 50 soon.
03:56 But when I was 15, so this must have been calculating, 1981.
04:01 This is like a pioneering time of home computers.
04:05 Our dad bought a little Sinclair 81, a ZX81 computer, which I hooked up to your television.
04:12 The only thing you could do with that is to program it, and my brother had already been studying math and or computer science.
04:20 I don't even know exactly, and he was working in that field.
04:22 So, he wasn't living at home anymore, but he was close by enough to teach me the basics.
04:27 Like, what do you do with such a machine?
04:30 How does, it was a variation of basic that computer did.
04:34 So, I had a nice introduction of a relatively experienced programmer.
04:39 Somehow, yeah, that fascinated me.
04:41 I liked working with that at the age of 15.
04:44 So, actually, I got into programming before I got into graphic design, a typographic designer.
04:50 I started so that I was trained as a graphic designer, typographic designer.
04:53 Later on, I never got a formal training as a programmer.
04:57 Interesting.
04:58 So, you got into programming first, and then you got into this font development.
05:03 Yeah.
05:03 I'm sure you're thinking, like, how can we automate this?
05:05 How can we build tools to do all these things, right?
05:08 Well, that is what happened later.
05:09 While studying graphic design, I had an awesome teacher called Gerard Nortzey, who was a type
05:16 design and calligraphy teacher.
05:18 And he had a very open mind for technology.
05:21 And, you know, at some point, I was still playing with that old computer when I was 18 and produced some experiments that I programmed.
05:28 I programmed some letter forms and showed it to class and showed it to my teacher.
05:33 And, yeah, he was supportive of that.
05:36 It was kind of a new thing at the time.
05:38 People didn't have PCs at home yet.
05:40 So, to work with a computer was a very nerdish thing.
05:43 So, that's kind of the context.
05:45 Yeah.
05:46 So, that's like back when, like you said, you had to program the computer to get it to do anything.
05:50 That's before they had programs.
05:52 And so, that's crazy.
05:52 Yeah.
05:53 But very cool.
05:54 Right.
05:54 How did that evolve into working with Python?
05:57 I mean, obviously, your brother invented it, which is, you've got to be just so amazed at how that's going, which is cool.
06:04 But it seems like it's not just, hey, you're using Python for font development, but the font industry is.
06:12 I was working with Peter from Blockland and also Eric from Blockland.
06:15 Those are two brothers that actually are in age similarly as me and my brother.
06:21 So, Peter is the older one.
06:22 Eric is the one of my generation, pretty much.
06:24 And we were making fonts and exploring the technology.
06:29 And Peter actually had been involved in the development of a font editor called MacIcarus or Icarus M.
06:36 It was a MacIcarus version of the Icarus font digitizing software.
06:40 He was really experienced with that stuff and actually had started writing another font editor.
06:45 He was never happy with the font editors that were out there.
06:47 And so, he created his own stuff, well, several times, actually.
06:53 And he is also a graphic designer that somehow accidentally got into programming without a formal training.
06:59 So, we're kind of a small group of graphic people who happen to be programming.
07:03 And, well, we do our best, but we're amateurs at best.
07:07 But Peter realized that it's such a specific thing to do.
07:13 You have to have control over your tools.
07:15 So, he was really – like I said, he wasn't happy with the tools that were there.
07:19 It's very difficult to make a full working application.
07:22 A font editor is actually a pretty difficult thing to make.
07:25 And being the busy person he is, he never got around to completely finishing it.
07:29 So, he realized, well, maybe we should start with an existing font editor and make it programmable.
07:34 And that is how Robofog came about in the mid-90s, 95.
07:40 I think we started roughly with that project.
07:42 It's based on Fontographer, which was a very popular font editor at the time.
07:46 Made by the same people who made Freehand, which is like – was a competitor to Illustrator.
07:51 Really smart people.
07:53 A nice small company from Texas who developed that.
07:56 And somehow through contacts at the Font Bureau, this is Font Foundry in Boston, and David Burlow, the founder and owner of that company, we were in contact with those people.
08:07 And they allowed us to use their source code and build this programmable font editor.
08:14 It was actually the old version.
08:15 They had a new generation lined up, which was a complete rewrite in C++.
08:19 But the old version was written in C.
08:21 And Peter from Blockland was playing – I'm sorry, I'm getting perhaps a little long-minded about this, if you want to interrupt.
08:27 No, it's interesting, though, that you contacted this company.
08:31 And this was a commercial product at the time?
08:33 Yeah.
08:33 And then they gave you the source code to build an API.
08:37 That's really interesting.
08:39 Yeah, it was their obsolete version, pretty much, right?
08:42 So, they had the new generation, which was much nicer and fancier and whatever.
08:46 But they allowed us to use their old code base, not to publish the code base, but we were allowed to play with that.
08:52 And Peter initially started – he realized I wanted to hook it up to a scripting language.
08:57 And he wasn't into Python yet.
08:59 He tried AUK, which, well, it was awkward at best, I suppose.
09:03 It's all in the name already.
09:04 You knew it was a bad idea.
09:06 Yeah, it's all in the name.
09:07 Exactly.
09:07 And somehow I had just gotten seriously into Python.
09:10 I think the first Python version I had on my computer was maybe version 1.2.
09:15 And the first version that I did some serious work with, I think, was Python 1.3.
09:20 I just looked it up before the interview.
09:21 I think it must have been around 1995 when Python 1.3 was released.
09:26 I think 1.4 became even better with a Mac support.
09:30 Anyway, because this photographer application was written in C, CPython is written in C.
09:35 And I infected Peter from Blockland with the Python virus and showed him that we could compile this stuff with C compiler for Macintosh.
09:45 And we actually managed to compile those two worlds into one application.
09:49 And so once that physically worked, which was pretty hard for us because we're not really programmers,
09:54 once that physically worked, we could start making the connections, making the API indeed, making Photographer scriptable.
10:02 So that turned became Robofog, which was, well, minorly successful within a niche market.
10:08 We had some colleagues and friends in our business that really could use those features.
10:13 We managed to build a little toolkit so you could build your own UI on top of that in pure Python.
10:20 So people had a lot of fun with it and produced really useful tools for their production work, font production workflow.
10:27 That's cool.
10:28 So you actually took like the CPython interpreter.
10:31 Yeah.
10:31 And compiled it straight into their C app.
10:34 Exactly.
10:35 Oh, that's pretty good work for formally trained programmers, right?
10:39 Yeah, we were pretty proud that we got that, that we pulled that off indeed.
10:42 Yeah, that's really cool.
10:43 That's really cool.
10:44 So that worked really well for a while, but then it was showing its age, right?
10:48 Exactly.
10:49 Yeah, we started, the version of Photography we used was pretty much obsolete at the time we started using it.
10:54 So obviously it suffered a bit rot, but also a lack of new features.
10:58 This is a time when Unicode became more and more important.
11:02 The international encoding standards.
11:05 I should probably not have to introduce that for this audience.
11:08 New type technology came about called OpenType, which came largely from Microsoft, but was a cooperation between Adobe and Microsoft, allowing all kinds of fancy typesetting stuff, but also non-Latin support for all kinds of languages that were not available for us simple font developers earlier.
11:28 So larger character sets, Unicode features, OpenType stuff, that was just no longer, it was not possible in Robofog.
11:37 And we were pretty much at the same problem.
11:39 I mean, it would pretty much require a full rewrite of Photographer to support those things that we needed.
11:45 And yeah, we were kind of not up to that.
11:48 But then there was a program called FontLab from Yuri Yarmola, a very smart programmer from St. Petersburg in Russia.
11:55 It came from the Windows world, but it was ported to macOS at some point, becoming more and more popular.
12:01 And we met him at a conference in 97 in Moscow, and we showed him Robofog.
12:07 And he was actually looking or shopping around for a scripting language because he realized that that's indeed something that is needed within this kind of workflow.
12:16 Again, that's a little sidebar.
12:19 I mean, it's a very specialized profession, but there are not many people who are doing it at that high level.
12:25 So there's not a huge market.
12:26 So like a company like Adobe, it's not interesting for them to develop a font editor at such a scale.
12:33 Right.
12:33 Maybe they'd make something like Illustrator.
12:35 Exactly.
12:37 But not really completely focused.
12:39 So it sounds like you have these smaller companies written by one or two guys, right?
12:43 Exactly.
12:44 And type designers are very, well, it's a specialized thing, but they're also very stubborn people.
12:48 But you ask 10 type designers a question, you will get 10 different, they will not agree with each other, simply, especially regarding tools.
12:54 So to have this editor that you can enhance or can script or automate or write plugins for is just the thing because people can just make their own stuff, right?
13:05 And Python is awesome for that because people with little or no programming experience can get into it relatively quickly.
13:12 So that whole model proved for us pretty successful.
13:17 So the Russian guy, Yuri Ramola, saw that and realized, yeah, Python is a cool language, easy to learn, and it's easy to integrate in C.
13:25 And I think his application was written in C++, but still that integrates pretty well.
13:30 So he chose Python as a scripting language for that.
13:32 Yeah.
13:32 And he had a working example from Robofog as well.
13:36 So he's like, let's just do that again over here, right?
13:38 Yeah, exactly.
13:39 But it was a cool thing because suddenly, I mean, we could use our own thing less and less because it was missing the features that we desperately needed.
13:47 In the late 90s.
13:48 So he wrote an API for that.
13:50 And actually, we weren't quite happy with the way he wrote that API because we were used to our way.
13:55 So we actually wrote a whole library on top of his API.
13:59 His API was a little low level.
14:00 We wanted to have something more high level as far as scripting API is concerned.
14:06 We called that Robofab.
14:08 I forgot where that name came from, but it must have been something pretty meaningless.
14:12 Yeah.
14:13 So we worked with that for better or for worse.
14:16 I mean, it was at that time the only tool on the market at all that supported all the features we needed.
14:22 So they were a bit in a monopoly position at the time.
14:27 Yeah.
14:28 And that was another commercial product.
14:29 Yeah.
14:30 That's another commercial product.
14:31 Roughly at the same time, I should have looked that up before the interview.
14:34 I have written a library called Font Tools slash TTX.
14:38 TTX is more like the tool side, the user end of the tool, which is a library that deals with several font formats, but mostly true type and open type.
14:48 And can read binary data.
14:56 And also that's the TTX part.
14:57 It can convert a whole binary font to an improvised XML format.
15:04 It can be able to do that.
15:05 So that's the two things that that library does, which was great for reverse engineering things, for fixing up things that editors, font editors didn't generate correctly to learn about the formats.
15:19 I open sourced that, so that was not a commercial thing.
15:21 I put it on SourceForge, if anyone remembers that.
15:25 I've heard of that thing.
15:25 Yeah.
15:26 It was like the MySpace of version control, right?
15:30 Yeah, exactly.
15:30 It was a cool time.
15:31 And we had some contributors.
15:33 Werner Lemberg got involved.
15:35 I think he's now doing some work for Google for true type auto hinting stuff.
15:39 Adam Twardock, who's actually on the FontLab team.
15:41 At the time, there was a small community of people who used that stuff.
15:45 And actually, even for the non-programmers, non-programming type or font developers, they could use that tool to decompile fonts, peek and poke to the insides, and then compile it back to a working font.
15:58 So that was a pretty neat tool to have.
16:01 And it's on GitHub now, is that right?
16:02 Yeah, yeah, yeah.
16:03 By now, it's maintained by Bedat.
16:06 I can't pronounce his last name.
16:08 He works for Google.
16:09 So if you actually Google for font tools GitHub, you should end up at his repository.
16:14 He kind of took over the maintenance together with a fresh young team of people.
16:20 In my professional life, I had less and less direct use for it.
16:25 And the kind of things that I needed, it did in a fairly stable way.
16:29 So I kind of backed out of developing it.
16:32 I was kind of the, well, what do you call it?
16:35 The maintainer that disappeared.
16:37 The spark that created the project that other people ran off.
16:40 There you go.
16:41 Right, yeah.
16:42 So one thing I saw that you can do with that that's interesting and I wanted to ask you about is you said you can debug fonts.
16:49 What does debugging fonts involve?
16:51 What does that mean?
16:52 Fonts is an interesting technology, fonts in general, because they are supposed to have a long lifetime.
16:58 People do not tend to upgrade their fonts.
17:02 And they're still there pieces of software if you look at it.
17:05 I mean, to an extent it's data, but there's actually some aspects of various font formats.
17:10 You can really call it software.
17:11 It is software.
17:12 So, yeah, different operating systems and different applications have different quirks with respect to handling fonts.
17:19 Like a font may work in one application and fail in another.
17:22 Well, if they're made properly, then they work everywhere, obviously.
17:26 But that is not how the real world works.
17:29 So there's this whole bunch of vaguely documented things.
17:32 Like if you want your fonts to also work in Word from Windows 95, then you should make sure that that value in that specific table is set in this particular way.
17:44 Otherwise, it will not work.
17:45 It's a whole bunch of legacy.
17:48 I was going to say crap.
17:49 I don't know if I can say that on your show.
17:50 But it's really fairly chaotic.
17:52 For instance, the TrueType specification is very well maintained by Microsoft these days.
17:57 TrueType is an invention from Apple, and they maintain their own documentation.
18:01 But there's different versions also of the specification.
18:04 That's interesting.
18:05 It sounds a little bit like the issues you run into when you're doing like CSS and web design, but across different browsers, right?
18:13 Yeah, probably.
18:14 Yeah, I know of those issues, but I'm not a web developer.
18:16 So I don't run into them on a day-to-day basis.
18:18 But the cool thing is, I mean, there are fonts that were generated by font editors 25 years ago, and they still work in some contexts.
18:27 Maybe not everywhere.
18:28 But like PostScript Type 1 fonts, I mean, yeah, on macOS, you can still install those old fonts, and they will work.
18:36 Well, it's limited, of course.
18:37 They will have a small character set.
18:39 People expect, especially graphic designers who actually buy fonts, right?
18:43 So fonts are often a commercial product.
18:46 They don't expect to have to upgrade their stuff every couple years like they are.
18:50 Well, they are familiar with that with their applications.
18:52 I mean, Adobe pretty much pushes their InDesign and Illustrator upgrades.
18:56 And, well, everyone knows the annoying Acrobat upgrade messages.
19:02 Oh, yeah.
19:03 So that stuff just doesn't happen in the font world as much.
19:06 I mean, if people need new characters.
19:08 Like an interesting time was when the euro was introduced in Europe.
19:11 Suddenly, well, the European Union had decided, well, hey, if U.S. dollars, they have a nice dollar sign.
19:18 We have to have a sign for the euro.
19:20 So they had this logo designed for the euro, which we now all roughly know.
19:24 But initially, they thought it's really a logo that was formally specified with a compass and rulers and measurements.
19:31 And that's what we were supposed to use, not realizing that there is a different dollar sign in every font out there.
19:38 So the font designers soon ignored the specification and just designed their own euro sign.
19:44 But, yeah, all commercials, all fonts out there had to be upgraded to contain the euro symbol, which was a huge amount of work, which cost the font industry a lot of money.
19:52 But I think there was also some opportunities there.
19:55 So those relatively ridiculous stories are fairly common in the font world.
20:01 Yeah, that's, I guess I never really thought about it, that new symbols appear and you need them to show up.
20:06 With every update of Unicode, we look a little bit like, okay, are we really going to support that?
20:13 Then suddenly math people decided that there is a bold variation of lowercase letters that are semantically different from regular.
20:21 So they need their own Unicode code points in Unicode.
20:24 So suddenly there's a whole set of lowercase letters or maybe even capital, I don't know, that are just bold because math people want that.
20:32 I don't know.
20:33 I'm not convinced of the making sense part of that.
20:37 Anyway, that's from my perspective, at least.
20:38 Sure.
20:39 Interesting.
20:50 This episode is brought to you by Hired.
20:53 Hired is a two-sided, curated marketplace that connects the world's knowledge workers to the best opportunities.
20:58 Each offer you receive has salary and equity presented right up front, and you can view the offers to accept or reject them before you even talk to the company.
21:06 Typically, candidates receive five or more offers within the first week, and there are no obligations ever.
21:11 Sounds awesome, doesn't it?
21:13 Well, did I mention the signing bonus?
21:15 Everyone who accepts a job from Hired gets a $1,000 signing bonus.
21:18 And as Talk Python listeners, it gets way sweeter.
21:21 Use the link Hired.com slash Talk Python to me, and Hired will double the signing bonus to $2,000.
21:26 Opportunity's knocking.
21:29 Visit Hired.com slash Talk Python to me and answer the call.
21:38 So another thing that is sort of related to the font tools is this thing called DrawBot, and that's more of a visual editor, right?
21:45 Well, yeah.
21:47 No, it's not directly related to the font part, but it's a little application for macOS that is pretty much a Python editor, and you run some code, and you can get some textual output, but also visual output.
21:59 So it's a bit like processing the famous Java-based application from the MIT people, from John Maeda, who was the professor at MIT who created this thing called Design by Numbers, which was pretty much an experimental thing to teach graphic designers some things about programming.
22:18 And that was a very simple thing, maybe almost like Turtle Graphics.
22:21 I forgot the details.
22:22 He made a very nice book about it.
22:24 Anyway, his students, Casey Reyes and other people, wrote processing, which became hugely successful.
22:31 But I wrote this little thing called DrawBot, which is not really equivalent because it's very simple and primitive and much more 2D and vector-based.
22:39 That allows people to write a small program and get a vector-based graphic output that you can save as a PDF or maybe also as pixel images.
22:48 And I use that on my students in The Hague.
22:51 Well, I teach at the Bachelor of Graphic Design Department, but I only recently started teaching coding there.
22:56 We have a master program for type designers where people from all over the world come to The Hague and study type design for a year.
23:03 So that's between 10 and 12 people who really intensively study type design.
23:08 And the whole tool issue, we think tools are – digital tools are important to have control over.
23:15 So we want them to at least learn the basics of programming.
23:19 Right.
23:19 They're definitely not going to become professional programmers, but they should be empowered, right?
23:24 Some people, indeed, you know, some people are just not wired for programming and they will actually struggle to get something going.
23:30 That's fine, too.
23:31 And they still learn a thing or two.
23:33 One student I should single out specifically, that is Frederik Berlan from Ghent in Belgium.
23:38 Well, he had a decent math background, but really no programming background when he started studying with us.
23:44 And he turned out to be super fast in picking up Python and making awesome stuff.
23:50 And he went on to author a font editor called RoboFont, which was published like a couple years ago only.
23:57 It's fairly successful.
23:58 It's written in Python, obviously, and very extensible.
24:01 That's cool.
24:01 Yeah, I was going to ask you about RoboFont.
24:03 I didn't realize the connection.
24:04 That's cool.
24:05 Yeah, but okay.
24:06 But let's get back to Drawbots because it was a primitive tool that taught our students the basics of programming.
24:12 But also there, I mean, I didn't really maintain it properly and it fell apart a little bit.
24:19 And at some point, actually, Frederik picked it up and pretty much rewrote it almost from scratch, adding all sorts of new features, adding support that we can export animations and animated GIFs and a much nicer preview of the graphic output.
24:35 So that's been a lot of fun.
24:37 It's been a great – that's the generation three.
24:39 It's completely open source now.
24:41 It's – I think the main site – drawbot.com is the main website.
24:46 There is – the source is on GitHub.
24:48 Unfortunately, it's a Mac-only application at the moment.
24:51 We're still hoping that someone will at least pick up the drawing API and make cross-platform or Linux and or Windows versions of that.
25:00 So that's – because it's a simple drawing API.
25:03 I'm not saying it's perfect, but it's small.
25:06 And you can do cool things with it, with color and shapes and text even.
25:10 Yeah, I've seen a lot of really cool pictures that people have generated within.
25:15 They're pretty detailed.
25:17 Yeah.
25:17 Even fractal-looking things.
25:19 Right.
25:20 Yeah, yeah, yeah.
25:20 Well, you can write your loops in Python or even recursive things.
25:24 People tend to pick that up relatively quickly.
25:26 So it's been a really nice little tool for our type design students to get started with Python.
25:33 And then they move over to do the serious scripting work for font editors.
25:37 Well, that used to be FontLab.
25:39 Now, obviously, RoboFont.
25:41 But also, there's yet another commercial font editor called Glyphs from Georg Seifert, a guy in Berlin.
25:47 He's a very smart programmer.
25:48 So now there are actually three commercial font editors out there that all support Python.
25:53 I mean, only one, only RoboFont, is written in Python.
25:57 And there's actually, there is an open source one.
25:59 I don't know how alive that is called FontForge that also has some Python support.
26:05 So yeah, somehow, Python is all over the place in font development land, if I can call it that.
26:12 Yeah, yeah.
26:13 That's really interesting.
26:14 And so it makes perfect sense you would teach the students Python so that they can basically script these editors they have to work with, right?
26:22 Yeah, exactly.
26:22 Yeah.
26:23 And, you know, yeah, maybe one little bit of background, like why do these guys need that?
26:27 Well, imagine developing a font family that has several weights or many weights, has to support many languages.
26:33 So there are many characters in there.
26:35 Well, then imagine all the European accented letters.
26:38 There's a whole bunch of, it's just one example.
26:42 Like there's a whole bunch of letters that are derived from normal Latin letters, but have an accent placed on them or several accents placed under them or on top of them or underneath them.
26:50 Well, there are all kinds of tools to work with that.
26:53 But this is just one example of things that are pretty tedious to make by hand in a font editor.
27:00 So you want to have to write maybe some rules of how to build those characters that you're not going to draw them one by one by hand.
27:08 That's just going to take too long.
27:10 And things have to be consistent within a font.
27:14 So you can write tools that check certain things, metrics, whether certain things align or whatever.
27:19 There's all kinds of things that you want to control or check or build in ways that can vary greatly from designer to designer to or could change from design to design.
27:32 So the approaches and philosophies or design principles that people apply can be different.
27:37 So to have this programmable environment is a real boon for many, many of our colleagues.
27:43 That makes a lot of sense.
27:44 Do you have problems where, like, you've got, say, an O with an umlaut and a regular O?
27:50 And if you change the O, you want to obviously change all the sort of O derivative ones and you want to script that.
27:57 So maybe as you're developing fonts.
27:59 Yeah, well, that particular problem has actually been solved for a long time in a non-programming way,
28:04 because indeed, that's a good question, but it's such a common problem that, in fact, in most editors, you can build a glyph referencing other glyphs.
28:13 Right, okay.
28:14 Yeah, so those things will stay pretty much consistent if you're not completely careless.
28:19 But indeed, but that is the kind of things, indeed, that you can do with these tools.
28:24 One of the things I ran across looking through this space was these things called UFOs.
28:29 Right.
28:30 Not the ones with aliens in them, but unified font objects, right?
28:33 Exactly.
28:34 Yeah, that's an interesting thing.
28:35 This is a file format.
28:37 Yeah, unified font object.
28:39 It's also more or less an API if you want to deal with those files.
28:42 It's pretty much it's actually me and my colleague Eric from Blockland started a precursor of this thing,
28:49 because we lived in different cities and we were working on a font project together.
28:54 And we needed a way to share the glyph data.
28:58 And we were actually using CVS.
29:01 This is like early 2000s.
29:03 I remember CVS.
29:04 Remember that?
29:05 That is like before Subversion.
29:07 Yes.
29:07 It was pretty awesome.
29:08 It was a super old and clumsy version control system.
29:11 But we decided we needed a version control system for our glyph.
29:16 So we defined a text format for glyph outline data.
29:20 And, well, we put it in XML format at a single file under version control for each glyph.
29:27 And that way we could cooperate on one font remotely.
29:32 So this tool, which was made by and for programmers for code, we started to use for outline data, which was pretty nice.
29:39 But that idea kind of caught on and or people thought, hey, we could use that as well.
29:44 And we teamed up with a guy called Tel Lemming in the U.S., who was at the time working for a small font company called House Industries.
29:52 And the three of us went on and developed this a little more seriously with a place for meta info and all kinds of metrics data.
30:02 And we improved the glyph formats that would be more generally useful because it started as this ad hoc homemade.
30:09 You know how all these things probably start.
30:11 And still, yeah, we're amateur programmers and definitely not experienced in the specification of file formats.
30:18 We pretty much winged it with some XML knowledge.
30:22 And in the end, it's a UFO file.
30:26 It's not really a file.
30:27 It's a folder or a directory containing a bunch of files.
30:30 And you need this so that you can put it in version control and diff it and not have it always come to it, right?
30:35 Yeah.
30:36 That was the starting point.
30:37 Actually, so we made an import-export tool for FontLab, the dominant font editor at the time.
30:44 And then it kind of became an exchange format because people started writing other tools that were not necessarily complete font editors.
30:54 For instance, Tal Lemming, the guy I just mentioned, one of the co-authors of the UFO specification, he wrote a very cool tool to edit metrics.
31:03 Well, within font editing, you can say editing spacing and kerning metrics is another specialization.
31:10 And it's a tedious kind of work.
31:13 So to have a good tool for that that makes things easier was really much needed.
31:18 And he wrote that.
31:19 It's called Metrics Machine.
31:20 It's still around.
31:21 So we needed a way to transfer data from FontLab, which used its own proprietary binary GU unspecified unpublished format, to Metrics Machine and other tools.
31:34 So the UFO format was just the thing for that.
31:38 So to just go back and forth between those applications because we needed FontLab to edit outlines and, well, we needed Metrics Machine to do the proper metrics editing.
31:47 So it became this exchange format and caught on a little further.
31:53 Tal Lemming pretty much took over the specification and wrote a really nice formal specification for that.
32:00 He learned how to do all that.
32:02 Spent many, many, many hours getting that done.
32:06 Getting it just right.
32:07 Yeah, I'm sure.
32:09 Yeah, yeah.
32:09 The world of specification writing is also wonderful.
32:12 Well, he and Eric from Blockland were also involved in the development of the WOFF format, the W-O-F-F, web fonts format.
32:20 So they got into the W3C world of writing specifications, which, well, I wasn't involved with that.
32:29 I've seen it from the sideline.
32:30 And it's, well, a lot of work.
32:33 It's very tedious.
32:33 It's very important work.
32:36 I don't want to underestimate that.
32:38 But it's not easy for us simple graphic designers, if I can put it that way.
32:44 Yeah, I'm sure.
32:45 When it gets down to that, you've got to, you know, exactly the right detail and so on.
32:50 Yeah, everything.
32:50 Yeah, the terminology, like, this must be like that.
32:54 That should be like that with the right to use of capital letters in your language.
32:58 It's, you almost have to become a lawyer for that stuff.
33:02 It's very interesting.
33:03 Yeah, it sounds a little bit like that.
33:19 Gone are the days of tweaking your server, merging your code, and just hoping it works in your production environment.
33:24 With SnapCI's cloud-based, hosted, continuous delivery tool, you simply do a get push, and they auto-detect and run all the necessary tests through their multi-stage pipelines.
33:34 Something fails, you can even debug it directly in the browser.
33:38 With a one-click deployment that you can do from your desk or from 30,000 feet in the air, Snap offers flexibility and ease of mind.
33:46 Imagine all the time you'll save.
33:48 Thanks, SnapCI, for sponsoring this episode by trying them for free at snap.ci slash talkpython.
33:55 So, can you talk about what it's like to, like, create fonts for these embeddable web, like the WAF font type things, versus, say, print, versus computer screen?
34:14 Is this all the same, or how do you think about that?
34:16 I'm not that active in creating web fonts and stuff.
34:20 I know roughly how this stuff works.
34:22 There are different philosophies.
34:24 I mean, on the one hand, technology is always important for type design.
34:28 And, like, even historically, this is a very interesting story that starts pretty much at Gutenberg, like how this whole invention of print and how that goes through analog typesetting systems through digital.
34:41 Anyway, ending up now at fonts for applications and websites.
34:44 Yeah, somehow, to get the best results, you have to have some grasp of the technology, right?
34:51 So, as a type designer, you better know to a fairly deep level how things work, how rasterizers work, what kind of rasterizers are there.
35:02 Well, it may become less and less relevant with screens getting better and higher resolutions.
35:07 I mean, I'm looking at a retina screen here that I cannot literally, with my old eyes, distinguish the individual pixels anymore.
35:14 Yeah.
35:14 So, in some sense, maybe font design is getting a little bit easier than it used to be.
35:18 Oh, yeah.
35:19 Or is that a controversial question?
35:20 No, no, no, no, no, no.
35:21 Well, tools are getting more accessible.
35:23 But that's with all, like, you can give an amateur a high-end digital camera and they can make technical great, great photos.
35:30 And there will be some talents who have a flair for that or natural talent for that and become great photographers.
35:37 That's the same pretty much.
35:39 I think that's a fair parallel to my profession.
35:41 But most of the time, people will work hard and have an education and learn about the basics, not only technical, but on a visual level, on a design level.
35:51 Like what makes a font work well, especially in text sizes, for instance.
35:56 That is just not a simple thing that even if an amateur can relatively easily learn the tools, that will not allow that person to create a high-quality font easily.
36:07 That's kind of an interesting thing.
36:09 Yeah, there's a lot of non-obvious things that make it really different on reading something or how it's even – how easy is it for you to absorb, right?
36:19 Yeah.
36:19 One of the favorite aspects of type design is the paradox.
36:24 You're designing a group of shapes that are letters that are designed to be used in context and in different orders.
36:30 So the set of shapes, they belong together, right?
36:34 They have to work together.
36:35 They have to form words and sentences and people need to read that.
36:38 So on that level, they have to be very similar and equal and nicely balanced to make it work as a group of shapes.
36:45 On the other hand, if you make everything as the same as possible, things become illegible because the letters need to be – you need to be able to distinguish the letters, right?
36:53 So on another level, you have to make the letters as different from each other as possible.
36:59 So that's kind of like this whole paradox that we try to balance in between.
37:03 And it kind of totally depends on the application of your typeface.
37:08 I mean, if you're designing a wild headline thing for the hippest magazine or flyers or whatever, then obviously you'll have a very different set of rules to work with than if you're designing a typeface for a newspaper that needs to use the paper as efficiently as possible.
37:25 So to cram as much text on there without becoming illegible.
37:28 Yeah, that's really interesting.
37:29 I've always appreciated fonts and being able to look at the screen and see – you can look at some and they're beautiful and others you'd rather not have when you're writing your paper or whatever when I was younger.
37:41 But then I watched the movie Helvetica.
37:43 Have you seen that?
37:44 Right.
37:44 Yeah, yeah, yeah.
37:45 That's an awesome movie.
37:46 Oh my gosh.
37:47 I have ten times as much respect for fonts and the history and the thought and the detail that goes into it.
37:55 Do you like that show?
37:56 It was a fantastic movie.
37:57 And it actually has – I saw a lecture of the director of that.
38:00 I mean, it was very obviously popular within my field because, you know, it was the first big full-length documentary that really shows something – well, I don't know if it's really the first.
38:09 But it was an important documentary for our field and I'm glad that it got out there outside of our field as well, that people saw it and learned something about that and make people realize what it is.
38:21 I remember a long time ago on a party, I think I was still studying, but I was already deeply into type design.
38:27 Someone asked, type design?
38:29 Isn't that something like macaroni design?
38:33 So it's like, well, not quite, but that's indeed – yeah, but that was probably at a time where people in Word now, they know you have your font menu.
38:42 Everyone knows there's a font menu and there's stuff in there.
38:45 But not everyone realizes that that comes from people who make those things, right?
38:48 Yeah, and I didn't really appreciate the depth of thought that goes into these things.
38:55 And so now when I'm looking at something and I really think about the fonts and how much must be behind it and I'm just enjoying working in it or reading it or whatever.
39:04 So if people are out there listening, definitely check out Helvetica.
39:07 It's an awesome movie.
39:08 Yeah, it's really good.
39:08 I think it might be on Netflix, but it's definitely online.
39:11 You can stream it from somewhere.
39:12 Absolutely.
39:13 All right.
39:13 We're sort of coming up to the end of the show.
39:15 There's a couple of questions I ask everybody on the way out the door.
39:20 So let me ask you, if you're going to sit down and write some Python code, what editor do you open up?
39:25 Well, I'm on a Mac and actually I'm a little out of date.
39:30 I'm still using TextMate, which is an awesome text editor, I think.
39:34 But most of my colleagues have switched to Sublime, which is apparently awesome.
39:38 But within my frame of reference, VI and Vim and Emacs don't really exist.
39:44 Yeah, those are definitely popular programmer choices for the main devs.
39:49 TextMate, that's cool.
39:50 Are you going to ask about tabs versus spaces or is that probably a done deal?
39:54 Yeah, it's a done deal.
39:55 Oh, no, I won't ask about tabs and spaces.
39:57 My other question, though, I will ask you is, if you go out to the Python package index, there are thousands, 60, 70,000, whatever.
40:06 I haven't looked at the top numbers right now, but many, many packages that are amazing.
40:10 Are there any that you can think of?
40:12 You're like, I just found this and I really love it and I should tell the world about it.
40:16 Well, you know, I'm not a heavy user of external packages.
40:20 But, I mean, I've been a longtime user of NumPy, which I have probably used like half a percent of its functionality.
40:26 I don't have a background in math.
40:29 But like many of the features, the vector multidimensional array stuff is just super awesome.
40:34 But I've recently, only for the first time I've heard of it for a long time, I've actually used some code from the SciPy module or package.
40:43 Because it has some really neat, like triangulation algorithms and the Voronoi tiling algorithms.
40:50 It's just in there that I actually use to create some funny graphic animations.
40:54 Oh, yeah.
40:54 How nice.
40:55 I know it's a huge package.
40:57 And again, from that, I probably use like, well, even less than what I use from NumPy.
41:03 But I've been recently having a lot of fun with this tiny part of the SciPy package.
41:08 Yeah, that's really cool.
41:09 I suspect that most people that use those packages don't use all of it.
41:12 Or I can imagine, even as a scientist, you probably have your slice that really applies to your problem, right?
41:18 Probably, yeah.
41:19 And then there's this whole plotting stuff that's in there that I'm not even sure if that works well within the environments that I use.
41:26 I use a lot of Mac-specific UI stuff.
41:30 So, like, TK Inter, for instance, somehow not an option in my – I mean, technically it works on Mac.
41:36 It's not a lovely UI experience, no.
41:39 No, yeah.
41:40 Somehow, you know, within my field still, I have mixed feelings about that.
41:44 I don't want to be seen as an Apple fanboy at all.
41:48 But within my field, the Macs are so dominantly around.
41:52 So, your tools have to support it, right?
41:54 For the tools that we write, to not have Windows or Linux support is totally fine.
41:59 Yeah, so I'm recording on a Mac as well.
42:01 So, they're nice pieces of software.
42:04 They definitely are.
42:05 But actually, the Fontools library that I've been working on, that is completely welcome.
42:09 It's mostly cross-platform.
42:11 I mean, it's – so I'm very open to – I've been a Linux user to some extent.
42:18 I'm very in favor of cross-platform code as much as possible.
42:21 But for user interface, for GUI stuff, it's just difficult to get the right look and feel.
42:26 Yeah, that's actually a big challenge.
42:28 And people that listen to the show, they've written me recently and said, can we have, like, a conversation on how to do this well?
42:34 Because it really is hard to do it, both cross-platform and nicely, I think.
42:38 Exactly.
42:39 I have no answer to that.
42:40 I've seen nice results from Qt.
42:42 I hear things about GTK, but I know nothing about it.
42:46 So, anyway.
42:47 Yeah, it sounds like Qt is a good bet from what I hear as well.
42:51 This has been fantastic.
42:53 I now know a lot more about how Python and fonts go together, and it's fascinating.
42:58 Thank you.
42:58 Thank you very much.
42:59 Pleasure to talk to you.
43:00 Yeah, you as well.
43:01 See you later.
43:01 Bye.
43:03 This has been another episode of Talk Python to Me.
43:05 Today's guest has been Jus Tfendrassen, and this episode has been sponsored by Hired and SnapCI.
43:10 Thank you guys for supporting the show.
43:12 Hired wants to help you find your next big thing.
43:15 Visit Hired.com slash Talk Python to Me to get five or more offers with salary and equity presented right up front,
43:21 and a special listener signing bonus of $2,000.
43:23 SnapCI is modern, continuous integration, and delivery.
43:27 Build, test, and deploy your code directly from GitHub, all in your browser,
43:31 with debugging, Docker, and parallelism included.
43:33 Try them for free at snap.ci slash Talk Python.
43:36 Do check out the video course I'm building.
43:39 The Kickstarter is open until March 18th, and you'll find all the details at talkpython.fm/course.
43:44 You can find the links from today's show at talkpython.fm/episodes slash show slash 47.
43:50 Be sure to subscribe to the show.
43:53 Open your favorite podcatcher and search for Python.
43:55 We should be right at the top.
43:56 You can also find the iTunes and direct RSS feeds in the footer of the website.
44:00 Our theme music is Developers, Developers, Developers by Corey Smith, who goes by Smix.
44:05 And if you like his song, check it out.
44:08 You can hear the whole thing on talkpython.fm.
44:10 This is your host, Michael Kennedy.
44:12 Thank you so much for listening.
44:14 Smix takes us out of here.
44:17 I'm stating with my voice.
44:18 There's no norm that I can fill it in.
44:20 Haven't been sleeping.
44:21 I've been using lots of rest.
44:23 I'll pass the mic back to who rocked his best.
44:26 I'll pass the mic back to who rocked his best.
44:38 Thank you.