By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,420 Members | 1,417 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,420 IT Pros & Developers. It's quick & easy.

saving a font

P: n/a
2G
Hi

How do you install a font using c# ? Copying it into the dir won't work.

Grtz.
Nov 15 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Install it through the API with P/Invoke, see the docs for AddFontResource()

HTH
Brian W


"2G" <2g@pandora.be> wrote in message
news:7n******************@phobos.telenet-ops.be...
Hi

How do you install a font using c# ? Copying it into the dir won't work.

Grtz.

Nov 15 '05 #2

P: n/a
2G
I do
int i = AddFontResource("c:\\microN55.ttf");

and it returns 1 but the font doesn't seem to be installed (I can't find it
in the fonts dir). What should i do?

Grtz

"Brian W" <brianw@gold_death_2_spam_rush.com> wrote in message
news:OF**************@TK2MSFTNGP11.phx.gbl...
Install it through the API with P/Invoke, see the docs for AddFontResource()
HTH
Brian W


"2G" <2g@pandora.be> wrote in message
news:7n******************@phobos.telenet-ops.be...
Hi

How do you install a font using c# ? Copying it into the dir won't work.

Grtz.


Nov 15 '05 #3

P: n/a
You have to copy the font to the Font dir then call AddFontResource

See
http://msdn.microsoft.com/library/de...ntext_2ylq.asp
for more information.
HTH
Brian W

"2G" <2g@pandora.be> wrote in message
news:5d*******************@phobos.telenet-ops.be...
I do
int i = AddFontResource("c:\\microN55.ttf");

and it returns 1 but the font doesn't seem to be installed (I can't find it in the fonts dir). What should i do?

Grtz

"Brian W" <brianw@gold_death_2_spam_rush.com> wrote in message
news:OF**************@TK2MSFTNGP11.phx.gbl...
Install it through the API with P/Invoke, see the docs for

AddFontResource()

HTH
Brian W


"2G" <2g@pandora.be> wrote in message
news:7n******************@phobos.telenet-ops.be...
Hi

How do you install a font using c# ? Copying it into the dir won't work.
Grtz.



Nov 15 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.