[Kde-graphics-devel] Anyone there? Does anyone have ideas toimplement KPDF like zooming in Konqueror?

Dirk Schönberger dirk.schoenberger at sz-online.de
Tue Mar 1 23:20:12 CET 2005


> Everything i came up with is in that wish report, does anyone have an
> idea about implementing this? How does KPDF show the fonts?

I think the basic difference between PDF / KPDF and HTML / KHTML is that the
former is page based
while the other is "flow" based. If your document has a fixed page size,
i.e. e.g. "A4" in "logical" coordinates, you can scale
all other elements (graphic elements, text, images) in relation to this base
size. I.E. you scale the whole page with 120%.

KPDF / XPF uses this design and AFAIK it implements its own render engine,
based on the Postscript rendering model, where
each graphical element about to displayed is applied to a global
transformation matrix. Another implementation of this idea is the Qt4
rendering engine (Arthur).

By contrast, KHTML uses the normal Qt level QPainter, which uses a more
simple model based on non-scaled pixels (and displayed areas).
In this model you have to explicit scale each graphical element by itself,
which can lead to layout changes (graphical elments and images may contain
scaling errors, or they may be displayed suboptimal because of scaling
problems. For text output  you have to use scaled fonts (i.e. instead of
rendering a 16pt font at 125 percent you ask Qt for a font of 20pts. Scaled
fonts hae different font metrics, i.e. they scale not linearly.

> What about performance (smooth scaling?? GL?) ? And most important, do you
consider
> it a good idea? I for one think that it improves the usability if
> webpages behave more like real paper documents (which don't rerender if
> you look closer), but what do you other guys think?

I don't really think its a good idea. HTML was never designed to be a page
oriented medium, so most of the existing HTML documents don't assume this.
However, they assume to have a fixed pixel based window width or base
height, e.g. for naigation bars. This doesn'Ät mix well with a page based /
Postscript like approach.

Regards
Dirk




More information about the Kde-graphics-devel mailing list