Re: [ft-devel] GSoC: OT-SVG update and a performance issue
> > Why is it an issue even with clipping? [...] Not a big issue. Such inaccuracies are rare, but when they do pop-up, the inaccuracy isn't a problem. The same happens with Cbox calculation in traditional glyphs and we are fine with it too. :) The glyph will still land up at the right place. > [...] The clipped bounding box can be > very well estimated as an overlap of (1) clipping path bbox and (2) > drawing path bbox. This should be good enough. > I guess that's an internal detail of bounding box calculation and we are not dealing with that. The library authors or the authors of the graphic backends should deal with this. We just use whatever they provide. ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] GSoC: OT-SVG update and a performance issue
> Technically it isn't rendering it to pixel data. A Cairo recording surface > just records the drawing operations without rendering it to pixels (AFAIK). > Then it uses those recorded operations to find bounds. Why is it an issue even with clipping? The clipped bounding box can be very well estimated as an overlap of (1) clipping path bbox and (2) drawing path bbox. This should be good enough. >> > This hook function (for librsvg) would work in the following manner: >> > * create a cairo recording surface >> > * render the glyph on that surface (you'll have to check whether to render >> > the whole document or a particular element) >> >> This is unacceptable because it defeats the purpose. If the library >> cannot return the bounding box without rendering, just forget it and >> bail from ft_glyphslot_preset_bitmap. You and Behdad did however say >> that say that it is available in some libraries. >> https://lists.nongnu.org/archive/html/freetype-devel/2019-07/msg00128.html >> >> > * get the bounds >> > * perform any transformations on the bounds if necessary and then preset >> > the slot -- Alexei A. Podtelezhnikov, PhD ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] GSoC: OT-SVG update and a performance issue
Technically it isn't rendering it to pixel data. A Cairo recording surface just records the drawing operations without rendering it to pixels (AFAIK). Then it uses those recorded operations to find bounds. On Thu, Aug 8, 2019, 9:54 PM Alexei Podtelezhnikov wrote: > > This hook function (for librsvg) would work in the following manner: > > * create a cairo recording surface > > * render the glyph on that surface (you'll have to check whether to > render the whole document or a particular element) > > This is unacceptable because it defeats the purpose. If the library > cannot return the bounding box without rendering, just forget it and > bail from ft_glyphslot_preset_bitmap. You and Behdad did however say > that say that it is available in some libraries. > https://lists.nongnu.org/archive/html/freetype-devel/2019-07/msg00128.html > > > * get the bounds > > * perform any transformations on the bounds if necessary and then preset > the slot > ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] GSoC: OT-SVG update and a performance issue
> This hook function (for librsvg) would work in the following manner: > * create a cairo recording surface > * render the glyph on that surface (you'll have to check whether to render > the whole document or a particular element) This is unacceptable because it defeats the purpose. If the library cannot return the bounding box without rendering, just forget it and bail from ft_glyphslot_preset_bitmap. You and Behdad did however say that say that it is available in some libraries. https://lists.nongnu.org/archive/html/freetype-devel/2019-07/msg00128.html > * get the bounds > * perform any transformations on the bounds if necessary and then preset the > slot ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel