Re: [2005] Read Font Title
If you are specifically using one font, then why would you need to query data about it to add it to the registry?
You should already know exactly what strings would need to be entered shouldn't you?
On second thought though, how are you installing said font? If you install it properly, this registry entry gets auto populated...
Re: [2005] Read Font Title
I am installing the font through my VB application (System.Deployment.Application.ApplicationDeployment.CurrentDeployment.IsFirstRun) using the CreateScalableFontResource, AddFontResource and SendMessage API calls. Prior to calling SendMessage, I need to store that information in the registry.
Yes, I do know the names of the 4 fonts and could hard-code them. But I just don't like the term hard-code. Windows does it somehow when you drop files into the Fonts folder, so it can be done.
Re: [2005] Read Font Title
doesn't your app have an installer? Most installers support installing fonts at installation time, which installs the font into the fonts directory via the windows API and that writes all needed registry keys.
Re: [2005] Read Font Title
I am using Click Once deployment for this application. From what I have read, there is no support in Click Once for Font installations.
Re: [2005] Read Font Title
clickonce is limited on many fronts, I guess fonts is one of them...
This code is VB6, but it shows how to install a given font (aka add the registry keys) after doing what you are already doing by calling the WriteProfileString API to write to the registry...
http://www.vb-helper.com/howto_install_font.html
Re: [2005] Read Font Title
That is exactly what I am doing. I just wanted to pull the font's name from the TTF file itself. I am going to just hard-code it and go. I have wasted too much time on this already.
Re: [2005] Read Font Title
After I finished hard-coding everything, I started debugging a delay in the usability of the font and found this http://vbnet.mvps.org/index.html?cod...uetypename.htm. It shows how to get the font's name from the FOT file that is created by the CreateScalableFontResource API.