Given a fonts facename, How can I get it's Filename?
I cannot find any documentation on fonts and retrieving filenames of those fonts.
Given a fonts facename or LOGFONT structure, How can I get it's Filename?
CFontDialog dlg(&m_Text.GetLogFont(), CF_SCREENFONTS, NULL, this);
if(dlg.DoModal()==IDOK)
{
LOGFONT lf;
dlg.GetCurrentFont(&lf);
m_Text.SetTextFont(lf);
m_Text.SetWindowText(/*FONTS FILE NAME??*/);
}
I cannot find any font functions that help with this. I know how to install fonts, but I need to know both the fonts filename and it's facename at the same time.
Anyone know how to do this?????
Re: Given a fonts facename, How can I get it's Filename?
Hi, I found the lead I needed. All installed fonts have a cross reference from facename to filename at the following registry location:
HKeyLocalMachine\Software\Microsoft\Windows\CurrentVersion\Fonts
It sure would be nice to have an API call for this, but I guess I'll have to write my own.