Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Karben Selim Mejia
  Where is Karben Selim Mejia?
 San Pedro Sula
 Honduras
 Karben Selim Mejia
 To: Karben Selim Mejia
  Where is Karben Selim Mejia?
 San Pedro Sula
 Honduras
 Karben Selim Mejia
 Tags
Subject: RE: Getting the Font Type
Thread ID: 16178 Message ID: 16560 # Views: 2 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Tuesday, October 22, 2002 9:25:55 PM         
   


> I need to get the information of the fonts installed , not the list of the fonts cause I use afont() to get it. What I need is to now what kind of Font is every one of the fonts installed e.g.
>
> Arial True Type Font The icon of these one is something like TT
> FoxFont Not a true Type Font don't have any icon
>
> and there are some of them that display an icon similar to an "O"
>
> I don't need to know what Icon they use, I need to know what type of font is each one
>
> regards
>
>
> Karben Selim Mejia
>
> I always have the last word in my home, "Yes sweet heart, what ever you say"
>
> Honduras, Central America
> The very center of the world

I got kind of an answer from UT forum and it was by using FONTMETRIC and the BITAND functions,

LPARAMETERS _SelectedFontName_, _SelectedFontSize_
*:Finding Out wether the Font is True Type or Not
lTrueType = .F.
lnPitchFamily = FONTMETRIC(16,ALLTRIM(_SelectedFontName_),_SelectedFontSize_)
lnFP = BITAND(lnPitchFamily,0x0F)

*:testing if the selected font is True Type or not
IF BITAND(lnFP,0x04)!=0
	lTrueType = .T.
ENDIF
RETURN lTrueType


Hope this could help somebody else besides me

regards
Karben Selim Mejia

The more we share, the more we learn. Knowledge is power.
Honduras, Central America
The very center of the world

ENTIRE THREAD

Getting the Font Type Posted by Karben Selim Mejia @ 10/10/2002 5:18:19 PM
RE: Getting the Font Type Posted by Karben Selim Mejia @ 10/22/2002 9:25:55 PM