After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 709692 - Nicer rounded box characters
Nicer rounded box characters
Status: RESOLVED FIXED
Product: vte
Classification: Core
Component: general
0.34.x
Other Linux
: Normal enhancement
: ---
Assigned To: VTE Maintainers
VTE Maintainers
[fixed-0-36][needed-next][commit:df01...
Depends on:
Blocks:
 
 
Reported: 2013-10-08 23:53 UTC by Egmont Koblinger
Modified: 2014-04-06 18:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot (117.01 KB, image/png)
2013-10-08 23:53 UTC, Egmont Koblinger
  Details
Fix (2.24 KB, patch)
2013-10-08 23:53 UTC, Egmont Koblinger
committed Details | Review

Description Egmont Koblinger 2013-10-08 23:53:11 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.
Comment 1 Egmont Koblinger 2013-10-08 23:53:55 UTC
Created attachment 256777 [details] [review]
Fix
Comment 2 Egmont Koblinger 2013-10-09 00:04:58 UTC
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... :))
Comment 3 Christian Persch 2013-10-17 19:59:00 UTC
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!
Comment 4 Egmont Koblinger 2013-10-17 20:33:18 UTC
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.
Comment 5 Egmont Koblinger 2013-10-17 20:48:40 UTC
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 :)
Comment 6 Egmont Koblinger 2013-10-17 21:32:47 UTC
Geez, the center was integer in my patch too. I already forgot what I did :)