fontdiff icon indicating copy to clipboard operation
fontdiff copied to clipboard

Customisable highlighting — request

Open alexeiva opened this issue 9 years ago • 3 comments

Is there a way to customize highlighting?

I would like to see the old font in gray, and the new font in black

screen shot 2016-10-19 at 20 05 46

alexeiva avatar Oct 20 '16 03:10 alexeiva

Cool idea. Send a pull request?

brawer avatar Oct 20 '16 03:10 brawer

Yes. Could you point me to the the piece of code responsible for that?

This would be very helpful in our GF Excellence workflow. Here are sample images describing this use case by @ThomasJockin

mavenimprovement_08_10_2016 mavenimprovement_08_15_2016 screen shot 2016-10-19 at 20 17 38

alexeiva avatar Oct 20 '16 03:10 alexeiva

Here’s the current code for rendering a line if it has any deltas: https://github.com/googlei18n/fontdiff/blob/master/src/fontdiff/paragraph.cc#L160

Feel free to add a mode where it emits output like you described. To get the desired visual effect, you can probably use translucent colors by calling cairo-set-source-rgba. Good luck, and thanks in advance for doing it — it sounds quite useful indeed!

brawer avatar Oct 20 '16 06:10 brawer