views:

29

answers:

2

Hi, I was wondering how i can embed a third party font into my app( and use it ) so i can distribute my app with the font of my choice for users who do not have the font installed on their systems. Is this possible, or do i have to distribute the font if i want the users to be able to use the font in question. Thanks.

+1  A: 

Stick the actual font file into a User-Defined Resource.

Billy ONeal
Hi @Billy : I tried that and i got an Error from the Resource Compiler. The font file's license is liberal, its a free font. It's and OpenType type font.@Mark: I was actually trying to find a way where i didnt have to distribute the actual file as part of the package, is there any way to avoid this?I may have found a solution and it consists of using the TTEmbedFont function and some GDI magic, i will try this and report. If anyone else has input i'm all ears :) or eyes.
gandolf
@gandolf: What is the error you got from the resource compiler? We can't help troubleshoot if you don't let us know that :)
Billy ONeal
A: 

Very few fonts will have a license that allows this. Even a free font should be checked.

You can use CreateScalableFontResource and AddFontResource to make a font file available to your application. The font must be available as a separate file for this to work.

Mark Ransom