Tag: HTML

  • Measure per-letter dimension of text in JavaScript

    Measure per-letter dimension of text in JavaScript

    in

    TL;DR: Create a Range, set proper start and end points up to the text node with proper offset, then use Range.getBoundingClientRect() to get the dimensions. As a part of the Lyricova Jukebox, we wanted to support inline karaoke swipe animation. With the time tags in the data, it is easy to figure out the time…

  • The Making of: Lyricova Screensaver v2

    The Making of: Lyricova Screensaver v2

    in

    It has been long since last time I post here. This time I’d like to share about how I made the Lyricova Screensaver v2: refractor from my own legacy code.