OOLOI.ORG
Menu

OOLOI

OVERVIEW

FAQ

DOCUMENTATION

NEWSLETTER

Cutting Corners Is Not Enough

30/10/2026

1 Comment

 
Picture
For almost two weeks now, the number of blog posts has reached an all-time high. The discussions here have all been about music. The turn came almost the moment horizontal spacing and casting off were settled, which is roughly what I predicted in The Machinery of Taste: once the work reached the page, the conversation would follow it into a musician's habitat.
​
My mind has followed it there too – hence all the posts – even though I really should be finishing the file picker's last bells and whistles. It keeps returning to a single ledger line, running between the crossbars of a sharp.

Between the Crossbars

In Dials, stave 4 keeps every sharp tight to its notehead and shortens the ledger lines around it. Under that post, Magnus Johansson asked whether stave 1 could have stave 4's accidental position without shortening C♯6's ledger lines. I said yes: the accidental would then stand on top of the line.

But would it? A sharp's bounding box, the rectangle around its ink, is mostly white space, so a ledger line that reaches into the box isn't necessarily under anything. The upper of C6's two ledger lines is the sharpest case. It runs between the sharp's crossbars, where the only ink is the two stems. Whether a full-length line there lies under the sharp, or merely passes through its white space, depends on exactly where the ink is. The ledger line is in the accidentals territory, but there's no actual overlap of ink.

The animation in Dials couldn't say. It worked from Bravura's bounding box for the sharp, refined by SMuFL's cut-outs: rectangles in a font's metadata that mark a corner of the box as empty. The panel beside stave 4 shows the lower ledger line reaching into one of them. But the space between the crossbars isn't a corner. No corner cut-out describes it, and no corner cut-out could, so the question behind Magnus's request can't be answered from the metadata at all. For engraving at this level, corner cut-outs are far too coarse.

​Cutting corners, in other words, isn't enough.

What the Font Knows

A font can describe a glyph's shape three ways. The bounding box is the coarsest. The cut-outs refine it, where the designer has supplied them. The outline is the ink itself, and every font has one for every glyph.

From the outline, Ooloi keeps each glyph's profiles: how far the ink reaches sideways at every height, and up and down along its width.
​
It isn't only the sharp. Rectangles fare worst against curves, and a flat's bowl is nothing but curve.
Picture
Text fonts, for lyrics and expressions, have no SMuFL metadata at all, but they do have outlines. So when Ooloi reaches the lyric hyphens Malte asked about on NOTATIO, the syllables will be spaced by their real shapes.

Read, Never Rendered

The obvious way to find the ink would be to draw the glyph and look. I considered it and rejected it: a bitmap depends on the software that draws it, so upgrading a graphics library could move a note. A page has to depend on the piece, not on the machine.

