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 573178 - Add Tango style cards to aisleriot
Add Tango style cards to aisleriot
Status: RESOLVED FIXED
Product: aisleriot
Classification: Other
Component: artwork
git master
Other All
: Normal enhancement
: ---
Assigned To: aisleriot-maint
aisleriot-maint
Depends on:
Blocks:
 
 
Reported: 2009-02-25 20:07 UTC by Frederik Elwert
Modified: 2011-12-07 12:34 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
SVG file for a tango-style card set (286.37 KB, image/svg+xml)
2009-02-25 20:10 UTC, Frederik Elwert
Details
SVG file for a tango-style card set (updated) (287.33 KB, image/svg+xml)
2009-02-26 21:16 UTC, Frederik Elwert
Details
SVG file for a tango-style card set (updated, added IDs) (287.34 KB, image/svg+xml)
2009-02-26 22:48 UTC, Frederik Elwert
Details
Cleaned-up version of the SVG file (169.38 KB, image/svg+xml)
2009-05-29 23:06 UTC, Frederik Elwert
Details

Description Frederik Elwert 2009-02-25 20:07:04 UTC
The card games are probably among the most played GNOME games. But they still lack a modern look that matches the rest of the desktop.

I created a card set that tries to follow the Tango style guidelines. Maybe it could be integrated into gnome-games or gnome-games-extra-data or at least serve as a starting point for tangofication of aisleriot.

The card set is entirely my own work and dual-licesed under GPLv2 or later and CC-By-SA.
Comment 1 Frederik Elwert 2009-02-25 20:10:31 UTC
Created attachment 129512 [details]
SVG file for a tango-style card set
Comment 2 Christian Persch 2009-02-25 20:48:22 UTC
Thanks! The cards look nice.

There appear to be a few problems though:
- the Q of clubs, and the 2 and 3 of diamonds don't show up in aisleriot, the corresponding IDs are missing in the SVG
- when they cards stacked you can only see the rank of the card and not its suit (to see this, use e.g. aisleriot freecell game)
- loading seems a bit slower than with our current default theme (Gnomangelo Bitmap)...
Comment 3 Thomas Andersen 2009-02-25 21:00:19 UTC
I actually thought that the current cards were tango(-ish) except for the black? Maybe they are not. I'm colorblind so I wouldn't know. But that was what I was told.

One thing that is closely related and would be very much appreciated is better background graphic. The file is aisleriot/baize.png If you could provide us with a prettier tango background then I will provide you beer if we ever meet :)

Same goes for the card backside. I like the current look but if the color is off then a tangoified version would be appreciated
Comment 4 Frederik Elwert 2009-02-26 21:14:16 UTC
Thanks for your comments!

I'll try to comment on the issues.

> There appear to be a few problems though:
> - the Q of clubs, and the 2 and 3 of diamonds don't show up in aisleriot, the 
> corresponding IDs are missing in the SVG

I cannot confirm that. I tried it in several SVG viewers (Opera, Batik, and - most important in this case - rsvg) and they all displayed the file correctly. The only one with problems was Firefox, and there indeed some card values were randomly missing.

If you actually have that issue within the games, I'll try some further investigation.

> - when they cards stacked you can only see the rank of the card and not its
> suit (to see this, use e.g. aisleriot freecell game)

Right, thanks for pointing out. I'll upload a version that has a small suit symbol in the opposite corner. That corner was a bit empty, anyway.

> - loading seems a bit slower than with our current default theme (Gnomangelo
> Bitmap)...

I agree, loading time is absolutely an issue. The default theme uses bitmaps for the most complex parts, the characters (Gnomangelo, and Bonded does the same). I don't know what actually makes rendering take so long, but rsvg needs more than 3 seconds on my laptop to render the SVG file, which is quite long.

One solution would probably be pre-rendering (at least) the characters and embed them as bitmap. But that might imply some quality trade-off. And I'm not sure that's worth it (I just tried a version with only the characters replaced by bitmaps, it still takes more than 2.5 secs).

