discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

New libart/freetype-based backend


From: Alexander Malmberg
Subject: New libart/freetype-based backend
Date: Fri, 12 Apr 2002 18:25:01 +0200

Hi,

As an interesting experiment, I've written a new backend (as a part of
gnustep-back) based on libart (for most basic rendering) and freetype
(for fonts). Features are:

- Looks very good (antialiased bezier paths, antialiased fonts, alpha
support (not complete yet)).
- Good font character set handling.
- The rendering code is quite portable since it just renders to buffers.
Event/window handling and a way of getting the buffers to the screen is
all that is required for eg. a win32 backend.

Disadvantages are:
- It's slower than xgps (but still fast enough to use), and uses more
memory (double backing store: both the gsc/ stuff and the internal
buffer).
- Many things are still unimplemented. However, enough things are
implemented to run basic apps (LuserNET, GNUMail, EasyDiff, etc.).


A first version is now available at:

http://w1.423.telia.com/~u42308495/alex/backart/backart-0.0.tar.gz

(contains the new files and patches to use them). To use it, you'll need
libart (I've used the cvs version) and freetype (I've used v2.0.9). Fix
the freetype include path in back/Source/art/GNUmakefile.preamble, run
autoconf, configure with --enable-art and it should compile.

To use it, some fonts are necessary. There's a sample font configuration
file at:

http://w1.423.telia.com/~u42308495/alex/backart/backart.cfg

It should be in placed in ~/GNUstep/Library/Fonts/ . I've tested with
truetype (.ttf) and type1 (.pfa/.pfb) fonts. At least one font must be
available.


There are a bunch of screenshots in:

http://w1.423.telia.com/~u42308495/alex/backart/

Particularly interesting are:

backart9.png - font handling; I set mostCompatibleEncoding to utf8 and
decode the strings in DPSshow. freetype has no problems handling unicode

backarta.png - transparent antialiased bezier paths and rectangles.
shows what dps is capable of

backart_scale_[1-4].png - 1 and 2 were rendered 1.5 times larger than
they should be (using some really ugly temporary hacks in the backend).
hopefully this is what things will look like in the future when we all
have high resolution screens :) (dpi-wise). 3 and 4 are for comparison.
1 and 4 use hinted fonts, 2 and 3 use unhinted.


As always, feedback is nice!

- Alexander Malmberg




reply via email to

[Prev in Thread] Current Thread [Next in Thread]