JAKE: OK, Paul, I want to talk to you about font rendering.
PAUL: [SINGING] Ah!
[MUSIC PLAYING]
JAKE: So you visit a site.
Everything downloads-- the HTML, the CSS, the JavaScript,
but not the font for the content.
What happens?
PAUL: You'd stare at a white screen normally.
JAKE: Well, it depends on the browser, you see.
So in Safari, for instance, it will give you all the layout,
everything, but it will block rendering of that text.
PAUL: I thought it did that in Chrome as well.
JAKE: Chrome does something similar.
We used to do exactly that.
But we took a cue from Firefox, and we
decided we'll have a 3-second timeout.
And then we'll render the fallback font,
and when the new font comes in, we'll swap it to the new one.
PAUL: I definitely have two problems then.
One--
JAKE: You have way more than two problems,
but I guess you're talking about two specific problems.
PAUL: To this, yeah.
I mean, that's all the therapy time we have for today.
Hahaha, folks.
Firstly, 3 seconds feels really arbitrary to me.
I'm not sure where that comes from.
JAKE: I trust they did research.
PAUL: And then the other thing about it
is switching fonts really bothers me.
Like if you're halfway through reading a sentence and then
the font changes, it's got a completely different metrics,
then [POOF] what's that?
JAKE: Yeah, that's horrible.
Words can swap from one line to another.
It's--
PAUL: Ew!
JAKE: It's bad.
So I think this is part of the promise
is that there is no one true answer.
Like even what we do, you know, what Firefox
is, what Opera does, it feels like a compromise, which
is sometimes the worst of all worlds, right?
We've got the delay.
We also have to swap sometimes.
PAUL: Yeah.
OK, fair enough.
JAKE: Thankfully, and the new CSS property is arriving.
Well, I say it's arriving.
It is being proposed.
PAUL: OK.
JAKE: So it's a bit early to say it's arriving.
PAUL: Yeah.
Wee!
JAKE: It's a proposal by Kenji Baheux and Ilya Grigorik
It's on GitHub at the moment.
PAUL: Oh, those two.
JAKE: The worlds of performance and funk combined.
PAUL: [SINGING] Ah!
JAKE: But it's a CSS property font rendering,
and you get to pick what strategy to use.
Like how long do you want to block for?
Do you want to swap?
Do you want to use a fallback and then swap the new font in?
It also gives you the option if you use another technique.
And this is one that we've seen pioneered
by-- I think it was "The Guardian" that did it first.
They use the font if they have it, like if it's in the cache.
If it's there, they'll use it.
If it's not, they just go for a fallback.
They download the font, but they don't swap.
They download it.
They put it in local storage for next time.
PAUL: OK.
JAKE: But this is a great example, I think,
of the extensible web that we've seen people do this.
You've always seen "The Guardian" do it,
"Smashing" Magazine do it now as well.
And other people have-- you know we've picked up on it
and think, well, let's remove the bad bits.
Let's avoid the amount of code we need to write.
Let's avoid the local storage bit.
Let's have a CSS property for it.
PAUL: Love it.
[MUSIC PLAYING]
JAKE: I've been at a few conferences recently.
PAUL: Yep.
JAKE: And you know how the conference after-party
is a great place for developers to come together and chat
about things.
So we'll put the music really loud
to really get the conversation flowing.
PAUL: Exactly.
So nothing says quality conversation
like shouting at another human being from a couple of feet
away.
JAKE: Right.
So I was chatting with this guy, and he
was giving me his opinion on a thing.
And as he was shouting, a bit of spit came out of his mouth.
PAUL: Oh.
Where did it land?
JAKE: In my ear.
It was a shot that Luke Skywalker
would've been proud of.
Like it just when [WHOOSH] right in the hole.
PAUL: Use the force, Luke. [WHOOSH] [SPLAT] Ah!
JAKE: Yeah.
And you know that if like you get water in your ear
then sounds sort of [IMITATING SOUND UNDERWATER].
[LAUGHS]
There was so much spit in my ear that that happened.
PAUL: Go on.
What was your exit strategy for this, then?
JAKE: Well, no, It was really just
to kind of politely sort of go, no, yeah.
Yeah, no, that makes sense.
You should do some proposing.
You should definitely write that up.
I'm just going to the toilet now.
I'll be back in a minute.
And then a calm, collected walk.
PAUL: Don't run.
Don't run.
JAKE: Don't run.
And then as soon as the door opened, run to the sink
and like [AH] I've got to get this out of my head!
PAUL: Hodge podge.
JAKE: It's a dangerous world, conferences.
[MUSIC PLAYING]
JAKE: Yes.