Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printing 133 character on an line
Message
De
18/09/2001 10:32:10
 
 
À
18/09/2001 09:09:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00557682
Message ID:
00557833
Vues:
20
>Yes, I have done that already, and in some cases i can resolve the problem that way..
>In other cases I would be the max if I got a "fixed font" which is a little less wide than the "courier new" or "the foxprint"

Ok, Christian, this will give you the narrowest font in your system, at the specified point size:
#DEFINE nFONTSIZE 8

AFONT(laFonts)

lcNarrowest = ""
lnMinAvg = 0

FOR EACH lcFont IN laFonts
  IF FONTMETRIC(17,lcFont,nFONTSIZE)=0  && ANSI charset, only
    IF EMPTY(lcNarrowest)
      lnMinAvg = FONTMETRIC(6,lcFont,nFONTSIZE)
      lcNarrowest = lcFont
    ELSE
      lnAvg = FONTMETRIC(6,lcFont,nFONTSIZE)
      IF lnAvg < lnMinAvg
        lnMinAvg = lnAvg
        lcNarrowest = lcFont
      ENDIF
    ENDIF
  ENDIF
ENDFOR

? "Narrowest font is: "+lcNarrowest+" (at "+LTRIM(STR(nFONTSIZE))+" points)"
bye
----------------------------------
António Tavares Lopes
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform