GNOME Bugzilla – Bug 709692
Nicer rounded box characters
Last modified: 2014-04-06 18:22:51 UTC
Created attachment 256776 [details] Screenshot Rounded box characters (U+256d, 6e, 6f, 70) don't look too nice, and are quite pointy, not really different from their non-rounded counterparts. The currently drawn Bézier curve is not as curvy as a quarter circle. I've replaced them by a 90° circle arc, plus straight segments. I believe they look better. See screenshot and patch.
Created attachment 256777 [details] [review] Fix
http://cairographics.org/manual/cairo-Paths.html#cairo-arc suggests that I might have forgot to call cairo_new_sub_path(), since I don't want the current point to be connected to the arc. But the code seems to work correctly, so probably it's guaranteed that we don't have a current point here. I'm not sure. (I never did any cairo programming until like 2 days ago... :))
I had to adjust the patch a bit to fix the drawing for the adjust=0.5 case, and I chose a simpler radius formula. Fixed on vte-0-36. Thanks for the patch!
Took me a while to figure out what you're doing. Your "radius" corresponds to my "radius + adjust". I can't see why this was necessary, but I dont mind. Just out of curiosity: what was wrong with my formulas? :) As for the radius, I chose the biggest value that fits in the cell, beucase I think it should look better. Unfortunately cairo had some noticable artifacts, mostly at the left end of the upper right (256E) corner: the arc overflowing to the previous cell. A smaller curve and a short straight line indeed makes it vanish.
Oh I guess I figured it out. You force the center of the circle to integer, this is the key to AA not kicking in at the end of the arc. Nice :)
Geez, the center was integer in my patch too. I already forgot what I did :)