SoatDev IT Consulting
SoatDev IT Consulting
  • About us
  • Expertise
  • Services
  • How it works
  • Contact Us
  • News
  • September 9, 2024
  • Rss Fetcher

Recently Heikki Lotvonen cooked up a very cool idea: what if the colorization of code output on the web could be handled by the font itself. Syntax highlighting, as it were. So rather than accomplish this with a heaping pile of <span>s with classes to colorize the text, the font file knows how to apply color directly.

This is actually possible (see a demo for yourself) because of OpenType fonts and the “color fonts” and “contextual alternates” feature.

I give this idea a 10/10. It’s amazing. It’s faster (particularly over client side syntax highlighting tools) with less DOM weight and is easier to use. It’s such a good idea I am really going to need font foundries to take hold of this and deliver us really nice fonts that do this job well. Mmmkay get on it now.

Fonts can do all sorts interesting things, many of which might be surprising. I enjoyed this little nugget from Roel Nieskens explaining how font-variant-numeric: tabular-nums is nice. Looks like Roel turned that into a whole talk showing off quite a few more Problems solved by OpenType. Here’s a whole big ol’ long list of features and example of what OpenType can do. Not all fonts support all these things of course, and if you’re unsure, the absolutely best way to know is to just straight up drop the font file on here and see.

It should be noted that with color fonts (part of what that whole syntax highlighting font trick was all about) doesn’t just mean that a glyph can be colorized with one color (like we typically think of with fonts) but can be totally wild.

Check out colorfonts.wtf for a bunch of information and examples, and How to use a color font for usage.

OK I guess while I have us on all this fancy typography stuff, lemme burn a few typography links I’ve got saved up:

  • The Basics of Legibility by Niko Kitsakis — “A Short Guide for Non-Typographers”
  • llama.ttf by Søren Fuglede Jørgensen — “a font file which is also a large language model and an inference engine for that model.”
  • Departure Mono by Helena Zhang — “A monospaced pixel font”
  • A font that is only 1px wide?!?!?
Previous Post
Next Post

Recent Posts

  • Naukri exposed recruiter email addresses, researcher says
  • Khosla Ventures among VCs experimenting with AI-infused roll-ups of mature companies
  • Presidential seals, ‘light vetting,’ $100,000 gem-encrusted watches, and a Marriott afterparty
  • Zoox issues second robotaxi software recall in a month following collision 
  • Landa promised real estate investing for $5. Now it’s gone dark.

Categories

  • Industry News
  • Programming
  • RSS Fetched Articles
  • Uncategorized

Archives

  • May 2025
  • April 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023

Tap into the power of Microservices, MVC Architecture, Cloud, Containers, UML, and Scrum methodologies to bolster your project planning, execution, and application development processes.

Solutions

  • IT Consultation
  • Agile Transformation
  • Software Development
  • DevOps & CI/CD

Regions Covered

  • Montreal
  • New York
  • Paris
  • Mauritius
  • Abidjan
  • Dakar

Subscribe to Newsletter

Join our monthly newsletter subscribers to get the latest news and insights.

© Copyright 2023. All Rights Reserved by Soatdev IT Consulting Inc.