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 privatefontcoll ection.addmemor yfont 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 privatefontcoll ection.addfontf ile(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?
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 privatefontcoll ection.addmemor yfont 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 privatefontcoll ection.addfontf ile(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?
Comment