From 30bcbe60b93a0e4a697871f69e8367476796f27c Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 18 Mar 2014 16:37:19 +0100 Subject: Implement our own vsnprintf variant. The primary motivator for this is so that we can print floating point values and get the full accuracy out, without having to print 1.5 as 1.5000000, and without getting 23e24 etc. We only support %c, %f, %d, %o, %x and %s currently. We only support the zero padding qualifier, for integers. We do support some extensions: %C turns values >=128 into UTF-8. %M prints a fz_matrix. %R prints a fz_rect. %P prints a fz_point. We also implement a fprintf variant on top of this to allow for consistent results when using fz_output. a --- source/pdf/pdf-appearance.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/pdf/pdf-appearance.c') diff --git a/source/pdf/pdf-appearance.c b/source/pdf/pdf-appearance.c index e1822331..2d1a6b54 100644 --- a/source/pdf/pdf-appearance.c +++ b/source/pdf/pdf-appearance.c @@ -56,7 +56,7 @@ static const char *fmt_q = "q\n"; static const char *fmt_W = "W\n"; static const char *fmt_n = "n\n"; static const char *fmt_BT = "BT\n"; -static const char *fmt_Tm = "%1.2f %1.2f %1.2f %1.2f %1.2f %1.2f Tm\n"; +static const char *fmt_Tm = "%f %f %f %f %f %f Tm\n"; static const char *fmt_Td = "%f %f Td\n"; static const char *fmt_Tj = " Tj\n"; static const char *fmt_ET = "ET\n"; -- cgit v1.2.3