Monday, August 23, 2004


Do you want to do cardgame related stuff on your computer? Some tips and hints for using it in writing:

  • In HTML, you can use ♠, ♥, ♦ and ♣ to get the suits. If your browser supports it, you shold see it here: ♠ ♥ ♦ ♣. However, they are all in black, so do a little more HTML and CSS voodoo-fu to get ♠ ♥ ♦ ♣ (Doesn't the Diamonds look a bit off center?)
  • In LaTeX, you get the suits with $\spadesuit$, $\heartsuit$, $\diamondsuit$ and $\clubsuit$. There you would have to do a little voodoo-fu with \usepackage[dvips]{color} and \textcolor{red}{$\heartsuit$} to get it red.
  • In SVG, Scalable Vector Graphics, there's SVG-cards.
  • For Perl, look at CPAN for the module Games::Cards, Games::Cards::Poker and Games::Poker.
  • TrueType Font, the Playing Cards free font can be used (but JQK faces don't look so hot). The Bermuda Card & Bridge Fonts look better, but cost money.
  • Windows Programming, cards.dll. This contains all of the playing card bitmapped images that games such as Windows Solitare use to display their graphics. N.b., this is (merely) card graphics, not functions to randomize and deal a deck of cards or such. A tutorial for using it in C# can be found here.

No comments: