1 # This script is free software; you can redistribute it and/or modify
2 # it under the terms of the GNU General Public License as published by
3 # the Free Software Foundation; either version 2 of the License, or
4 # (at your option) any later version.
6 # This program is distributed in the hope that it will be useful,
7 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 # GNU General Public License for more details.
11 # You should have received a copy of the GNU General Public License
12 # along with this program; if not, write to the Free Software
13 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 #-----------------------------------------------------------------------------
17 # Copyright 2000, Olivier Chapuis
18 #-----------------------------------------------------------------------------
20 WindowTitle {Font Selector}
22 Font -adobe-helvetica-bold-r-*-*-12-*
30 Set $TextColorset = {}
33 Set $arg = (GetScriptArgument $i)
37 If $arg == {--text-colorset} Then
38 Set $TextColorset = (GetScriptArgument $j)
39 If $arg == {--launched} Then
40 Set $Launched = (GetScriptArgument $j)
41 If $arg == {--lang} Then
42 Set $Lang = (GetScriptArgument $j)
43 If $arg == {--font} Then
44 Set $Color = (GetScriptArgument $j)
46 Set $arg = (GetScriptArgument $i)
49 If $TextColorset <> {} Then
51 ChangeColorset 11 $TextColorset
52 ChangeColorset 110 $TextColorset
53 ChangeColorset 111 $TextColorset
54 ChangeColorset 112 $TextColorset
55 ChangeColorset 113 $TextColorset
56 ChangeColorset 114 $TextColorset
57 ChangeColorset 201 $TextColorset
58 ChangeColorset 311 $TextColorset
59 ChangeColorset 381 $TextColorset
63 If $Launched == 0 Then
72 # Internationalization
73 Set $IsAdjustable = {The selected font is adjustable}
74 Set $NotAdjustable = {The selected font is not adjustable}
76 # The Font description
94 Set $TheFont = {-}$Foundry{-}$Family{-}$Weight{-}$Slant{-}$Width{-}$Style{-}$PixSize{-}$PtSize{-}$XRes{-}$YRes{-}$Spacing{-}$AvgWidth{-}$Charset
96 # list of fonts here a font is $Family ($Foundry):
99 # Then we have the filter for $FontList
100 Set $FilterFoundry = {*}
101 Set $FilterFamily = {*}
102 Set $FilterWeight = {*}
103 Set $FilterSlant = {*}
104 Set $FilterWidth = {*}
105 Set $FilterStyle = {*}
106 Set $FilterPixSize = {*}
107 Set $FilterPtSize = {*}
108 Set $FilterXRes = {*}
109 Set $FilterYRes = {*}
110 Set $FilterSpacing = {*}
111 Set $FilterAvgWidth = {*}
112 Set $FilterCharset = {*-*}
115 Set $FilterScaleAdjust = 0
117 Set $FontFilter = {-}$FilterFoundry{-}$FilterFamily{-}$FilterWeight{-}$FilterSlant{-}$FilterWidth{-}$FilterStyle{-}$FilterPixSize{-}$FilterPtSize{-}$FilterXRes{-}$FilterYRes{-}$FilterSpacing{-}$FilterAvgWidth{-}$FilterCharset
119 # Then we have two lists:
121 # First list is the current state: the value that can be modified
122 # directely relatively to the $TheFont
123 Set $FoundryList = {*}
124 Set $FamilyList = {*}
125 Set $WeightList = {*}
129 Set $PixSizeList = {*}
130 Set $PtSizeList = {*}
133 Set $SpacingList = {*}
134 Set $AvgWidthList = {*}
135 Set $CharsetList = {*-*}
137 # Second list is the list of all possible value for setting the filter
138 Set $FilterFoundryList = {*}
139 Set $FilterFamilyList = {*}
140 Set $FilterWeightList = {*}
141 Set $FilterSlantList = {*}
142 Set $FilterWidthList = {*}
143 Set $FilterStyleList = {*}
144 Set $FilterPixSizeList = {*}
145 Set $FilterPtSizeList = {*}
146 Set $FilterXResList = {*}
147 Set $FilterYResList = {*}
148 Set $FilterSpacingList = {*}
149 Set $FilterAvgWidthList = {*}
150 Set $FilterCharsetList = {*-*}
162 #----------------------------------------------------------------------------
167 If $HideMain == 1 Then
195 If $HideInfo == 1 Then
203 If $HideFilter == 1 Then
227 If $ShowMain == 1 Then
252 If $ShowInfo == 1 Then
261 If $ShowFilter == 1 Then
284 # -------------------------------------------------------------------
285 If $InStart == 1 Then
287 Set $StartCount = (Add $StartCount 1)
288 If $StartCount > 9 Then
290 If $StartCount == 10 Then
300 Set $SetFilterLists = 1
305 #---------------------------------------------------------------------
306 If $UpdateTheFont == 1 Then
309 Set $UpdateTheFont = 0
310 Set $TheFont = {-}$Foundry{-}$Family{-}$Weight{-}$Slant{-}$Width{-}$Style{-}$PixSize {-}$PtSize{-}$XRes{-}$YRes{-}$Spacing{-}$AvgWidth{-}$Charset
314 #---------------------------------------------------------------------
318 Set $cmd = {fvwm-themes-script --font --type="font-list-all-list-filter-list" --font-current="}$TheFont{"}$FontReset
319 Set $Config = (GetOutput $cmd 1 -1)
320 Set $ParseFontList = 1
325 #---------------------------------------------------------------------
326 If $GetFontList == 1 Then
329 Set $cmd = {fvwm-themes-script --font --type="font-list" --font-filter="}$FontFilter{" --font-current="}$TheFont{"}
330 Set $Config = (GetOutput $cmd 1 -1)
331 Set $ParseFontList = 1
333 #Set $SetAllLists = 1
337 #---------------------------------------------------------------------
338 If $GetFontListAndAll == 1 Then
340 Set $GetFontListAndAll = 0
341 Set $cmd = {fvwm-themes-script --font --type="font-list-all-list" --font-filter="}$FontFilter{" --font-current="}$TheFont{"}
342 If $InStart == 1 Then
343 Set $cmd = $cmd { --font-start}
344 Set $Config = (GetOutput $cmd 1 -1)
345 Set $ParseFontList = 1
351 #---------------------------------------------------------------------
352 If $GetAllLists == 1 Then
355 Set $cmd = {fvwm-themes-script --font --type="all-list" --font-filter="}$FontFilter{" --font-current="}$TheFont{" --font-index=}$FontIndex
356 Set $Config = (GetOutput $cmd 1 -1)
362 #---------------------------------------------------------------------
363 If $ParseFontList == 1 Then
365 Set $ParseFontList = 0
367 Set $FontIndex = (StrCopy $Config 1 3)
368 Set $tmp = (StrCopy $FontIndex 1 1)
371 Set $FontIndex = (StrCopy $FontIndex 2 3)
372 Set $tmp = (StrCopy $FontIndex 1 1)
374 Set $FontIndex = (StrCopy $FontIndex 2 2)
376 ChangeValue 11 $FontIndex
377 ChangeMinValue 11 (Add $FontIndex -3)
382 While $notdone == 1 Do
384 Set $index = (Add $index 1)
385 Set $id = (StrCopy $Config $index $index)
389 Set $FontList = $FontList $id
394 ChangeTitle 11 $FontList
395 If $FontIndex == 0 Then
398 Set $SetAllToNull = 1
401 # --------------- the font filter
402 # font filter Foundry
404 Set $FilterFoundry = {}
405 While $notdone == 1 Do
407 Set $index = (Add $index 1)
408 Set $id = (StrCopy $Config $index $index)
412 Set $FilterFoundry = $FilterFoundry $id
419 Set $FilterFamily = {}
420 While $notdone == 1 Do
422 Set $index = (Add $index 1)
423 Set $id = (StrCopy $Config $index $index)
427 Set $FilterFamily = $FilterFamily $id
434 Set $FilterWeight = {}
435 While $notdone == 1 Do
437 Set $index = (Add $index 1)
438 Set $id = (StrCopy $Config $index $index)
442 Set $FilterWeight = $FilterWeight $id
449 Set $FilterSlant = {}
450 While $notdone == 1 Do
452 Set $index = (Add $index 1)
453 Set $id = (StrCopy $Config $index $index)
457 Set $FilterSlant = $FilterSlant $id
464 Set $FilterWidth = {}
465 While $notdone == 1 Do
467 Set $index = (Add $index 1)
468 Set $id = (StrCopy $Config $index $index)
472 Set $FilterWidth = $FilterWidth $id
479 Set $FilterStyle = {}
480 While $notdone == 1 Do
482 Set $index = (Add $index 1)
483 Set $id = (StrCopy $Config $index $index)
487 Set $FilterStyle = $FilterStyle $id
492 # font filter pixsize
494 Set $FilterPixSize = {}
495 While $notdone == 1 Do
497 Set $index = (Add $index 1)
498 Set $id = (StrCopy $Config $index $index)
502 Set $FilterPixSize = $FilterPixSize $id
509 Set $FilterPtSize = {}
510 While $notdone == 1 Do
512 Set $index = (Add $index 1)
513 Set $id = (StrCopy $Config $index $index)
517 Set $FilterPtSize = $FilterPtSize $id
525 While $notdone == 1 Do
527 Set $index = (Add $index 1)
528 Set $id = (StrCopy $Config $index $index)
532 Set $FilterXRes = $FilterXRes $id
540 While $notdone == 1 Do
542 Set $index = (Add $index 1)
543 Set $id = (StrCopy $Config $index $index)
547 Set $FilterYRes = $FilterYRes $id
552 # font filter Spacing
554 Set $FilterSpacing = {}
555 While $notdone == 1 Do
557 Set $index = (Add $index 1)
558 Set $id = (StrCopy $Config $index $index)
562 Set $FilterSpacing = $FilterSpacing $id
567 # font filter AvgWidth
569 Set $FilterAvgWidth = {}
570 While $notdone == 1 Do
572 Set $index = (Add $index 1)
573 Set $id = (StrCopy $Config $index $index)
577 Set $FilterAvgWidth = $FilterAvgWidth $id
582 # font filter Charset
584 Set $FilterCharset = {}
585 While $notdone == 1 Do
587 Set $index = (Add $index 1)
588 Set $id = (StrCopy $Config $index $index)
592 Set $FilterCharset = $FilterCharset $id
597 Set $FontFilter = {-}$FilterFoundry{-}$FilterFamily{-}$FilterWeight{-}$FilterSlant{-}$FilterWidth{-}$FilterStyle{-}$FilterPixSize{-}$FilterPtSize{-}$FilterXRes{-}$FilterYRes{-}$FilterSpacing{-}$FilterAvgWidth{-}$FilterCharset
598 ChangeTitle 101 $FontFilter
601 #---------------------------------------------------------------------
602 If $ParseLists == 1 Then
606 If $IndexIsSet <> {1} Then
609 If $SetFilterLists == 1 Then
611 Set $index = (Add $index 1)
612 Set $TmpFoundryIndex = (StrCopy $Config $index (Add $index 1))
613 Set $index = (Add $index 1)
615 Set $TmpFoundryList = {}
616 While $notdone == 1 Do
618 Set $index = (Add $index 1)
619 Set $id = (StrCopy $Config $index $index)
623 Set $TmpFoundryList = $TmpFoundryList $id
627 #Do {Echo TFL:}$TmpFoundryList
631 Set $index = (Add $index 1)
632 Set $TmpWeightIndex = (StrCopy $Config $index (Add $index 1))
633 Set $index = (Add $index 1)
635 Set $TmpWeightList = {}
636 While $notdone == 1 Do
638 Set $index = (Add $index 1)
639 Set $id = (StrCopy $Config $index $index)
643 Set $TmpWeightList = $TmpWeightList $id
648 If $TmpWeightList == {No fonts} Then
651 Set $SetFilterLists = 0
652 ChangeTitle 11 {No fonts}
656 Set $index = (Add $index 1)
657 Set $TmpSlantIndex = (StrCopy $Config $index (Add $index 1))
658 Set $index = (Add $index 1)
660 Set $TmpSlantList = {}
661 While $notdone == 1 Do
663 Set $index = (Add $index 1)
664 Set $id = (StrCopy $Config $index $index)
668 Set $TmpSlantList = $TmpSlantList $id
674 Set $index = (Add $index 1)
675 Set $TmpWidthIndex = (StrCopy $Config $index (Add $index 1))
676 Set $index = (Add $index 1)
678 Set $TmpWidthList = {}
679 While $notdone == 1 Do
681 Set $index = (Add $index 1)
682 Set $id = (StrCopy $Config $index $index)
686 Set $TmpWidthList = $TmpWidthList $id
692 Set $index = (Add $index 1)
693 Set $TmpStyleIndex = (StrCopy $Config $index (Add $index 1))
694 Set $index = (Add $index 1)
696 Set $TmpStyleList = {}
697 While $notdone == 1 Do
699 Set $index = (Add $index 1)
700 Set $id = (StrCopy $Config $index $index)
704 Set $TmpStyleList = $TmpStyleList $id
710 Set $index = (Add $index 1)
711 Set $TmpPixSizeIndex = (StrCopy $Config $index (Add $index 1))
712 Set $index = (Add $index 1)
714 Set $TmpPixSizeList = {}
715 While $notdone == 1 Do
717 Set $index = (Add $index 1)
718 Set $id = (StrCopy $Config $index $index)
722 Set $TmpPixSizeList = $TmpPixSizeList $id
728 Set $index = (Add $index 1)
729 Set $TmpPtSizeIndex = (StrCopy $Config $index (Add $index 1))
730 Set $index = (Add $index 1)
732 Set $TmpPtSizeList = {}
733 While $notdone == 1 Do
735 Set $index = (Add $index 1)
736 Set $id = (StrCopy $Config $index $index)
740 Set $TmpPtSizeList = $TmpPtSizeList $id
746 Set $index = (Add $index 1)
747 Set $TmpXResIndex = (StrCopy $Config $index (Add $index 1))
748 Set $index = (Add $index 1)
750 Set $TmpXResList = {}
751 While $notdone == 1 Do
753 Set $index = (Add $index 1)
754 Set $id = (StrCopy $Config $index $index)
758 Set $TmpXResList = $TmpXResList $id
764 Set $index = (Add $index 1)
765 Set $TmpYResIndex = (StrCopy $Config $index (Add $index 1))
766 Set $index = (Add $index 1)
768 Set $TmpYResList = {}
769 While $notdone == 1 Do
771 Set $index = (Add $index 1)
772 Set $id = (StrCopy $Config $index $index)
776 Set $TmpYResList = $TmpYResList $id
782 Set $index = (Add $index 1)
783 Set $TmpSpacingIndex = (StrCopy $Config $index (Add $index 1))
784 Set $index = (Add $index 1)
786 Set $TmpSpacingList = {}
787 While $notdone == 1 Do
789 Set $index = (Add $index 1)
790 Set $id = (StrCopy $Config $index $index)
794 Set $TmpSpacingList = $TmpSpacingList $id
800 Set $index = (Add $index 1)
801 Set $TmpAvgWidthIndex = (StrCopy $Config $index (Add $index 1))
802 Set $index = (Add $index 1)
804 Set $TmpAvgWidthList = {}
805 While $notdone == 1 Do
807 Set $index = (Add $index 1)
808 Set $id = (StrCopy $Config $index $index)
812 Set $TmpAvgWidthList = $TmpAvgWidthList $id
818 Set $index = (Add $index 1)
819 Set $TmpCharsetIndex = (StrCopy $Config $index (Add $index 1))
820 Set $index = (Add $index 1)
822 Set $TmpCharsetList = {}
823 While $notdone == 1 Do
825 Set $index = (Add $index 1)
826 Set $id = (StrCopy $Config $index $index)
830 Set $TmpCharsetList = $TmpCharsetList $id
838 While $notdone == 1 Do
840 Set $index = (Add $index 1)
841 Set $id = (StrCopy $Config $index $index)
845 Set $TmpFoundry = $TmpFoundry $id
853 While $notdone == 1 Do
855 Set $index = (Add $index 1)
856 Set $id = (StrCopy $Config $index $index)
860 Set $TmpFamily = $TmpFamily $id
868 While $notdone == 1 Do
870 Set $index = (Add $index 1)
871 Set $id = (StrCopy $Config $index $index)
875 Set $TmpWeight = $TmpWeight $id
883 While $notdone == 1 Do
885 Set $index = (Add $index 1)
886 Set $id = (StrCopy $Config $index $index)
890 Set $TmpSlant = $TmpSlant $id
898 While $notdone == 1 Do
900 Set $index = (Add $index 1)
901 Set $id = (StrCopy $Config $index $index)
905 Set $TmpWidth = $TmpWidth $id
913 While $notdone == 1 Do
915 Set $index = (Add $index 1)
916 Set $id = (StrCopy $Config $index $index)
920 Set $TmpStyle = $TmpStyle $id
928 While $notdone == 1 Do
930 Set $index = (Add $index 1)
931 Set $id = (StrCopy $Config $index $index)
935 Set $TmpPixSize = $TmpPixSize $id
943 While $notdone == 1 Do
945 Set $index = (Add $index 1)
946 Set $id = (StrCopy $Config $index $index)
950 Set $TmpPtSize = $TmpPtSize $id
958 While $notdone == 1 Do
960 Set $index = (Add $index 1)
961 Set $id = (StrCopy $Config $index $index)
965 Set $TmpXRes = $TmpXRes $id
973 While $notdone == 1 Do
975 Set $index = (Add $index 1)
976 Set $id = (StrCopy $Config $index $index)
980 Set $TmpYRes = $TmpYRes $id
988 While $notdone == 1 Do
990 Set $index = (Add $index 1)
991 Set $id = (StrCopy $Config $index $index)
995 Set $TmpSpacing = $TmpSpacing $id
1002 Set $TmpAvgWidth = {}
1003 While $notdone == 1 Do
1005 Set $index = (Add $index 1)
1006 Set $id = (StrCopy $Config $index $index)
1010 Set $TmpAvgWidth = $TmpAvgWidth $id
1017 Set $TmpCharset = {}
1018 While $notdone == 1 Do
1020 Set $index = (Add $index 1)
1021 Set $id = (StrCopy $Config $index $index)
1025 Set $TmpCharset = $TmpCharset $id
1030 Set $index = (Add $index 1)
1031 Set $TmpScaleAdjust = (StrCopy $Config $index $index)
1032 Set $index = (Add $index 2)
1033 Set $HasNoMatch = (StrCopy $Config $index $index)
1034 Set $index = (Add $index 1)
1035 If $HasNoMatch == {1} Then
1037 Set $SetAllToNull = 1
1044 #---------------------------------------------------------------------
1045 If $SetFilterLists == 1 Then
1047 Set $SetFilterLists = 0
1049 Set $FilterFoundryList = $TmpFoundryList
1050 Set $FilterFoundryIndex = $TmpFoundryIndex
1051 ChangeTitle 311 $FilterFoundryList
1052 ChangeValue 311 $FilterFoundryIndex
1053 ChangeMinValue 311 $FilterFoundryIndex
1055 Set $FilterWeightList = $TmpWeightList
1056 Set $FilterWeightIndex = $TmpWeightIndex
1057 ChangeTitle 321 $FilterWeightList
1058 ChangeValue 321 $FilterWeightIndex
1060 Set $FilterSlantList = $TmpSlantList
1061 ChangeTitle 331 $FilterSlantList
1062 Set $FilterSlantIndex = $TmpSlantIndex
1063 ChangeValue 331 $FilterWeightIndex
1065 Set $FilterWidthList = $TmpWidthList
1066 ChangeTitle 341 $FilterWidthList
1067 Set $FilterWidthIndex = $TmpWidthIndex
1068 ChangeValue 341 $FilterWidthIndex
1070 #Set $FilterStyleList = $TmpStyleList
1071 #Set $FilterPixSizeList = $TmpPixSizeList
1072 #Set $FilterPtSizeList = $TmpPtSizeList
1074 Set $FilterXResList = $TmpXResList
1075 ChangeTitle 351 $FilterXResList
1076 Set $FilterXResIndex = $TmpXResIndex
1077 ChangeValue 351 $FilterXResIndex
1079 Set $FilterYResList = $TmpYResList
1080 ChangeTitle 361 $FilterYResList
1081 Set $FilterYResIndex = $TmpYResIndex
1082 ChangeValue 361 $FilterYResIndex
1084 Set $FilterSpacingList = $TmpSpacingList
1085 ChangeTitle 371 $FilterSpacingList
1086 Set $FilterSpacingIndex = $TmpSpacingIndex
1087 ChangeValue 371 $FilterSpacingIndex
1089 #Set $FilterAvgWidthList = $TmpAvgWidthList
1091 Set $FilterCharsetList = $TmpCharsetList
1092 ChangeTitle 381 $FilterCharsetList
1093 Set $FilterCharsetIndex = $TmpCharsetIndex
1094 ChangeValue 381 $FilterCharsetIndex
1095 ChangeMinValue 381 $FilterCharsetIndex
1099 # ----------------------------------------------------------------------
1100 If $SetAllToNull == 1 Then
1102 Set $SetAllToNull = 0
1103 Set $TmpFoundryIndex = 0
1104 Set $TmpFamilyIndex = 0
1105 Set $TmpWeightIndex = 0
1106 Set $TmpSlantIndex = 0
1107 Set $TmpWidthIndex = 0
1108 Set $TmpStyleIndex = 0
1109 Set $TmpPixSizeIndex = 0
1110 Set $TmpPtSizeIndex = 0
1111 Set $TmpXResIndex = 0
1112 Set $TmpYResIndex = 0
1113 Set $TmpSpacingIndex = 0
1114 Set $TmpAvgWidthIndex = 0
1115 Set $TmpCharsetIndex = 0
1116 Set $TmpFoundryList = {*}
1117 Set $TmpFamilyList = {*}
1118 Set $TmpWeightList = {*}
1119 Set $TmpSlantList = {*}
1120 Set $TmpWidthList = {*}
1121 Set $TmpStyleList = {*}
1122 Set $TmpPixSizeList = {*}
1123 Set $TmpPtSizeList = {*}
1124 Set $TmpXResList = {*}
1125 Set $TmpYResList = {*}
1126 Set $TmpSpacingList = {*}
1127 Set $TmpAvgWidthList = {*}
1128 Set $TmpCharsetList = {*-*}
1130 #---------------------------------------------------------------------
1131 If $SetAllLists == 1 Then
1133 Set $SetAllLists = 0
1135 Set $WeightList = $TmpWeightList
1136 ChangeTitle 31 $WeightList
1137 Set $WeightIndex = $TmpWeightIndex
1138 ChangeValue 31 $WeightIndex
1140 Set $SlantList = $TmpSlantList
1141 ChangeTitle 41 $SlantList
1142 Set $SlantIndex = $TmpSlantIndex
1143 ChangeValue 41 $SlantIndex
1145 Set $WidthList = $TmpWidthList
1146 ChangeTitle 51 $WidthList
1147 Set $WidthIndex = $TmpWidthIndex
1148 ChangeValue 51 $WidthIndex
1150 Set $StyleList = $TmpStyleList
1152 Set $PixSizeList = $TmpPixSizeList
1153 ChangeTitle 21 $PixSizeList
1154 Set $PixSizeIndex = $TmpPixSizeIndex
1155 ChangeValue 21 $PixSizeIndex
1157 Set $PtSizeList = $TmpPtSizeList
1158 Set $XResList = $TmpXResList
1159 Set $YResList = $TmpYResList
1161 Set $SpacingList = $TmpSpacingList
1162 ChangeTitle 36 $SpacingList
1163 Set $SpacingIndex = $TmpSpacingIndex
1164 ChangeValue 36 $SpacingIndex
1166 Set $AvgWidthList = $TmpAvgWidthList
1168 Set $CharsetList = $TmpCharsetList
1169 ChangeTitle 61 $CharsetList
1170 Set $CharsetIndex = $TmpCharsetIndex
1171 ChangeValue 61 $CharsetIndex
1173 If $FontIndex <> 0 Then
1175 Set $Foundry = $TmpFoundry
1176 Set $Family = $TmpFamily
1177 Set $Weight = $TmpWeight
1178 Set $Slant = $TmpSlant
1179 Set $Width = $TmpWidth
1180 Set $Style = $TmpStyle
1181 Set $PixSize = $TmpPixSize
1182 Set $PtSize = $TmpPtSize
1183 Set $XRes = $TmpXRes
1184 Set $YRes = $TmpYRes
1185 Set $Spacing = $TmpSpacing
1186 Set $AvgWidth = $TmpAvgWidth
1187 Set $Charset = $TmpCharset
1189 Set $ScaleAdjust = $TmpScaleAdjust
1190 If $ScaleAdjust == 2 Then
1192 ChangeTitle 95 $IsAdjustable
1196 ChangeTitle 95 $NotAdjustable
1201 #---------------------------------------------------------------------
1202 If $ChangeFont == 1 Then
1206 Set $TheFont = {-}$Foundry{-}$Family{-}$Weight{-}$Slant{-}$Width{-}$Style{-}$PixSize {-}$PtSize{-}$XRes{-}$YRes{-}$Spacing{-}$AvgWidth{-}$Charset
1208 ChangeTitle 2 $TheFont
1209 ChangeTitle 3 $TheFont
1212 While $tmp <> 115 Do
1214 ChangeFont $tmp $TheFont
1216 Set $tmp = (Add $tmp 1)
1219 If $PixSize < 13 Then
1221 If $PixSize < 25 Then
1226 If $PixSize < 37 Then
1231 If $PixSize < 51 Then
1243 If $BuildAgain == 1 Then
1246 Set $GetAllLists = 1
1252 #----------------------------------------------------------------------------
1254 #----------------------------------------------------------------------------
1256 # Title for selected fonts Launched
1259 Flags NoReliefString
1262 Title {Selected Fonts: }
1270 # The selected fonts not Lauched
1273 Font -*-fixed-medium-r-semicondensed-*-13-*
1274 Flags NoReliefString Hidden
1286 # the selected font launched
1289 Flags NoReliefString Hidden
1290 Font -*-fixed-medium-r-semicondensed-*-13-*
1302 # the selected font launched
1316 # ---------------------------- Fonts lists
1321 Flags NoReliefString
1337 Flags NoReliefString
1338 Font -*-fixed-medium-r-semicondensed-*-13-*
1342 Title {|||LOADING FONTS ...}
1347 Set $tmp = (GetValue 11)
1348 If $tmp <> $FontIndex Then
1350 Set $FontIndex = $tmp
1351 Set $GetAllLists = 1
1353 # For simplification conserve only the size
1365 #Set $AvgWidth = {*}
1366 #Set $Charset = {*-*}
1367 #Set $UpdateTheFont = 1
1368 #Set $BuildAgain = 1
1373 # ---------------------------- Font Parameters
1378 Flags NoReliefString
1393 Flags NoReliefString
1401 Set $tmpind = (Add (GetValue 21) -1)
1402 Set $cmd={perl -e '@l=split(/\s*\|\s*/,"}$PixSizeList{");$a=$l[}$tmpind{];print "$a\n"'}
1403 Set $tmp = (GetOutput $cmd 1 -1)
1404 If $tmp <> $PixSize Then
1407 Set $PixSizeIndex = $tmpind
1408 Set $LastChange = {PixSize}
1409 Set $UpdateTheFont = 1
1410 Set $GetAllLists = 1
1419 Flags NoReliefString
1433 Font -*-fixed-medium-r-semicondensed-*-13-*
1434 Flags NoReliefString
1442 Set $tmpind = (Add (GetValue 31) -1)
1443 Set $cmd={perl -e '@l=split(/\s*\|\s*/,"}$WeightList{");$a=$l[}$tmpind{];print "$a\n"'}
1444 Set $tmp = (GetOutput $cmd 1 -1)
1445 If $tmp <> $Weight Then
1448 Set $SizeIndex = $tmpind
1449 Set $LastChange = {Weight}
1450 Set $GetAllLists = 1
1452 Set $UpdateTheFont = 1
1460 Flags NoReliefString
1474 Font -*-fixed-medium-r-semicondensed-*-13-*
1475 Flags NoReliefString
1483 Set $tmpind = (Add (GetValue 36) -1)
1484 Set $cmd={perl -e '@l=split(/\s*\|\s*/,"}$SpacingList{");$a=$l[}$tmpind{];print "$a\n"'}
1485 Set $tmp = (GetOutput $cmd 1 -1)
1486 If $tmp <> $Spacing Then
1489 Set $SpacingIndex = $tmpind
1490 Set $LastChange = {Spacing}
1491 Set $GetAllLists = 1
1493 Set $UpdateTheFont = 1
1501 Flags NoReliefString
1515 Font -*-fixed-medium-r-semicondensed-*-13-*
1516 Flags NoReliefString
1524 Set $tmpind = (Add (GetValue 41) -1)
1525 Set $cmd={perl -e '@l=split(/\s*\|\s*/,"}$SlantList{");$a=$l[}$tmpind{];print "$a\n"'}
1526 Set $tmp = (GetOutput $cmd 1 -1)
1527 If $tmp <> $Slant Then
1530 Set $SizeIndex = $tmpind
1531 Set $LastChange = {Slant}
1532 Set $GetAllLists = 1
1534 Set $UpdateTheFont = 1
1542 Flags NoReliefString
1556 Font -*-fixed-medium-r-semicondensed-*-13-*
1557 Flags NoReliefString
1565 Set $tmpind = (Add (GetValue 51) -1)
1566 Set $cmd={perl -e '@l=split(/\s*\|\s*/,"}$WidthList{");$a=$l[}$tmpind{];print "$a\n"'}
1567 Set $tmp = (GetOutput $cmd 1 -1)
1568 If $tmp <> $Width Then
1571 Set $SizeIndex = $tmpind
1572 Set $LastChange = {Width}
1573 Set $GetAllLists = 1
1575 Set $UpdateTheFont = 1
1583 Flags NoReliefString
1597 Font -*-fixed-medium-r-semicondensed-*-13-*
1598 Flags NoReliefString
1606 Set $tmpind = (Add (GetValue 61) -1)
1607 Set $cmd={perl -e '@l=split(/\s*\|\s*/,"}$CharsetList{");$a=$l[}$tmpind{];print "$a\n"'}
1608 Set $tmp = (GetOutput $cmd 1 -1)
1609 If $tmp <> $Charset Then
1612 Set $SizeIndex = $tmpind
1613 Set $LastChange = {Charset}
1614 Set $GetAllLists = 1
1616 Set $UpdateTheFont = 1
1621 # ---------------------------- Info for the main window
1626 Flags NoReliefString
1637 # Button for More Info
1640 Flags NoReliefString
1651 If $TheFont <> $InfoFont Then
1653 Set $InfoFont = $TheFont
1654 Set $cmd = {fvwm-themes-script --font-info --font-current="}$TheFont{"}
1655 Set $Info = (GetOutput $cmd 1 -1)
1656 ChangeTitle 201 $Info
1657 ChangeMinValue 201 1
1663 # ---------------------------- Filter for the main window
1665 # Title for the filter
1668 Flags NoReliefString
1685 Font -*-fixed-medium-r-semicondensed-*-13-*
1686 Flags NoReliefString
1690 Title {-*-*-*-*-*-*-*-*-*-*-*-*-*-*}
1698 # ---------------------------- The Examples
1703 #Font -misc-fixed-medium-r-normal--12-*-*-*-*-*-iso10646-1
1704 # Font -adobe-utopia-bold-r-normal-*-13-*-*-*-p-*-*-*
1705 Font -adobe-*-bold-r-normal-*-13-*-*-*-p-*-*-*
1709 Title {abcdefghijk ABCDEFGHIJK éçà îë ÉÈÇÀÎË }
1720 #Font -misc-fixed-medium-r-normal--24-*-*-*-*-*-iso10646-1
1721 # Font -adobe-utopia-bold-r-normal-*-25-*-*-*-p-*-*-*
1722 Font -adobe-*-bold-r-normal-*-25-*-*-*-p-*-*-*
1727 Title {abcdefghijk ABCDEFGHIJK éçà îë ÉÈÇÀÎË}
1738 #Font -misc-fixed-medium-r-normal--36-*-*-*-*-*-iso10646-1
1739 # Font -adobe-utopia-bold-r-normal-*-36-*-*-*-p-*-*-*
1740 Font -adobe-*-bold-r-normal-*-36-*-*-*-p-*-*-*
1745 Title {abcdijk ABCDIJK éèçà îë ÀÉÇÎÊ}
1756 #Font -misc-fixed-medium-r-normal--50-*-*-*-*-*-iso10646-1
1757 # Font -adobe-utopia-bold-r-normal-*-50-*-*-*-p-*-*-*
1758 Font -adobe-*-bold-r-normal-*-50-*-*-*-p-*-*-*
1763 Title {abcijk ABCIJK éçà ÀÉÇ}
1774 #Font -misc-fixed-medium-r-normal--64-*-*-*-*-*-iso10646-1
1775 # Font -adobe-utopia-bold-r-normal-*-65-*-*-*-p-*-*-*
1776 Font -adobe-*-bold-r-normal-*-65-*-*-*-p-*-*-*
1781 Title {abijk ABIJK éç ÀÉ}
1789 #-----------------------------------------------------------------------------
1795 Flags NoReliefString Hidden
1799 Title {Obtained font:}
1810 Flags NoReliefString Hidden
1813 Font -*-fixed-medium-r-semicondensed-*-13-*
1826 Flags NoReliefString Hidden
1840 #-----------------------------------------------------------------------------
1846 Flags NoReliefString Hidden
1850 Title {Set your font filter:}
1859 # Title for Foundry Filter
1862 Flags NoReliefString Hidden
1873 # Popup for Foundry Filter
1878 Flags NoReliefString Hidden
1886 Set $tmpind = (Add (GetValue 311) -1)
1887 Set $cmd={perl -e '@l=split(/\s*\|\s*/,"}$FilterFoundryList{");$a=$l[}$tmpind{];print "$a\n"'}
1888 Set $tmp = (GetOutput $cmd 1 -1)
1889 If $tmp <> $FilterFoundry Then
1891 Set $FilterFoundry = $tmp
1892 Set $FilterFoundryIndex = $tmpind
1897 # Title for Weight Filter
1900 Flags NoReliefString Hidden
1911 # Popup for Weight Filter
1915 Flags NoReliefString Hidden
1923 Set $tmpind = (Add (GetValue 321) -1)
1924 Set $cmd={perl -e '@l=split(/\s*\|\s*/,"}$FilterWeightList{");$a=$l[}$tmpind{];print "$a\n"'}
1925 Set $tmp = (GetOutput $cmd 1 -1)
1926 If $tmp <> $FilterWeight Then
1928 Set $FilterWeight = $tmp
1929 Set $FilterWeightIndex = $tmpind
1934 # Title for Slant Filter
1937 Flags NoReliefString Hidden
1948 # Popup for Slant Filter
1952 Flags NoReliefString Hidden
1960 Set $tmpind = (Add (GetValue 331) -1)
1961 Set $cmd={perl -e '@l=split(/\s*\|\s*/,"}$FilterSlantList{");$a=$l[}$tmpind{];print "$a\n"'}
1962 Set $tmp = (GetOutput $cmd 1 -1)
1963 If $tmp <> $FilterSlant Then
1965 Set $FilterSlant = $tmp
1966 Set $FilterSlantIndex = $tmpind
1971 # Title for Width Filter
1974 Flags NoReliefString Hidden
1985 # Popup for Width Filter
1989 Flags NoReliefString Hidden
1997 Set $tmpind = (Add (GetValue 341) -1)
1998 Set $cmd={perl -e '@l=split(/\s*\|\s*/,"}$FilterWidthList{");$a=$l[}$tmpind{];print "$a\n"'}
1999 Set $tmp = (GetOutput $cmd 1 -1)
2000 If $tmp <> $FilterWidth Then
2002 Set $FilterWidth = $tmp
2003 Set $FilterWidthIndex = $tmpind
2008 # Title for XRes Filter
2011 Flags NoReliefString Hidden
2022 # Popup for XRes Filter
2026 Flags NoReliefString Hidden
2034 Set $tmpind = (Add (GetValue 351) -1)
2035 Set $cmd={perl -e '@l=split(/\s*\|\s*/,"}$FilterXResList{");$a=$l[}$tmpind{];print "$a\n"'}
2036 Set $tmp = (GetOutput $cmd 1 -1)
2037 If $tmp <> $FilterXRes Then
2039 Set $FilterXRes = $tmp
2040 Set $FilterXResIndex = $tmpind
2045 # Title for YRes Filter
2048 Flags NoReliefString Hidden
2059 # Popup for YRes Filter
2063 Flags NoReliefString Hidden
2071 Set $tmpind = (Add (GetValue 361) -1)
2072 Set $cmd={perl -e '@l=split(/\s*\|\s*/,"}$FilterYResList{");$a=$l[}$tmpind{];print "$a\n"'}
2073 Set $tmp = (GetOutput $cmd 1 -1)
2074 If $tmp <> $FilterYRes Then
2076 Set $FilterYRes = $tmp
2077 Set $FilterYResIndex = $tmpind
2082 # Title for Spacing Filter
2085 Flags NoReliefString Hidden
2096 # Popup for Spacing Filter
2100 Flags NoReliefString Hidden
2108 Set $tmpind = (Add (GetValue 371) -1)
2109 Set $cmd={perl -e '@l=split(/\s*\|\s*/,"}$FilterSpacingList{");$a=$l[}$tmpind{];print "$a\n"'}
2110 Set $tmp = (GetOutput $cmd 1 -1)
2111 If $tmp <> $FilterSpacing Then
2113 Set $FilterSpacing = $tmp
2114 Set $FilterSpacingIndex = $tmpind
2119 # Title for Charset Filter
2122 Flags NoReliefString Hidden
2133 # Popup for Charset Filter
2138 Flags NoReliefString Hidden
2146 Set $tmpind = (Add (GetValue 381) -1)
2147 Set $cmd={perl -e '@l=split(/\s*\|\s*/,"}$FilterCharsetList{");$a=$l[}$tmpind{];print "$a\n"'}
2148 Set $tmp = (GetOutput $cmd 1 -1)
2149 If $tmp <> $FilterCharset Then
2151 Set $FilterCharset = $tmp
2152 Set $FilterCharsetIndex = $tmpind
2162 Flags NoReliefString Hidden
2173 Set $tmp = {-}$FilterFoundry{-}$FilterFamily{-}$FilterWeight{-}$FilterSlant{-}$FilterWidth{-}$FilterStyle{-}$FilterPixSize{-}$FilterPtSize{-}$FilterXRes{-}$FilterYRes{-}$FilterSpacing{-}$FilterAvgWidth{-}$FilterCharset
2174 If $tmp <> $FontFilter Then
2176 Set $FontFilter = $tmp
2177 Set $GetFontListAndAll = 1
2185 #-----------------------------------------------------------------------------
2191 Flags NoReliefString
2200 If $Launched <> 0 Then
2202 SendToScript (GetScriptFather) $TheFont
2211 Flags NoReliefString
2220 Set $FontReset = { --font-reset}
2223 ChangeTitle 11 {||Reloading Fonts ...}
2232 Flags NoReliefString
2247 Flags NoReliefString
2256 If $Launched <> 0 Then
2257 SendToScript (GetScriptFather) {Cancel}