Any suggestions as how to speed up the rendering?
Comment 5 Frederik Elwert 2009-02-26 21:16:40 UTC
Created attachment 129604 [details]
SVG file for a tango-style card set (updated)
Comment 6 Christian Persch 2009-02-26 21:59:51 UTC
(In reply to comment #4)
> > There appear to be a few problems though:
> > - the Q of clubs, and the 2 and 3 of diamonds don't show up in aisleriot, the 
> > corresponding IDs are missing in the SVG
> I cannot confirm that. I tried it in several SVG viewers (Opera, Batik, and -
> most important in this case - rsvg) and they all displayed the file correctly.
> The only one with problems was Firefox, and there indeed some card values were
> randomly missing.

The problem is not in the display in a svg viewer; it's simply that the id attributes for these cards are missing in the svg file, so aisleriot cannot load these cards. To see the problem, simply put the svg in the card theme directory (usually /usr/share/gnome-games-common/cards), start aisleriot and choose the svg by name in the View, Card style menu. [More info here: http://live.gnome.org/GnomeGames/CardThemeFormat ]

> I agree, loading time is absolutely an issue. The default theme uses bitmaps
> for the most complex parts, the characters (Gnomangelo, and Bonded does the
> same). I don't know what actually makes rendering take so long, but rsvg needs
> more than 3 seconds on my laptop to render the SVG file, which is quite long.
> 
> One solution would probably be pre-rendering (at least) the characters and
> embed them as bitmap. But that might imply some quality trade-off. And I'm not
> sure that's worth it (I just tried a version with only the characters replaced
> by bitmaps, it still takes more than 2.5 secs).
> 
> Any suggestions as how to speed up the rendering?

It might be the use of the gradients that slows it down; librsvg isn't very fast with gradients. 
Comment 7 Frederik Elwert 2009-02-26 22:47:30 UTC
> The problem is not in the display in a svg viewer; it's simply that the id
> attributes for these cards are missing in the svg file, so aisleriot cannot
> load these cards. To see the problem, simply put the svg in the card theme
> directory (usually /usr/share/gnome-games-common/cards), start aisleriot and
> choose the svg by name in the View, Card style menu.

Oh, of course you're right. I added the missing IDs.

In GNOME 2.22 the cards do load properly even with the missing IDs, so I didn't notice that before. (Of course did I test the theme before ;-) )

> It might be the use of the gradients that slows it down; librsvg isn't very
> fast with gradients.

That sounds plausible. I tried not to use too many gradients, but I think some are required for a Tango-ish look. I'll see if there are gradients that can be replaced by flat colors without loosing too much of the intended style.
Comment 8 Frederik Elwert 2009-02-26 22:48:34 UTC
Created attachment 129616 [details]
SVG file for a tango-style card set (updated, added IDs)
Comment 9 Frederik Elwert 2009-02-27 14:19:07 UTC
I tried replacing all gradients in the suit symbols and values with flat colors (except for the large ones in the center of the Ace cards). I kept the gradients for the characters, since I think that removing them there takes much from their appeal.

Some timing tests showed only little speed improvement, if any. So I don't have the impression that it's easy to get significant speedup this way.

