News for hackers. Stuff that matters.
Re:Zilla Slab: A common language through a shared font by igravious on Friday August 04, 2017 @02:54PM (#14931011)
How on earth does this work?!
Re:Zilla Slab: A common language through a shared font by rhencke on Friday August 04, 2017 @03:52PM (#14931576)
Font ligatures!

Certain special combinations of characters can be treated by a font as having a special rendering known as a ligature. In CSS3, rendering of these is controlled through the 'font-variant-ligatures' property: https://developer.mozilla.org/en-US/docs/Web/CSS/font-varian...

For a small example of text with and without ligatures for the common 'fi' and 'fl' combinations:

https://codepen.io/anon/pen/MvbPdo?editors=1000#0

Re:Zilla Slab: A common language through a shared font by igravious on Friday August 04, 2017 @05:14PM (#14932336)
Super duper. I thought that it only worked for two-letter combos. Very cool Mozilla, or should I say Moz://a !
Re:Zilla Slab: A common language through a shared font by k__ on Saturday August 05, 2017 @04:12AM (#14934716)
Yes, pretty smart trick, now they get their logo integrated easily in many apps.

I use Fira Code for coding, ligatures are really nice.

Re:Zilla Slab: A common language through a shared font by Splines on Friday August 04, 2017 @03:46PM (#14931510)
I am a complete font newbie, but looking at the standard (https://www.iso.org/standard/66391.html), it seems like there exists a feature called "contextual glyphs", which means you can supply alternative glyphs (like ligatures) given a particular sequence of glyphs.

I imagine you could crack open the font file itself and find out how this works - I'm not familiar with any of the tools to do this though.

Here's (I think) more detail: https://fontforge.github.io/editexample6-5.html

Re:Zilla Slab: A common language through a shared font by Freak_NL on Friday August 04, 2017 @05:02PM (#14932238)
Just open any TTF or OTF up in FontForge (free software) and have a look!

Look under Element ยป Font Info, and then Lookups. All tables under GSUB deal with glyph substitution. The liga table is the simplest, and it can be used to replace a ligature like 'fl' with a glyph that combines the two letter forms.

Re:Zilla Slab: A common language through a shared font by igravious on Friday August 04, 2017 @05:15PM (#14932339)
I can imagine many an hour lost down that rabbit hole :)
Re:Zilla Slab: A common language through a shared font by JoshTriplett on Friday August 04, 2017 @05:57PM (#14932683)
See https://pixelambacht.nl/2015/sans-bullshit-sans/ for more information on creating a font with ligatures.