!»»» Definition of a standard fontname list
! in parameter "Zeichensatz"
!»»» Ermittlung, ob als SUB-GDL aufgerufen (geCALLed)
mkr=" " : sts=REQUEST("NAME_OF_MAIN","",mkr)
gdl=REQ("GDL_VERSION")
IF gdl<1.516 THEN
!»» Version for ArchiCAD 9-
IF STRSTR(mkr,"MASTER_GDL") THEN
! … Basic settings in Master_GDL.GDL
VALUES "Zeichensatz" "«master_gdl»",
"Arial","Arial Narrow","Avant Garde",
"Centoury Schoolbook","Chicago","Courier New",
"Futura Lt BT Westlich","Futura LtCn BT Westlich",
"Futura Md BT Westlich","Geneva",
"Helvetica","N Helvetica Narrow",
"New York","Tahoma","Verdana", CUSTOM
ELSE
! … Individual called settings
VALUES "Zeichensatz" "Arial Westlich","Arial","Arial Narrow",
"Avant Garde","Centoury Schoolbook","Chicago","Courier New",
"Geneva","Helvetica","N Helvetica Narrow",
"New York","Tahoma","Verdana", CUSTOM
ENDIF
END
ELSE
!»» Version for ArchiCAD 10+
DIM fontnames[],exclude[]
! … Define font names (/extensions) to extinguish
exclude[1]='Chinesisch'
exclude[2]='Türkisch'
exclude[3]='Hebräisch'
exclude[4]='Baltisch'
exclude[5]='Kyrillisch'
exclude[6]='Thai'
exclude[7]='Griechisch'
exclude[8]='Mitteleuropäisch'
exclude[9]='Arabisch'
exclude[10]='Japanisch'
exclude[11]='Hangul'
! … can be continued
excludeN=VARDIM1(exclude)
! … Read all fonts in system
fontN=REQUEST("FONTNAMES_LIST", "", fontnames)
! …same as: fontN=VARDIM1(fontnames)
! … Extension, which has always to be cut off
cutoff="Westlich"
! … Reduce list
DIM fontnames2[]
j=0
FOR i=1 TO fontN
t=1
! … is fontname on black list?
FOR k=1 TO excludeN
IF STRSTR(fontnames[i],exclude[k]) THEN t=0
NEXT k
IF t THEN
j=j+1
! … cut off extension
t=STRSTR(fontnames[i]," "+cutoff)
IF t<=1 THEN t=STRLEN(fontnames[i])+1
fontnames2[j]=STRSUB(fontnames[i],1,t-1)
ENDIF
NEXT i
! … output to value list
IF STRSTR(mkr,"MASTER_GDL") THEN
! … Basic settings in Master_GDL.GDL
IF fontN THEN VALUES "Zeichensatz" "«master_gdl»",fontnames2,CUSTOM
ELSE
! … Individual called settings
IF fontN THEN VALUES "Zeichensatz" fontnames2,CUSTOM
ENDIF
ENDIF