freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] SVG Rendering Library


From: Moazin Khatri
Subject: Re: [ft-devel] SVG Rendering Library
Date: Sun, 16 Jun 2019 00:12:37 +0500

[...] , it sounds as if the fonts should be designed as the metric values from TrueType or CFF glyphs could be used as if they are same for SVG glyphs.

THIS! 
If that's the case, it is going to solve the whole problem I think. :) I have a few OT-SVG fonts, I shall check this tomorrow. 

B: Calculate the boundingbox without real drawing and without the considerations on clipping and transparent pixels in raster images. Leave it to... (ditto)
Hearing Alexei's comment, and looking at the behaviour of cairo_recording_surface_ink_extents(), some people may think "calculated boundingbox is sufficiently useful even if does not reflect the clipping or transparent pixels in raster images, maybe the majority of SVG-OT would not use such complicated SVG".
 
C: Measure an "approximate" boundingbox by small-scaled rasterization.
If it is too slow to scan 1000 x 1000 pixels to measure the precise boundingbox of the inked ARGB pixels, it would be acceptable for 128 x 128 or 64 x 64 bi-level pixels? 
 
Yes. I personally don't see any downside to B. Most libraries are providing a function to get this. We can perform a check to see if it's tight or not, which will take 2 * (H + W) pixel checks at max. Don't know whether this will be considered `slow' or not. If not tight, maybe we can use C to get an approximate one. 
 
Sorry Moazin, I understand yet I've not responded the question raised by you, I need more time to consider them...

It's totally fine. You've already helped me a lot and I am very thankful for that! :) 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]