Crowbar: A text shaping debugger

Simon CozensSimon Cozens Posts: 421
edited June 24 in Font Technology
For anyone who hasn't seen it on Twitter already, I have created a tool called Crowbar which will help you to debug shaping/layout issues. It's web based, but it runs on your own browser so you're not uploading fonts anywhere. Source code is here.


Comments

  • John HudsonJohn Hudson Posts: 1,851
    Not only is this an elegant and interesting tool. It helped me spot a bug in a font this morning.
  • John HudsonJohn Hudson Posts: 1,851
    Since Crowbar doesn't actually involve uploading a font, maybe re-word the drag-and-drop field text to read

    Drag and drop to load a font locally
  • Vasil StanevVasil Stanev Posts: 534
    edited June 25
    I used it, don't quite understand what I'm looking it but it looks cool. :)
    _____
    Adress bar says "Not secure!"
  • This is great Simon, thank you!
  • Simon CozensSimon Cozens Posts: 421
    I used it, don't quite understand what I'm looking it but it looks cool. :)

    What you're seeing is the steps that an OpenType shaping/layout engine goes through as it applies feature rules from a font to an input string and turns it into a set of glyphs to be laid out visually: first, characters are mapped to glyphs, then the shaper applies all the substitution rules from the GSUB table, and then the positioning rules.

    So in the example picture above, lookup 182 is probably something like "feature rlig { sub sp0 @spacer by @spacer; } rlig" and the last thing that happens to the glyph stream is that the sp0 glyph gets substituted out.

    Then the first thing that happens in positioning is that the shaper gets the default horizontal advances for each of the glyphs in the stream (that's the "330", "156", etc.) before applying the first lookup, which is a cursive attachment lookup and starts adding positioning information to the glyph stream. At the bottom, you have the finalized set of glyphs with their glyph IDs and positions ready to be displayed.


    Adress bar says "Not secure!"
    Yeah, it's just on a HTTP server and I should put it on HTTPS as well. As John points out, this is entirely client side and your fonts stay where they are.
  • Simon CozensSimon Cozens Posts: 421
    Since Crowbar doesn't actually involve uploading a font, maybe re-word the drag-and-drop field text to read

    Drag and drop to load a font locally
    Good catch - done that (and fixed The crazy Caps too).
  • Excellent work, Simon.
    I was surprised to see a familiar font (Noto Nastaliq) as the first example, but one needs a tool like Crowbar to work through its details. 
Sign In or Register to comment.