Find the file "user.r" - this file contain all your user defined settings and will survive upgrades. (rebol.r won't - don't use it for your homebrewed stuff )
In windows7 I managed to find it in "C:\Users\elwis\AppData\Roaming\rebol", open it up and add these lines at the end of it:
set-default-font: func [
"sets default font for /View"
font-blk [block! word!] "block of font attributes"
][
system/standard/face/font: make system/standard/face/font font-blk
system/view/vid/vid-face/font: make system/view/vid/vid-face/font font-blk
foreach [w s] system/view/vid/vid-styles [s/font: make s/font font-blk]
]
Watch that linebreaks will you.
Now you can add the following to all your REBOL scripts and watch the joy of nice looking fonts.
set-default-font[name: "tahoma"style: nonesize: 12color: 0.0.0offset: 2x2space: 0x0align: 'centervalign: 'centershadow: none]
For example, this simple little script will now create a much nicer gui.
Rebol [Title: "Set variable"]set-default-font[name: "tahoma"style: nonesize: 12color: 0.0.0offset: 2x2space: 0x0align: 'centervalign: 'centershadow: none]view layout [f1: fieldbtn 100x25 "Display Variable" [t: f1/textf2/text: tshow f2]f2: field]
Over and out fellow developers
No comments:
Post a Comment