Closed m4rc1e closed 5 years ago
We can also use hb-view for generating screenshots for each diff result. I made a quick sketch last night which produced the following output:
It's around x100 faster than diffbrowsers when producing gifs which don't need require platform rendering.
@davelab6 @madig
@m4rc1e ready to resolve conflicts and merge?
Not yet.
Implementation here is rough. It takes into account a glyph's sidebearings, we don't want this. We simply want to spot glyph outline modifications, not metrics.
@davelab6 Done for now.
It still doesn't take into account if a glyph's sidebearings have been modified. However, I'm finding the current implementation of this pr useful for diffing static vs vfs since their sidebearings should be identical anyway.
This kicks ass. I love it :)
Do you happen to know if it is possible to overlay renders in transparent colors so that you can view as an overlay rather than a/b?
@chrissimpkins thanks!
It doesn't but this should be pretty easy to add. I'll try and add this feat when I tackle #18
excellent! will keep an eye out for it. have wanted a way to view visualize diffs like this for some time...
ping @davelab6
ping @davelab6
🎉
Uses Harfbuzz to render each glyph which are then compared by counting pixel differences.
Implementation is based on https://github.com/googlei18n/nototools/blob/master/nototools/shape_diff.py
Fixes #4
@davelab6 Still wip, keep this open.