Nethar
February 9th, 2009, 04:33 PM
Hi,
is it possible to get font filename from HFONT handle?
HFONT handle -> "C:\Windows\Fonts\arial.ttf"
I know i can get LOGFONT structure from HFONT (with GetObject function) so I can get font name. Then maybe I can search registry keys in HKeyLocalMachine\Software\Microsoft\Windows NT\CurrentVersion\Fonts to find the font name and there is a filename (i know how to get fonts directory path).
Is this good solution? Because it does not seem very friendly :) Is there any easier solution? ;-)
Thanks!
is it possible to get font filename from HFONT handle?
HFONT handle -> "C:\Windows\Fonts\arial.ttf"
I know i can get LOGFONT structure from HFONT (with GetObject function) so I can get font name. Then maybe I can search registry keys in HKeyLocalMachine\Software\Microsoft\Windows NT\CurrentVersion\Fonts to find the font name and there is a filename (i know how to get fonts directory path).
Is this good solution? Because it does not seem very friendly :) Is there any easier solution? ;-)
Thanks!