[cairo-bugs] [Bug 23364] Useless digits for float numbers in Cairo output

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Aug 18 04:23:21 PDT 2009


http://bugs.freedesktop.org/show_bug.cgi?id=23364


Adrian Johnson <ajohnson at redneon.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|major                       |normal
           Priority|high                        |medium




--- Comment #4 from Adrian Johnson <ajohnson at redneon.com>  2009-08-18 04:23:19 PST ---
I am reluctant to reduce the precision of the PDF backend my too much as some
people may require a higher precision for their workflow. Looking at PDFs
generated by Adobe Distiller for example I see they are using 3 decimal digits
for values in points. Some other PDFs are using more. So aiming to match the
precision of Distiller seams reasonable to me.

The Td operator specifies a relative change to the text position in text units.
The precision required depends in the font size. Assume a worst case of a 100
point font used anywhere on the page, two decimal places in addition to the 3
specified above is required two maintain precision. As it is a relative
adjustment, each time the Td operator is used the error accumulates. So allow
another digit as well bringing the total to 6 to digits that is currently used.

One option to reduce the number of decimals is to keep track of the error like
what is done with the TJ operator so that subsequent Td operations stay within
a tolerance.

In the case of rg/RG I see that Distiller is using 5 digits. I'll look into
adjusting this.

In both these cases the number of decimals does not contribute significantly to
the file size.


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the cairo-bugs mailing list