If Art=0 then ret=rtezrequest("Kein Verzeichnis ausgewählt...","_Achso","ACHTUNG!","rt_pubscrname=FinalWriterPubScreen")
If Art=1 then ret=rtezrequest("Kein Font ausgewählt...","_Achso","ACHTUNG!","rt_pubscrname=FinalWriterPubScreen")
Call TR_SendMessage(window1,13,'TROM_ACTIVATE',0)
Return
END
If OPEN('file',Temp,"R") then
Laenge=Seek("file",0,"E")
If Laenge=0 then;do
If Art=0 then ret=rtezrequest("Verzeichnis ist leer...","_Abbruch","ACHTUNG!","rt_pubscrname=FinalWriterPubScreen")
If Art=1 then ret=rtezrequest("Kein Font ausgewählt...","_Achso","ACHTUNG!","rt_pubscrname=FinalWriterPubScreen")
address "REXX"
Call close("file")
Return
END
Call close("file")
address command 'sort ' Temp Temp
ret=rtezrequest("Das Makro benötigt ein leeres Dokument."R"Ihr jetziges Dokument wird gelöscht!","_Ja|_Nein","ACHTUNG!","rt_pubscrname=FinalWriterPubScreen")
If ret=0 then Return
Call open('file',Temp,"R")
address(FW)
ClearDoc FORCE
c=0
DO WHILE 1
TR_HANDLEMSG(app,'event')
IF event.trm_class='TRMS_ACTION' THEN
If event.trm_id=2 THEN;do
Call WH
If Punkt="Comma" then DocItemPrefs DECIMAL Comma
leave
End
FondName=ReadLn('file')
IF EOF('file') THEN;do
Call close('file')
Address command "delete ram:fonts QUIET"
If Punkt="Comma" then DocItemPrefs DECIMAL Comma
leave
END
Stand=Seek("file",0,"C")
schonweg=0
If (Lastpos(".info",FondName)=0&Lastpos(".otag",FondName)=0&Lastpos(".type",FondName)=0&Lastpos(".afm",FondName)=0&Lastpos(".lib",FondName)=0) then;do
If Schnitte=1 then
Do g=1 to c
If pos(upper(Schnitte.g),upper(FondName))~=0 then schonweg=1
End
If schonweg=0 then;do
TextTool
Font FondName
If RC<=5 then;do
Call FontBestimmen
GetDocItemPrefs Decimal
Punkt=Result
If Punkt="Comma" then DocItemPrefs DECIMAL Period
IF Gesch=2 THEN;do
View 20
RedrawOFF
End
Pagesetup Pagetype A4 Orient Tall Pages RightOnly
SectionSetup Top 2.54 Bottom 2.54 Inside 2 Outside 1
GraphicTool
LinePrefs LineWt .5
DrawLine 1 2 3.5 20 3.5
if Ausgabe~=2 then DrawLine 1 2 26 20 26
If Locher=1 then DrawLine 1 .5 14.85 1 14.85
TextTool
If Ausgabe=0 then;do
Do i=0 to 14
SetTab i*1.2+0.8 Right
END
NameFont="FWDocs/Codes-"||ShortFondName
Justify Center
Font Softsans
FontSize 18
Type ShortFondName;NewParagraph;NewParagraph
a=-17
Justify Left
DO f=1 to 16
Font Softsans
FontSize 8
zeile=''
DO j=a+33 to a+47
zeile=zeile|| d2c(9)||j|| d2c(32)|| d2c(j)
END
Type zeile;NewParagraph
Font ShortFondName
FontSize 24
zeile=''
DO j=a+33 to a+47
zeile=zeile|| d2c(9)|| d2c(j)
END
Type zeile;NewParagraph
a=a+15
END
Font Softsans
FontSize 9
Type d2c(9);NewParagraph
Justify Right
Type Date(E)" - "FullFondName
END
If Ausgabe=1 then;do
Justify Center
NameFont="FWDocs/Layout-"||ShortFondName
Font Softsans
FontSize 18
Type ShortFondName;NewParagraph
Justify Left
Font FullFondName
FontSize 8
NewParagraph;Type "This is 8-point type - not easy to read!";NewParagraph
FontSize 9
Type "9-Point type is about the smallest readable size.";NewParagraph
FontSize 10
Type "With 10-point type, we have a normal text size.";NewParagraph
FontSize 12
Type "With some fonts, 12-point type is easier to read.";NewParagraph
FontSize 14
Type "14-point type is good for subheadings.";NewParagraph
FontSize 16
Type "For larger subheadings, try 16-point type.";NewParagraph
FontSize 18
Type "18-point type makes nice small headlines.";NewParagraph
FontSize 24
Type "24-point type is for medium headlines.";NewParagraph
FontSize 36
Type "36-point is for larger ones.";NewParagraph
FontSize 48
Type "48-point almost shouts!";NewParagraph
FontSize 12
Font SoftSans
Type d2c(32);NewParagraph
Type "Erweiterter Schriftcode";NewParagraph
FontSize 10
Font FullFondName
DO j=128 BY 32 FOR 4
Type XRange( d2c(j), d2c(j+31));NewParagraph
End
NewParagraph
Type "Normal";NewParagraph
FontSize 10
Font FullFondName
Type "ABCDEFGHIJKLMNOPQRSTUVWXYZ";NewParagraph
Type "abcdefghijklmnopqrstuvwxyz 1234567890 !@#$%^&*()-+=[]{}/:;,.?";NewParagraph
Type "The quick brown fox jumps over the lazy dog. ÄÖÜäöüß"
NewParagraph;NewParagraph
If Schnitte=1 then;do
Font SoftSans
Type "Bold";NewParagraph
FontSize 10
If exists(FullFondName||"_bold") then;do
c=c+1;Schnitte.c=FullFondName||"_bold"
Font Schnitte.c
Type "ABCDEFGHIJKLMNOPQRSTUVWXYZ";NewParagraph
Type "abcdefghijklmnopqrstuvwxyz 1234567890 !@#$%^&*()-+=[]{}/:;,.?";NewParagraph
Type "The quick brown fox jumps over the lazy dog. ÄÖÜäöüß"
End
Else;do
Font SoftSans
Type "Dieser Schriftschnitt existiert nicht."
End
NewParagraph;NewParagraph
Font SoftSans
Type "Italic";NewParagraph
FontSize 10
If exists(FullFondName||"_italic") then;do
c=c+1;Schnitte.c=FullFondName||"_italic"
Font Schnitte.c
Type "ABCDEFGHIJKLMNOPQRSTUVWXYZ";NewParagraph
Type "abcdefghijklmnopqrstuvwxyz 1234567890 !@#$%^&*()-+=[]{}/:;,.?";NewParagraph
Type "The quick brown fox jumps over the lazy dog. ÄÖÜäöüß"
End
Else;do
Font SoftSans
Type "Dieser Schriftschnitt existiert nicht."
End
NewParagraph;NewParagraph
Font SoftSans
Type "BoldItalic";NewParagraph
FontSize 10
If exists(FullFondName||"_bolditalic") then;do
c=c+1;Schnitte.c=FullFondName||"_bolditalic"
Font Schnitte.c
Type "ABCDEFGHIJKLMNOPQRSTUVWXYZ";NewParagraph
Type "abcdefghijklmnopqrstuvwxyz 1234567890 !@#$%^&*()-+=[]{}/:;,.?";NewParagraph
Type "The quick brown fox jumps over the lazy dog. ÄÖÜäöüß"
End
Else;do
Font SoftSans
Type "Dieser Schriftschnitt existiert nicht."
End
NewParagraph;NewParagraph
End
Status BodyTextHeight
th=result
FG=26.24-2.113-th
FG=FG*8%0.34
FontSize FG
Type d2c(9)
Font SoftSans
FontSize 8
NewParagraph
Justify Right
Type Date(E)" - "FullFondName
END
If Ausgabe=2 then;do
DokAnz=1;FontAnz=0
Call FontBestimmen
NameFont="FWDocs/Übersicht-"||Speichname
Justify Center
Font Softsans
FontSize 18
Type FontVerz||" - "||DokAnz;NewParagraph;NewParagraph;NewParagraph
Justify Left
Stand=Seek("file",0,"B")
Do While 1
FondName=ReadLn('file')
IF EOF('file') THEN;do
Backspace
Backspace
Namefont=NameFont||"-"||DokAnz
leave
End
If (Lastpos(".info",FondName)=0&Lastpos(".otag",FondName)=0&Lastpos(".type",FondName)=0) then;do
Font FondName
a=RC
If a=0 then;do
Call FontBestimmen
Font Softsans
FontSize 11
Type ShortFondName;NewParagraph
Font FondName
FontSize 11
Status BodyTextHeight
th1=result
Type "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG ÄÖÜ 0123456789"
Status BodyTextHeight
th2=result
if th2>th1 then;do
ShiftDown
do While 1
Cursor Left
Delete
Status BodyTextHeight
th2=result
If th2=th1 then Break
End
ShiftUp;NewParagraph
end
else NewParagraph
Type "the quick brown fox jumps over the lazy dog äöüß"
FontAnz=FontAnz+1
END
else;do
ret=rtezrequest("FW kann diesen Font nicht anzeigen..."R||FondName" ist kein FW typischer Font...",,"ACHTUNG!","rt_pubscrname=FinalWriterPubScreen")
BackSpace
End
If FontAnz=12 then;do
call WH
UNameFont=NameFont||"-"||DokAnz
If (Speich=1|Speich=3) then Save UNameFont
If (Speich=2|Speich=3) then Print
Cleardoc force
DokAnz=DokAnz+1;FontAnz=0
IF Gesch=2 THEN;do
View 20
RedrawOFF
End
If Punkt="Comma" then DocItemPrefs DECIMAL Period
Pagesetup Pagetype A4 Orient Tall Pages RightOnly Top 0 Bottom 2.54 Left 0 Right 0
SectionSetup Top 2.54 Bottom 2.54 Inside 2 Outside 1
else ret=rtezrequest("FW kann diesen Font nicht anzeigen..."R||FondName" ist kein FW typischer Font...",,"ACHTUNG!","rt_pubscrname=FinalWriterPubScreen")