Re: Some questions about OT-SVG glyph metrics and bounding boxes

 On Wednesday, 31 July 2019, 11:31:43 BST, Moazin Khatri <moazinkhatri@gmail.com> wrote:

> Now I'll describe issues with these:
> 1. Rendering a glyph (tightly or not): SVG glyphs are not necessarily in (+x & +y) quadrant of the SVG coordinate system. In fact, most of the time they aren't. If you directly send the SVG document to a rendering library like `librsvg' it will only render whatever is in the (+x & +y) quadrant.

I think this is a bug - or lack-of-feature, of the library concerned, or how you are using it. It is quite legal to draw on the whole range of the co-ordinate system. Have you look at perhaps, how inkscape, or other svg editor, determine the extent of an svg file?

> 2.
> `bitmap_left' and `bitmap_top': I get these from the bounding box in SVG coordinates. There is some scaling to be done of course, but the necessary information is there. These values directly correspond to the bearings (AFAIK) and that's the reason why I was asking about them.

These rather came from the rendering.

I think you are perhaps confusing two issues -

1. how to determine the extent of a svg drawing, *without* and *before* actually drawing it. (that's quite difficult if not impossible ; there are hints from heights/widths/viewBox but they are not always present, nor always correct).

2. the library you are using is not telling you the extent of an svg drawing, *after* it has done the rendering ; or perhaps you have not figured out how to get at that information.  

Received on Wednesday, 31 July 2019 13:37:32 UTC