freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Freetype] how to find the actual font name from windows


From: niels
Subject: Re: [Freetype] how to find the actual font name from windows
Date: Mon, 03 Mar 2003 09:12:57 +0100

Hi,

> I would also be interested in that code snippet that gets a filename from
> a LOGFONT.

I use the lfFaceName string of the LOGFONT to get the family name and append 
the 
'Regular', 'Bold' or 'Italic' substrings when needed. Then I scan through my 
font 
database (or the Window/Fonts directory) using FreeType and try to match this 
family name to the names in the font files. IMHO, this is the only way to do it.

Actually, Windows uses it's fontmapper to get the right font file. This also 
takes care 
of choosing a similar font to the one that is requested in cases where the 
'correct' 
font is not available. (you can use the panose information in the OS2 header to 
mimic this behaviour)

Cheers,
Niels.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]