1      subroutine gslss(ifonte)
2      INCLUDE 'Parametres.f'
3      character*132 lafonte,fontes(6*nfontes_de_base)
4      integer lfont(6*nfontes_de_base)
5      data fontes /
6     & '6x13','*-courier-bold-r-*-17-*-iso*',
7     & '*-times-bold-r-*-24-*-iso*','*-times-bold-r-*-18-*-iso*',
8     & 2*'*-times-bold-r-*-34-*-iso*','*-times-bold-r-*-14-*-iso*',
9     & '*-helvetica-medium-r-*-14-*-iso*'
10     &,'*-helvetica-medium-o-*-14-*-iso*'
11     & ,'5x8','7x14b*','9x15b*','*-helvetica-medium-r-*-12-*-iso*',
12     & '*-helvetica-medium-o-*-12-*-iso*',
13     & '*-helvetica-medium-r-*-10-*-iso*',
14     & '*-helvetica-medium-o-*-10-*-iso*','6x13'
15     &,'*-courier-bold-r-*-14-*'
16     & ,'*-times-*-r-*-24-*','*-times-*-r-*-18-*',
17     & 2*'*-times-*-r-*-34-*','*-times-*-r-*-14-*',
18     & '*-helvetica-*-r-*-14-*','*-helvetica-*-o-*-14-*',
19     & '5x8','7x14b*','9x15b*','*-helvetica-*-r-*-12-*',
20     & '*-helvetica-*-o-*-12-*','*-helvetica-*-r-*-10-*',
21     & '*-helvetica-*-o-*-10-*','6x13','9x15b*','12x24','10x20',
22     & 2*'12x24',3*'9x15b*','5x8','7x14b*','9x15b*',2*'7x14b*',3*'6x10',
23     & '*-courier-bold-r-*-12-*-iso*','*-times-bold-r-*-20-*-iso*',
24     & '*-times-bold-r-*-17-*-iso*',2*'*-times-bold-r-*-25-*-iso*',
25     & '*-times-bold-r-*-12-*-iso*','*-helvetica-medium-r-*-12-*-iso*',
26     & '*-helvetica-medium-o-*-12-*-iso*','5x7','7x13b*','8x13b*',
27     & '*-helvetica-medium-r-*-10-*-iso*',
28     & '*-helvetica-medium-o-*-10-*-iso*',
29     & '*-helvetica-medium-r-*-8-*-iso*',
30     & '*-helvetica-medium-o-*-8-*-iso*','6x10'
31     &,'*-courier-bold-r-*-12-*',
32     & '*-times-*-r-*-24-*', '*-times-*-r-*-18-*',
33     & 2*'*-times-*-r-*-34-*','*-times-*-r-*-12-*',
34     & '*-helvetica-*-r-*-12-*','*-helvetica-*-o-*-12-*',
35     & '5x7','7x13b*','8x13b*','*-helvetica-*-r-*-10-*',
36     & '*-helvetica-*-o-*-10-*','*-helvetica-*-r-*-8-*',
37     & '*-helvetica-*-o-*-8-*','6x10','9x15b*','12x24','10x20',
38     & 2*'12x24',3*'9x15b*','5x7','7x13b*','8x13b*',2*'7x13b*',2*'5x7'/
39      data lfont / 4,28,26,26,26,26,26,32,32,3,6,6,32,32,32,32 ,
40     &             4,23,18,18,18,18,18,22,22,3,6,6,22,22,22,22 ,
41     &             4, 6, 5, 5, 5, 5, 6, 6, 6,3,6,6, 6, 6, 4, 4 ,
42     &             4,28,26,26,26,26,26,32,32,3,6,6,32,32,31,31 ,
43     &             4,23,18,18,18,18,18,22,22,3,6,6,22,22,21,21 ,
44     &             4, 6, 5, 5, 5, 5, 6, 6, 6,3,6,6, 6, 6, 3, 3 /
45      save imagnif,iptifont
46c
47cc     & '*-courier-medium-r-*-12-*',
48cc     & '-adobe-courier-medium-r-normal--12-120-75-75-m-70-iso8859-1',
49cc     & '-adobe-courier-bold-r-normal--17-120-100-100-m-100-iso8859-1',
50cc     & '-adobe-times-bold-r-normal--24-240-75-75-p-132-iso8859-1',
51cc     & '-adobe-times-bold-r-normal--18-180-75-75-p-99-iso8859-1',
52cccc     '-misc-fixed-medium-r-normal--10-70-100-100-c-60-iso8859-1'
53cccc     '-adobe-courier-medium-r-normal--10-100-75-75-m-60-iso8859-1'
54cccc      -adobe-courier-medium-r-normal--11-80-100-100-m-60-iso8859-1
55cccc      -adobe-courier-medium-r-normal--12-120-75-75-m-70-iso8859-1
56
57      if (lapremierefois.eq.0.and.ipostscript.eq.1) then
58        imagnif = 0
59        if (nbpixx.le.1024.or.nbpixy.le.768) then
60          iptifont = 1 + 3*nfontes_de_base
61        else
62          iptifont = 1
63        endif
64        iiii = ifonte + iptifont
65        lafonte = fontes(iiii)(1:lfont(iiii))//char(0)
66        iopt = 1
67        call x11loadfont2(lafonte,iopt,irc)
68        if (irc.eq.0) then
69          if (albion) then
70            print*,'Font',ifonte,': '
71     &            ,lafonte(1:lfont(iiii)),' not found'
72          else
73            print*,'On n''a pas trouv� la fonte',ifonte,' : '
74     &            ,lafonte(1:lfont(iiii))
75          endif
76          iopt = 2
77          ii = iiii+nfontes_de_base
78          lafonte = fontes(ii)(1:lfont(ii))//char(0)
79          call x11loadfont2(lafonte,iopt,irc)
80          if (irc.eq.0) then
81            ii = ii+nfontes_de_base
82            iopt = 3
83            lafonte = fontes(ii)(1:lfont(ii))//char(0)
84            call x11loadfont2(lafonte,iopt,irc)
85            if (irc.eq.0) then
86              iopt = 4
87              lafonte = '*'//char(0)
88              call x11loadfont2(lafonte,iopt,irc)
89            endif
90          endif
91        endif
92        itrouve(iiii) = iopt-1
93        ifonte_courante = ifonte
94      else
95        if (ifonte.eq.ifonte_courante.and.ipostscript.eq.1) return
96        if (ifonte.lt.0.or.ifonte.gt.nfontes_de_base-1) then
97          iopt = 1
98        else
99          iopt = ifonte
100        endif
101        if (ipostscript.eq.1) then
102          ifonte_courante = iopt
103          iiii = iopt+iptifont
104          if (itrouve(iiii).eq.3) then
105            lafonte = '*'//char(0)
106          else
107            ii = iiii+nfontes_de_base*itrouve(iiii)
108            lafonte = fontes(ii)(1:lfont(ii))//char(0)
109          endif
110          iopt = 0
111          call x11loadfont2(lafonte,iopt,irc)
112          if (ifonte_courante.eq.5) then
113            fafont = 1./0.65
114            call x11magfont(fafont)
115            imagnif = 1
116          elseif (imagnif.ne.0) then
117            fafont = 1.
118            call x11magfont(fafont)
119            imagnif = 0
120          endif
121        else
122          iiii = ifonte_courante_ps
123          tttt = taille_texte
124          if (iopt.eq.0) then
125            ifonte_courante_ps = 4
126            taille_texte    = 0.25
127          elseif(iopt.eq.1) then
128            ifonte_courante_ps = 6
129            taille_texte    = 0.35
130          elseif (iopt.eq.2) then
131            ifonte_courante_ps = 8
132            taille_texte  = 0.65
133          elseif (iopt.eq.3) then
134            ifonte_courante_ps = 8
135            taille_texte  = 0.45
136          elseif(iopt.eq.4) then
137            ifonte_courante_ps = 8
138            taille_texte  = 1.
139          elseif(iopt.eq.5) then
140            ifonte_courante_ps = 8
141            taille_texte  = 1./0.65
142          elseif(iopt.eq.6) then
143            ifonte_courante_ps = 8
144            taille_texte  = 0.35
145          elseif(iopt.eq.7) then
146            ifonte_courante_ps = 25
147            taille_texte    = 0.35
148          elseif(iopt.eq.8) then
149            ifonte_courante_ps = 14
150            taille_texte    = 0.35
151          elseif(iopt.eq.9) then
152            ifonte_courante_ps = 4
153            taille_texte    = 0.15
154          endif
155          taille_xloc = max(taille_y*0.667,taille_x)
156          taille_yloc = max(taille_x*0.667,taille_y)
157          taille_texte = taille_texte*amin1(taille_xloc,taille_yloc)/19.
158cc          taille_texte = taille_texte*amin1(taille_x,taille_y)/19.
159          if (iiii.ne.ifonte_courante_ps.or.tttt.ne.taille_texte)
160     &    write(ilaser_file,1000) ifonte_courante_ps,angle_texte
161     &                           ,nint(taille_texte*1000.)
162c     &                           ,taille_texte
163 1000     format(i2,f6.2,i6,' lf')
164c 1000     format(i2,2f6.2,' lf')
165        endif
166      endif
167      end
168