[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 18:28:56 PDT 2009


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





--- Comment #5 from clark <wzhu at microstrategy.com>  2009-08-18 18:28:54 PST ---
(In reply to comment #4)
> 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.

Adrian, Thanks for reply.
I am thinking whether Cairo library can provide the interface for customizing
the number of digits.

Our app doesnot require such a high precision.We attach more importance on the
size of PDF file. As you can see from the attachment, the size can be reduced
by nearly 10%, if we can customize the number of digits.


-- 
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