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

Add non-embedded Font to Private Collection

P: 2
What I am trying to do is this: Let a user browse for font files that are not installed, select one, and show a sample of the font in a text box (That way the user can change the size, style, and text of the sample)

I don't want to copy the font files to the Windows\Fonts\ folder. Tried that, causes a lot of issues with deleting the font file when the preview is done, even after disposing the text box, removing the font resources, and/or closing the program.

I've read the Windows Tips and Tricks article on using privatefontcollection.addmemoryfont on embedded fonts, but I haven't been able to figure out a way to use this function on non-embedded fonts.

I've tried using just privatefontcollection.addfontfile(filename), and verified that the font is valid and the path is correct, and once I set the textbox font property to this font, verified that the correct font name is there. But all that displays is the default Windows font, even with/without adding the font resources.

Can anyone give me a hand with this?
Sep 7 '07 #1
Share this Question
Share on Google+
1 Reply


P: 2
[ Thread bump ]

Anybody?
Sep 11 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.