473,386 Members | 1,791 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

saving a font

2G
Hi

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

Grtz.
Nov 15 '05 #1
3 3482
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: maceo | last post by:
I have a script that will print out the results of a table and make a calculation of a total of one of the columns. See example: <?php /* Database connection */...
9
by: RooLoo | last post by:
Hey all! Using VB.Net... How can I save the font properties of a textbox to an ASCII file and later read the file and apply the properties back to the textbox? Users use multiple workstations,...
2
by: Jack Russell | last post by:
Sorry another dumb question about vb.net How do I save a font (in a text file) so that I can restore it at later date. I thought MyString=txtBox.font.tostring Write that away.
7
by: Brian | last post by:
I wrote this script here but I cannot get the script to save to the correct month.html. Can someone tell me what is wrong with this code? <html> <head> <title>Monthly Bills</title> </head>...
0
by: pete | last post by:
When saving a gif file in VB 2005 with a custom brush color the background if the image is dithered. When I save the image as any other type but gif the background is not dithered. What can I do to...
5
by: TheGanjaMan | last post by:
Hi everyone, I'm trying to write up a simple image stamper application that stamps the Exif date information from the jpegs that I've taken from my digital camera and saves the new file with the...
8
by: Mark Collard | last post by:
If you change the font property on a Form, it adds/changes the code in the form to something like this: this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F,...
2
by: jessDMiller | last post by:
I have no clue why the data from the form isn't saving into the database. What am I doing wrong? addAnnounce.php: <td align=top> <form action="index2.php" method="post">Heading:<br...
6
by: Karl | last post by:
Hi all, It may seem like a rather odd request (or not) but I would like to be able to create a file (doc, jpg, xls or one of many other files that can be automated) on a website and stream it to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.