Outlines need no drawing. They're already exact numbers, and Ooloi reads them as the font stores them.
​
For the curious: each curve is halved until the polygon around every piece hugs it closely, and the profile is taken from the polygons, which always lie outside the curve. So a profile never cuts into the ink.
Picture
This happens once, when a font is registered. The profiles are stored with it, and layout only ever reads them.
​
(None of the pictures here was drawn by hand, by the way. They were computed from Bravura's actual outlines.)

Down the Mountain

This matters more than any single sharp. In High Hrothgar I described two kinds of notation program: on the mountain, the ones handed a whole piece, which take their time and produce the best pages; in the valley, the ones that answer as you work. Hegazy and Gourlay's casting off was the first piece of the mountain's knowledge to come down. This is the second.

Spacing against the ink has been the mountain's way. LilyPond, which shares Ooloi's lineage from Hegazy and Gourlay, builds the same kind of profiles from glyph outlines (the usual word is skylines), which a program that compiles the whole piece at once can afford. A year ago, in The Lineage: When Ledger Lines Shorten, I wrote that a ledger line shortened beside an accidental, in LilyPond's essay on engraving, sent a tingle down my spine. Fitting, then, that a ledger line beside an accidental should lead back into the same family.
​
What Ooloi adds is the way down. Read once and kept as data, the profiles give a program that answers as you work the mountain's geometry at no cost per keystroke. The springs, the ink itself and an answer while you type: as far as I know, no interactive program has had all three. That's why a ledger line between a sharp's crossbars is worth a post.

Tucking

Engravers have always let accidentals slip under things. When a note is followed by a lower one, its accidental can slide in under the first notehead; in a chord, stacked accidentals interlock. That's tucking (though not in the RuPaul sense), and profiles do it without being told: glyphs come as close as their ink allows, and no rule has to mention a flat or a sharp.
​
Here is F5 followed by C♯5, three ways. With the outlines, the sharp's whole upper half slips in beneath the F.
Picture
​(A caveat about these pictures: they show how close the shapes can come with nothing added for clearance, so with outlines the sharp actually touches the F. Real spacing keeps a gap. What matters is the order: boxes allow the least, cut-outs a little more, outlines the most.)

Some engravers call all of this kerning, whatever slides into whatever. It's a good analogy: in metal type, a kern was the part of a letter that hung over onto the next. But letters share a baseline and notes don't, so it isn't quite accurate.
​
Which brings me back to the line between the crossbars. Here is C6 followed by C♯6's sharp, as close as the outlines allow; the dashed sharp is where the boxes would put it.
Picture
In this gap the cut-outs don't help at all; only the outline lets the two come closer. And it answers the question behind Magnus's request: up to the sharp's left stem, the line runs through white space. Only beyond it is it under the ink.

Too Much of a Good Thing

​Look how far those ledger lines go, though: right up to the stem, further than an engraver would let them.

Going back to boxes would be the wrong cure: they'd hold the lines back for the wrong reasons, and in the wrong places too. ADR-0055 has a dial instead, the opening width. Openings narrower than it are filled in before spacing, and only the wider ones are left for tucking.
​
Here is that gap again, with the opening open, partly filled and filled. Because a sharp's crossbars slope, the dial works gradually rather than like a switch.
Picture

The Other Direction

​So far, everything has been horizontal. Read from above, the same profiles tell a slur how close it may come, and two staves how close they may stand. Measured from the outlines, the slur (solid) sits noticeably lower than when measured from boxes (dashed).
Picture
Good engravers overlap things on purpose, and to do that you need to know exactly where the ink is. The same knowledge decides other things too: in this bar, whether the accent might go outside the slur instead, house style permitting.
​
So, back to where this started. A sharp can stand over a full-length ledger line, and Ooloi knows whether that line is under its ink or only in its white space.

The mechanism is in ADR-0056, Glyph Geometry from Outlines. Seven other ADRs have been brought into line with it, ADR-0055 and its dials among them.
​
And now, back to finally getting that file picker out of the way, even though this is so much more interesting. After all, it's the very thing I've been building the architecture for.

It's a lovely feeling.
1 Comment
Magnus Johansson
30/10/2026 17:59:28

Thank you for explaining bounding boxes, cut-outs and outline profiles.

Reply



Leave a Reply.

    Author

    Peter Bengtson –
    Cloud architect, Clojure advocate, concert organist, opera composer. Craft over commodity. Still windsurfing through parentheses.

    Search

    Archives

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

    Categories

    All
    Accidentals
    Alfred Korzybski
    Architecture
    Backend
    Beaming
    Benchmarks
    Casting Off
    Clefs
    Clojure
    CLOS
    Common Lisp
    DDD
    Death Of Igor Engraver
    Documentation
    Donald E Knuth
    Dorico
    Dynamic Programming
    Finale
    Fonts
    FrankenScore
    Franz Kafka
    Frontend
    Functional Programming
    Generative AI
    GRPC
    Hegazy Gourlay
    Hegazy-Gourlay
    Igor Engraver
    Ingmar Bergman
    Instruments
    Jacques Derrida
    JVM
    Knuth Plass
    Knuth-Plass
    License
    LilyPond
    Lisp
    Localisation
    MIDI
    MPL 2.0
    MuseScore
    MusicXML
    Ooloi
    Ortography
    Pitches
    Platforms
    Playback
    Plugins
    Python
    QuickDraw GX
    Rendering
    Rhythm
    Rich Hickey
    Road Map
    Scheme
    Semiotics
    Sibelius
    Silicon Valley
    Site
    Skia
    Sponsorship
    Testing
    Transposition
    UI
    Umberto Eco
    Vertigo
    VST/AU
    Wednesday Addams

    RSS Feed

Home
​Overview
Documentation
About
Contact
Newsletter
Ooloi is an open-source desktop music notation system for musicians who need stable, precise engraving and the freedom to notate complex music without workarounds. Scores and parts are handled consistently, remain responsive at scale, and support collaborative work without semantic compromise. They are not tied to proprietary formats or licensing.
​
Ooloi is currently under development. No release date has been announced.


  • Home
  • Overview
    • Background and History
    • Project Goals
    • Introduction for Musicians
    • Introduction for Programmers
    • Technical Comparison
  • FAQ
  • Documentation
  • About
  • Contact
  • Workbench
  • Home
  • Overview
    • Background and History
    • Project Goals
    • Introduction for Musicians
    • Introduction for Programmers
    • Technical Comparison
  • FAQ
  • Documentation
  • About
  • Contact
  • Workbench