Hi Rakesh,
In fact my application will run under WinCE 5.0.
I want to display some part of text (using the .DrawString() method) with a
font file "filename.ttf". I am currently emulating my application with the
WinCE emulator.
1] I have installed this font in my desktop windows font dir.
I tried to use the font with this :
Font fontfilename = new Font("filename",12,FontStyle.Regular);
It don't work. I think the problem is that the font file is not installed in
the emulator.
2] That's why I have attached the file to my project as an embedded ressource.
I have seen that with GDI+ I can specify the location of the font with
PrivateFontCollection. But I get an error when I type this :
PrivateFontCollection privateFontCollection = new PrivateFontCollection();
"The type or namespace name 'PrivateFontCollection' could not be found (are
you missing a using directive or an assembly reference?)"
I don't know what else to do.
Regards.
Sadi.
Rakesh Rajan said:
Hi Sadi,
Are you trying to change the font of a windows form?
Or are you trying to install a ttf file and set that as the font for your
windows form?
Regards,
Rakesh Rajan
:
Hi !
I wonder how I can change the font of a .NET C# application ? I have a
".ttf", I suppose it's a TrueType font file. I will appreciate any help, if
you have tutorials it will be great too.
Should I copy it to Windows System folder ?
Thanks in advance,
Regards.
Sadi.