What's the rectangle surrounding a font glyph, including its sidebearings, called? I Googled the words "bounding box" and got conflicting results, where some sources say it's the rectangle that bound the glyph tightly (without sidebearings), and others say it includes sidebearings.
I'm not sure if "bearing" is the best term, but the "top side bearing" and the "bottom side bearing", in vertical text, work exactly the same as the left side bearing and the right side bearing in horizontal text. For instance, one thing you can do is use something call ツメ (tsume, "fitting" or "packing"), by reducing the spacing between glyphs based on percentages of their side bearings. Whether you use left/right bearings in horizontal text or top/bottom bearings in vertical text, the result is exactly the same.
Notice in this illustration, the vertical text is much more cramped than the horizontal one. This is all because of the character 一 (in red): it has very little space for its horizontal bearings, but lots of space for its vertical bearings. All that space is completely collapsed here with tsume set at 100%, meaning 100% of all bearings is discarded.
It should be used only in this meaning to avoid confusion.
In a key and specific sense, body height works exactly the same way in metal type and digital type, in that it is the height of the body that equals the nominal size of the type. So 10pt metal type has a body that measures 10 points in height, regardless of the size of the character image on that body, and 10pt digital type has a body that has been scaled to 10 points in height, regardless of the size of the glyph relative to that body.
So I still refer to the rectangle defined by left sidebearing and advance width and by em height as the ‘body’.
The constructions of U+30FC in the Mincho style follow ink brush calligraphy in horizontal and vertical text—how one would actually write it. They are not simply 90-degree rotations of each other. This generally yields an overly large rectangle (see the following illustration on the left), which is usually unintended. Bounding box covers the curve, not necessarily the curve’s control points (illustration on the right).
Source: tikz-bbox manual.
"Note that the bounding rectangle from each character is defined as the rectangle with a lower left corner of (xMin, yMin) and an upper right corner of (xMax, yMax). These values are obtained directly from the point coordinate data for the glyph, comparing all on-curve and off-curve points."
That certainly doesn't ensure a box that's tight to the curve, but it's very quick to compute.
Two reasons for this:
1) For consistent positioning of the baseline within a formatted text box, whatever weight or style of a typeface is used.
2) For precise alignment of layers, in layered font effects.
I don’t understand why the baseline isn’t used by layout apps to position type.
I have never seen a layout app that did NOT use the baseline to position type, in any app that allows one to switch fonts or point sizes on the same line.
I am sure you know this, so you must mean… something else. I am curious as to what that something else is, exactly.
On a positive note, certain distributors, notably Adobe and Monotype, have rigorous font-testing apps applied to typeface submissions, which flag inconsistencies in vertical metrics within a font family. This addresses bounding box issues, putting the onus on foundries to “get it right”.
Rarely-used by us English-speakers, maybe. But since you agree that there is no viable alternative, maybe you need to get comfortable with it?
Such tests have been around a long time, and are used by many others as well. But they don’t make fonts perfectly consistent _across_ families, only within families.
I was alluding to characters such as Aringacute.
And Abrevehook, which is comparatively rare in Vietnamese—that is the tallest Latin character I’ve had to deal with, especially in Bold weight.
I agreed with you that options had been tried and discarded, not that there is no other way to do things.
I’m more comfortable with analogue, and software that bears some resemblance to the physical world, you’ll never get me in a VR headset!
InDesign has an option to define the distance from the top of the text frame in terms of leading, which gives a fixed distance to the first baseline regardless of what mix of fonts is used. That is sensible and also means that one can set up an easy text frame baseline grid (unlike the utterly annoying baseline grid that InDesign tries to apply at the document level). Of course, this presumes a line layout model that is able to handle painting glyphs that extend beyond the text frame.
I’ve always called this space the “window” or “glyph window.” It never occurred to me that it would have a different name, though I can’t remember ever discussing it with anyone or hearing it called something else.
They also had combining accents as separate characters for Hebrew and puzzled them together with non printing material. That's documented in the layouts of the wooden matrices e.g. in Gessner, 1744.
TextEdit on Mac allows the definition of line distance and seems to add or subtract space on top of the virtual body. Vertical alinement is along the base line.
Looks like this:
In image processing with rasterised images (pixels) it is simple to get a bounding box. It also can be done from a scanned page of text.