home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-04-08 | 1.8 KB | 40 lines | [TEXT/ToyS] |
- property fontSizes : [9, 10, 12, 14, 18, 24, 36, 48]
- property fontDlog : {size:[260, 230], contents:[¬
- {class:push button, bounds:[190, 200, 250, 220], name:"OK"}, ¬
- {class:push button, bounds:[110, 200, 170, 220], name:"Cancel"}, ¬
- {class:pop up, name:"Font:", bounds:[7, 10, 250, 30], contents:"FONT"}, ¬
- {class:pop up, name:"Size: ", bounds:[7, 35, 150, 55], contents:fontSizes}, ¬
- {class:static text, bounds:[10, 60, 50, 76], contents:"Style:"}, ¬
- {class:check box, name:"Plain", bounds:[60, 60, 150, 76], value:true}, ¬
- {class:check box, name:"Bold", bounds:[60, 76, 150, 92], enabled:-6}, ¬
- {class:check box, name:"Italic", bounds:[60, 92, 150, 108], enabled:-6}, ¬
- {class:check box, name:"Underline", bounds:[60, 108, 150, 124], enabled:-6}, ¬
- {class:check box, name:"Outline", bounds:[60, 124, 150, 140], enabled:-6}, ¬
- {class:check box, name:"Shadow", bounds:[60, 140, 150, 156], enabled:-6}, ¬
- {class:check box, name:"Condensed", bounds:[60, 156, 150, 172], enabled:-6}, ¬
- {class:check box, name:"Extended", bounds:[60, 172, 150, 188], enabled:-6} ¬
- ], style:movable modal, name:"Font"} --, font:{name:"Truth"}}
-
- on GetFontSpec()
- set f to dd auto dialog fontDlog --with greyscale
- tell f
- set styl to []
- if not item 6 then
- if item 7 then set styl to styl & bold
- if item 8 then set styl to styl & italic
- if item 9 then set styl to styl & underline
- if item 10 then set styl to styl & outline
- if item 11 then set styl to styl & shadow
- if item 12 then set styl to styl & condensed
- if item 13 then set styl to styl & expanded
- end if
- if styl = [] then
- set styl to plain
- else if length of styl = 1 then
- set styl to item 1 of styl
- end if
- return {name:item 3, size:fontSizes's item (item 4), style:styl}
- end tell
- end GetFontSpec
-
- GetFontSpec()