[Officeshots] Pixelwise comparison of pdf files

Thomas Zander zander at kde.org
Sat Jun 25 23:16:42 CEST 2011


On Friday 24 June 2011 18.09.42 Milos Sramek wrote:
> Regarding the consistency:
> > The ODF standard does not require this consistency, but many expect it
> > anyway,
> 
> I do not understand. Does this mean that there is some level of
> variability allowed, in the sense of HTML, which allows to render
> differently in various environments?

ODF itself defines the data and it gives hints for representation.  The issue 
of consistency comes with text; ODF doesn't include the requirement of exact 
glyph positioning.
In practice each application will have a complete different codebase for 
reading fonts, merging fonts, applying hinting and rasterizing the fonts to 
an on-screen representation. This is not an exact science and little 
differences will occur.

When I say its not an exact science its also important to know that different 
font rendering engines have different goals.  For print LaTex is known to be 
the best one and that one is also extremely specific to only doing (slow) 
text layout for print.
I'm using Qts text rendering and have coded parts of that engine. Qts engine 
is also used for on-screen display and has to be really fast.  So accuracy 
may be scarified for speed.

So, in ODF we don't have a requirement that each line breaks at exactly the 
same point or that each page breaks at the same point either because if we 
did we would essentially not allow different text engines to be used.

Point of interest; you may have a chapter that is described in ODF. It has 
so many words and has a specific font and size etc.
In OOo that text may end up being 3 pages and 3 words.
In Latex the engine could have 3 pages and 3 lines too but then choose to go 
back over those 3 pages and adjust the inter-character spacing slightly on 
some lines.  The end result would be that the text fits in 3 pages.  Which 
would look a lot better :)

This kind of innovation is allowed in ODF just *because* we don't have the 
requirement.  As such I think its a good thing.
-- 
Thomas Zander


More information about the Officeshots mailing list