Is it possible to extend the lines to the glyph-box-width anyhow? This way, it would be easier to compare two glyphs…
It extends a bit over the bbox of the glyph. If it is limited to the advance width, you will have trouble with zero-width glyphs or very narrow ones. For comparison, it displays the numbers.
I think he meant to do both, use the sum of bounding box and width.
Sum as in NSUnionRect?
Or just something like
NSWidth(layer.bounds) + layer.width.
NSUnionRect would be fine is you were using a rect that included the width of the layer in it, too.
start = MIN(layer.bounds.origin.x, 0) end = MAX(NSMaxX(layer.bounds), layer.width)
I’ll see what I can do.