views:

31

answers:

1

I've run into another problem while fixing up my game to use this library.

SDL.NET, the library I'm using for graphics and input in my VB.NET app, has its own special Font class which is entirely separate from System.Drawing.Font. Here are its two constructors:

public Font(string fileName, int pointSize)
public Font(byte[] array, int pointSize)

Both need a file, in glaring contrast to System.Drawing.Font (which just needs the font family name). I'm not sure where these files are. My first instinct was to look in Windows\Fonts for the ones I want to use, but... you can guess how that approach failed.

I need to find the files for Cambria, DotumChe, and Photo (all of which came installed on the computer). My program is very far from completion, so I'm not worrying about the legal complications of what I'm trying to do. I just want to find the files and get them in my project so I can move on. Is there a place on my computer where I can find them?

A: 

A C# example is available at Steve's Tech Talk. It uses P/Invoke to get the fonts folder path.

I'm assuming you plan on resolving legal/licensing issues before distributing the game.

Snarfblam
Thanks for the tip. As for the legal gray area of doing this, I'm only using this as a temporary solution; I plan to make my own font for the game eventually.
Exp HP