Home   Archive   Permalink



anti-aliasing for "normal" VID styles

By the way...
    
is there a possibility to switch on "anti-aliasing" for text display by "classical" VID styles (such as "text", "field" et al.)? Until now, I only know of the anti-aliasing setting in the DRAW dialect.
    
Aliased text looks like yesterday's technology!
    
Thanks in advance for any hints!
    
Kind regards,
    
Andreas Rozek

posted by:   Andreas Rozek       12-Jun-2010/0:52:44-7:00



As I know it is currently not possible. But if I'm not mistaken, Carl and the gurus are discussing this case on DevBase, so it may on next R2 release. (as I say, if I'm not mistaken..)

posted by:   Endo       12-Jun-2010/16:28:02-7:00



If you enter run the following code, and search for "anti-alias", you'll see how anti-aliasing is added to several styles:
    
     editor svv/vid-styles
    
Based on that, the following code should work, but it does not. It appears that anti-aliasing only works for graphic elements:
    
     view layout [
         text "Hello" font-size 50 effect [anti-alias]
     ]

posted by:   Nick       12-Jun-2010/16:44:35-7:00



REBOL 2 has two different drawing engines: One which is used for regular View/VID face elements and one called DRAW, which View can take advantage of in effects situations, where you need to draw something more detailed than boxes and straight gradients.
    
Since it has two drawing engines, it has also two separate font systems, one which does full anti-aliasing (DRAW) and one which does not (View), and it's the latter one you are looking for. Each engine has its own set of advantages and they don't overlap much, featurewise.
You will find that using DRAW to make text for buttons is quite hard, since DRAW doesn't use any font metrics, so you can for example, center the text properly. To do that, requires jumping through some hoops and perform some hacks and it eats memory and performance and it won't always work, so overall, getting anti-aliased text in your GUI is perhaps not worth the effort.
    
This is not a good design and thus in REBOL 3, only the DRAW engine is available, while bringing in features from the old View engine, such as proper text centering and simple metrics. Furthermore it adds proper rich text and soft shadows.
    
There is not a good chance that this will also be done for REBOL 2. It would be too much work. There are, however, systems like Maxim's GLASS, which uses DRAW to create the GUI, but it has not yet been released, and I don't really know how well it performs.

posted by:   Henrik       13-Jun-2010/7:07:22-7:00



Henrik,
    
thanks for this detailled explanation - I did not know that before (and thought VID would just be a layer on top of DRAW)
    
Thanks for your effort!

posted by:   Andreas Rozek       14-Jun-2010/23:45:51-7:00