[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: gschem with cairo rendering



On Sat, 2008-05-03 at 00:59 +0000, Kai-Martin Knaak wrote:
> On Sat, 03 May 2008 00:15:54 +0100, Peter Clifton wrote:
> 
> > That's mostly due to text I'd expect, it seemed to be the major bottle
> > neck in my testing.
> 
> Wouldn't this improve dramatically if gschem used some kind of real fonts 
> instead of drawing every letter with little lines? If this is the case, 
> we may just have to wait until cairo supports glyphs and font stuff. 

Re-fetch, checkout and build the branch now..

It renders gschem's text with cairo's "toy" text API, and includes a
simple visibility check before redrawing, so we don't waste so much time
with offscreen objects. (It pre-clips in gschem, rather than just
clipping the drawn objects in cairo - it seemed to give an improvement
for me).

These is still a fairly gross bug in this code though.. cairo's "toy"
API doesn't handle carriage returns - multi-line text is broken. I need
to code to break the string up and handle those as separate lines (and
fix tabs, over-bars, etc...)

Pango would be a win for doing this kind of thing, and works with cairo
- but it doesn't yet lead neatly towards the support of gschem's own
font.

This said, if we were to make it into a .ttf o similar, we could
persuade pango / freetype to load it, and we wouldn't have to worry
about cairo's new custom font APIs at all.



-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)



_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user