Updates from Julien Toggle Comment Threads | Keyboard Shortcuts

  • Creative approaches to font display on the web 

    Nowadays, fonts seem to have conquered the web. The @font-face CSS property is everywhere and the use of it has even reached far beyond the display of characters1. But there was a time, not so long ago, when web designers had to struggle with complex processes to be able to display the title of a blog article in the typography of their choice.

    At its core, the web has always been text. But the glyphs to display it had to be local. So when designers embraced the medium, the only choices they had was what most people had on their machines (Arial, Courier New, Times New Roman, Webdings,…2). The obvious solution was to replace text by images, either precooked by the designer (him|her)self, or baked on the fly and cached by the server. This technique, although widely used, was not that elegant. It was heavy on the server and on the bandwidth, plus those little rendered texts where not selectable or scalable.

    To circumvent these flaws, some came with another approach called sFIR3, which included in the web page a small Flash™ file embarking the desired font. Selected pieces of text would then dynamically be replaced by Flash rendered text, all done in the browser. Text would still be scalable and selectable. But it required a proprietary plugin to be displayed correctly and don’t even dream about printing it.

    So when I came to design my web portfolio, none of these solutions really appealed to me. I wanted to stick with text based open standards and no “image trick”. The <canvas> tag was then only supported by half of the browser market. And I was starting to get interested in “everything parametric”. The font4 I was working on used a single closed polygon for each of its glyphs. Each letter was just a set of coordinate relations that would allow me to change the weight and proportions of it at will. To display it in the browser, I found some obscure Javascript library created by Walter Zorn5 that exposed a set of vector drawing functions. The way the library worked was to create a colored <div> for each pixel of the drawing using some fast algorithm to prevent too much repetition and combine as many pixels possible into one <div>. It worked remarkably well across browsers and still works in recent ones because it just uses a basic brick from HTML. The “pixelated” look of it was also very pleasing to me.

    xuv-test

    After this little personal project, I kept my eyes open for unusual font drawing experiments in the browser, especially the ones involving code. I was impressed by Dave Desandro’s Curtis CSS typeface6 which is a pure HTML/CSS font using a combination of background color, border width, border radius and a lot of <span> tags to draw a set of very pleasing fat characters. This is especially remarkable because it doesn’t rely on Javascript and so makes it a very good candidate for the “displays-everywhere” award.

    curtis-css

    Another experiment to notice is Claudio Cañete’s 1k Notebook6 project to implement a full parametric font in <canvas>… in just under 1 kB. He first used a 3×7 grid of nodes to draw a custom line based font. But since this wasn’t really using much space of the 1024 bytes available, he pushed further by porting a script typeface from the Hershey font collection8 and tweaked it to draw the glyphs in a continuous single trace. The encoding and decoding of the font is where Claudio’s work happen, to stay under that limit he set himself. And this is where lies beauty.

    1k-notebook

    With the latest HMTL specifications, pretty much any typeface can be displayed in a web page, and, don’t get me wrong, this is such a relief. But creativity gets its strength from the constraints it faces. So there is still room for inventiveness with font rendering in the browser. Just set yourself the limits of your canvas.

    Footnotes:
    1. FF-Chartwell
    2. Microsoft core fonts
    3. Scalable Inman Flash Replacement
    4. xuvfont
    5. Vector Graphics library by Walter Zorn
    6. Curtis CSS typeface
    7. 1k Notebook
    8. Hershey fonts
     
    • Still need to find a way to make some 300dpi or vector images for all these font projects. Any idea?

    • After a (private) discussion on twitter with Claudio about his work (1k Notebook), he has informed me that he releases it under the CC-by license: http://creativecommons.org/licenses/by/4.0/

    • If that can be of any help, I’ve ported the Curtis CSS typeface to LESS. So it’s now easier to change the size and color. Here is where you can play around with it: http://xuv.github.io/curtis-less-typeface/ Although, some glyphs don’t render well when you try to print them. (Print works with the letters “c,d,h,j,lo,q,u,v” only for now)

    • Cool, thanks Julien for the article. Great to know that it lead to the liberation of the 1k Notebook code ! :)

    • :) Well. It had to be published under some libre license, no? Because, if not, we could not use any graphics from that project. Anyway, Claudio is willing to adapt his project so it outputs higher resolution graphics. Do I ask him to do this? Or do we keep it like that?

  • Computational fonts for the web 

    Hello ginger, Ana, Ricardo and Manuel.

    Here is a subject, in form of a story, which could be turned into a proposition of some kind.

    I started to get interested in fonts for the web, before the @font-face specification. As you remember, we didn’t have much choice. Either, we had to guess the fonts the user would have (which would be 90% windows defaults). Or use php-gd on-the-fly srever-side baked images or some flash app as a way to display more fancy fonts for blog titles mainly.

    Anyway, because I can’t do things like everyone and because I didn’t want to send baked-images nor use flash for my website, I tried rendering fonts, in javascript, in the browser. You must also know that there was no <canvas> tag available at that time either.

    So I used some cryptic js library that would draw in the browser using only absolute divs. I also created my own parametric font, where each gliph would be a single closed shaped polygon. And I used (and still use) it for my logo and the titles of my website http://xuv.be.

    Here’s an example of the font with 3 weights.
    http://xuv.be/static/xuvfont/typo.html

    xuvfont

    I never (took the time to) release(d) that font. But I thought about it and thought about porting it to other languages also (like processing for example).

    Anyway. This got me interested in other projects like this. And I found 2 of some sort.

    One is the Curtis CSS typeface by Dave Desandro
    http://desandro.github.io/curtis-css-typeface/
    (A pure html-css only typeface)

    curtis-css-typeface

    The other is the 1kJS experiment http://www.claudiocc.com/the-1k-notebook-part-i/ (By Claudio CC ?)

    1k-vector-font

    So, my proposition could be to write about these weird web type face experiments and try to find some more relevant work around these ideas. (So the criteria here would be not to use a font file as a source, but just html-css-js).

    Or another proposition could be that I talk about my font project and release the xuv-font in different languages.

    Or also could be just images of these 3 projects in some sort of quick and weird showcase section.

    Tell me what you think about this.
    And if you found this interesting, I can start cooking ;)

     
    • Hi Julien,

      Thanks for those proposals, I like them a lot! Very much in line with what we are planning.

      I think the most awesome would be to write on the background of the xuvfont experiment, and those other “pure web typeface” hacks (didn’t know about those).

      This article could also briefly mention things like sIFR and Cufón – those ugly workarounds that are history now. But I love the idea of focussing on those deliberately experimental font works.

    • Hey Manuel.
      Glad you like it :)
      The sIFR thing is what I was talking about when I mentioned flash based font titles. I just didn’t remember it had an “official” name. Thanks for it. Here’s a link to the reference page: http://www.mikeindustries.com/blog/sifr/ (feels like dead media to me now this technology :) )

      And I had no idea what cufon was. Maybe vaguely in my “I have heard that” memory. But never investigated it. Interesting. Although I haven’t explored yet what it was. Seems recent though. Here’s what seems the reference: http://cufon.shoqolate.com/generate/

      • Actually I didn’t ever check how Cufon worked. It uses canvas and VML – a standard submitted to the W3C in 1998, that “has been largely deprecated in favor of other formats, such as SVG”. Looks like Cufon development started in 2008 and stopped in 2012.

c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel