473,386 Members | 1,721 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.

Fonts AddFontFile

Im Trying to Add a Font to PrivateFontCollection

it keeps crashing on File Not Found Exception

ive Tried full path and without full path

File.Exists returns true.... I dont understand this

sample below

Tia

dave

PrivateFontCollection MyFonts = new PrivateFontCollection();

MyFonts.AddFontFile("vt100.fon"); //Hvtermw.ttf");

aFamilies = MyFonts.Families;

for (int x = 0; x < aFamilies.GetLength(0); x++)

{

Console.WriteLine(aFamilies[x]);

Console.ReadKey();



}
Jun 27 '08 #1
1 4737
On Sun, 20 Apr 2008 08:24:14 -0700, "daveL" <ve***********@yahoo.com>
wrote:
>Im Trying to Add a Font to PrivateFontCollection

it keeps crashing on File Not Found Exception

ive Tried full path and without full path

File.Exists returns true.... I dont understand this
The docs state that FileNotFoundException can also occur if your font
file exists, but its format is not supported - maybe that is the
problem?

Regards,
Gilles.

Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jack Charbonneau | last post by:
I have a bunch of custom fonts installed on my system. For instance if I look at the font drop-down in word pad I see about 90 fonts, but if I build an app using VS.Net, add a label, and try to...
0
by: LaidBack Bill | last post by:
My application allows the user to select fonts. I fill in a combo box control with the available fonts by looping through all System.Fonts: ' Get all the screen fonts ReDim...
4
by: L | last post by:
Hi there, Does C# support OpenType fonts? My c# application is not recognizing OpenType fonts. Thanks, Lalasa.
6
by: BobAchgill | last post by:
Has anyone had success with writing text using a private font that was not already installed to the system? When I try the example code in NET Framework Developer's Guide called “Creating a...
4
by: Aaron Gray | last post by:
Is there anyway to get a list of all the availiable fonts in Javascript ? Aaron
2
by: Luc | last post by:
I saw a few posts on this newsgroup about it but nothing to help me resolve this problem: We designed a window in .NET on a platform using small fonts (120 ppp). But this window will run on...
1
by: Atul | last post by:
Hi, I have installed a truetype font (.ttf) on a linux machne (SUSE linux 10, KDE) by copying it to my .fonts folder. I can use the font in all applications like open-office and firefox browser....
8
by: traditore | last post by:
Hello. I'm trying to load fonts in a web page using "style" tag. The TTF files are in other page whose URL is, for example, "http://myURL/fonts". The HTML code is something like: <html>...
12
by: ctclibby | last post by:
Hi all Have a customer that wants a specific font included in her web page design; Comic Sans MS. This is one of the MS core fonts. The problem I have is that some of the *nix browsers do NOT...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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.