So what would you suggest? Is this a show-stopper or could the theme be included anyway? Does rsvg support some sort of profiling, to get more detailed information what exactly takes the most time?
Comment 10 Andreas Røsdal 2009-02-28 09:20:28 UTC
This card set is OK, and could be accepted into the gnome-games-extra-data package. I don't think it should replace the current default card set in Aisleriot...
Comment 11 Frederik Elwert 2009-03-01 20:01:50 UTC
(In reply to comment #10)
> This card set is OK, and could be accepted into the gnome-games-extra-data
> package. I don't think it should replace the current default card set in
> Aisleriot...

gnome-games-extra-data ist totally ok for me. At least the speed issue prevents it from being a default theme.
Comment 12 Christian Persch 2009-03-01 21:59:42 UTC
Looking at the SVG source of this card theme, I noticed lots of repeated and probably unnecessary style declarations; it's possible that that's slowing it down too?

I agree that this is a nice theme that we should have at least in g-g-extra-data. I'll add it. 

Also, the creators of the card themes are credited in aisleriot's about window (in the "Credits" window, "Artists" tab). Is it ok to add you there? Do you want name-only, or with an email address (in that case, tell me which address to use.)
Comment 13 Frederik Elwert 2009-03-01 22:21:58 UTC
(In reply to comment #12)
> I agree that this is a nice theme that we should have at least in
> g-g-extra-data. I'll add it. 

Thanks!

> Also, the creators of the card themes are credited in aisleriot's about window
> (in the "Credits" window, "Artists" tab). Is it ok to add you there? Do you
> want name-only, or with an email address (in that case, tell me which address
> to use.)

Simply take my name and email from here (Frederik Elwert <frederik.elwert@web.de>).
Comment 14 Christian Persch 2009-03-02 00:19:16 UTC
Actually I forgot one thing: we need a name for the card set, to be shown in the menus :) Any suggestions?

(Oh and I noticed that for the other artists we point to a web site; so if you have a website with your artwork that you want to point to instead of the email, we can do that.)
Comment 15 Frederik Elwert 2009-03-02 17:42:21 UTC
Concerning the name: What about "Tango"? ;-) If someone comes up with something more poetical, I'm ok with that. :-)

Concerning the website: No, I have no web site with my artwork (I'm not even an artist, to be honest). So my email address is totally fine.
Comment 16 Christian Persch 2009-03-02 18:26:18 UTC
Done: added tango.svg to g-g-extra-data and updated credits in aisleriot. 

Thanks!
Comment 17 Frederik Elwert 2009-05-29 23:06:47 UTC
Created attachment 135587 [details]
Cleaned-up version of the SVG file

I just ran scour <http://codedread.com/scour/> over the SVG file to clean it up a bit. Against my hope, rendering speed didn’t improve significantly. But since the file size is now about 60% of the original file, I thought it might be worth uploading the new file. Maybe someone can check it in.
Comment 18 Christian Persch 2009-05-30 11:16:00 UTC
Reopening so the update doesn't get lost.

Have you checked if the rendering is pixel-by-pixel identical to the one from the old set?
Comment 19 Frederik Elwert 2009-05-30 16:20:42 UTC
Ah, thanks for reopening. And yes, the rendering is identical to the old one.
Comment 20 Christian Persch 2009-08-24 16:23:01 UTC
Unfortunately it turns out that there *are* subtle rendering differences...
Comment 21 Frederik Elwert 2009-08-24 20:59:24 UTC
Oh, I’m sorry, I didn’t notice any when I tested it.

How did you notice and what are the consequences? Does it impact the quality?
Comment 22 Christian Persch 2009-08-24 21:06:13 UTC
I used the gnome-games-render-cards utility to create PNGs from both the old and the new theme, and compared them. The differences are subtle, but that they differ at all doesn't inspire much confidence in the "scour" tool to reduce the svg files. Since the rendering time was virtually unchanged too, I'm unsure if the file size gain alone justifies replacing the file with the reduced one.
Comment 23 Frederik Elwert 2009-08-24 21:49:01 UTC
Thanks for the hint, I din’t know gnome-games-render-cards.

Scour uses some techniques that aren’t 100% loss-free. The question for me would be: Would I have been unsatisfied if the image looked like that in the first place? ;-)

But I understand your concers, so just do what ever you think is best. :-)
Comment 24 Christian Persch 2011-12-07 12:34:14 UTC
This card set has been in gnome-games-extra-data before, and is now part of aisleriot since the split from gnome-games. And the credits are documented in the about dialogue. So I'm closing this bug — thanks again for the contribution :-)