[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: gEDA-user: gschem with cairo rendering
On Sun, 2008-05-04 at 15:22 +0000, Kai-Martin Knaak wrote:
> On Sat, 03 May 2008 15:10:14 +0100, Peter Clifton wrote:
>
> > Yes, that's exactly the right diagnosis. Cairo supports glyphs and
> > fonts, just not ones defined at run-time by the user of its API. (IE.
> > gschem can't yet describe to cairo what it thinks the various glyphs
> > should look like),
>
> I couldn't care less for the font currently used by gschem. It is just
> plain ugly when zoomed in. If it were replaced by a real font, the only
> important property is a compatible font metrics.
I think gschem's font is a little larger than its metrics claim. Ales
can correct me if I'm wrong, but I believe the code defines a 2pt font
as 26 mils high. (That matches roughly the "real" conversion factor of
27.7778). I've tried either, but the "Sans" font on my system
consistently comes out smaller than the gschem font.
Looking at its metrics (dig into gschem/src/o_text.c and change the
#undef DEBUG_TEXT #define DEBUG_TEXT), I see that its ascent and height
are quite large compared to the size of the glyphs I'm actually seeing.
BTW.. Please take a play and see what fonts you like. Search for "Sans"
in o_text.c.
> > Unfortunately, the glyph caching won't help with zoom either, since the
> > first time you render a glyph at a given size, it will be slow.
>
> A glyph like "a" is reused many times on a view with lots of text. So it
> has to be rendered only once and can be copied for the rest of the
> instances. I'd expect glyph caching to help in this situation. If the
> current view contains only little text, speed is no issue in the first
> place.
Yes, it helps lots over the case where I was rendering text using lines
(old code, converted to cairo lines). The main thing is that you have up
to 26 x 2 + (extras) glyphs to render for each size you zoom to. That
can take time a noticable time, and is one of the things limiting the
zoom frame-rate.
Best wishes,
--
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