On Fri, 2008-08-15 at 14:49 +0200, Bernd Jendrissek wrote:
> On Fri, Aug 15, 2008 at 11:59 AM, Peter Clifton <[EMAIL PROTECTED]> wrote:
> > On Fri, 2008-08-15 at 10:42 +0200, Bernd Jendrissek wrote:
> >> I like the look of the text, but at some zoom levels the text seems to
> >> jump around.  Attached is a screenshot from multiline.sch.  In the
> >> other example the GPL escapes from the title box at some zoom levels.
> >
> > The screenshot you showed is a cairo bug I think. It only happens at
> > high zoom levels right?
> 
> That is correct - then fixes itself again when I zoom in further.  (In
> the instances that I tested.)

https://bugzilla.redhat.com/show_bug.cgi?id=448104

It depends on the length of glyph data sent to the X server. Some string
in big letters will trigger it, then IIRC, further zooming reduces the
on-screen string down such that it doesn't trigger anymore.

Bug was that the code hit a fallback for large X-requests, but the
backend driver (which inherited / re-purposed the original request's
glyph location data) had trampled over the original data, then the
fallback ran with corrupted data.

Short answer.. newer cairo will not exhibit the bug.

> > There will be some relative movement of text w.r.t the schematic with
> > zoom levels as pango will pick a font size which is nice to view, and
> > "near" the desired size - where the schematic is scaled exactly.
> 
> Ah, I thought it might have been something like that.  So pango is
> actually picking a different font depending on the on-screen size of
> the text?

Yes. Also, for speed, I ought to cache some selection of fonts at
different sizes.

> >> The GPL schematic disappears entirely (text and surrounding box) when
> >> I zoom out past a certain level.  It does reappear when I zoom back
> >> in.
> >
> > That might be because the width of the font is tiny. I don't think there
> > is anything I can do about that (other than check hinting is on
> > perhaps), as once the supposed width of the font outlines is less than
> > one pixel, cairo strokes them at reduced intensity to create that
> > illusion of reduced width.
> 
> To clarify: not just the text, but also the surrounding box and the
> line near the top of the box disappear.  They don't return at any
> out-er zoom level.

Ok, when other things disappear at the same time, that means cairo has
tripped it's surface into an error state for some reason. Since I don't
check error state anywhere, the drawing code doesn't recover and future
operations become NOP (until the next repaint which recreates the cairo
context).

It would be interesting to identify what part of the text causes things
to trip out. I wasn't able to reproduce that bug.

With vertucal jumping, Peter B suggested I take pango's output
line-by-line and override the line spacing, so lines are always
consistently spaced. Because the GPL text is long, and gschem's anchor
point is at the bottom, it is really noticable as the height changes.
Visually, it would be less annoying if that text was anchored at the
top. I could also futz with the hinting options, but that might produce
a less readable result.

-- 
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-dev mailing list
[email protected]
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev

Reply via email to