summaryrefslogtreecommitdiff
path: root/svgio
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2016-01-20 00:13:18 +0100
committerArmin Le Grand <Armin.Le.Grand@cib.de>2016-01-22 11:44:32 +0000
commit288d1f802d306dc741df60c029c50850e7e5fd6b (patch)
treebb550f4d70e0406f772ce1a146adaa2ceab21980 /svgio
parentfb509502995aea38e71bb189a8b9e7dc6e9d442b (diff)
tdf#97275 SVGIO: Change default PPI to 96 in svg import...
... thus default font size is 16px from now on. More information: https://gerrit.libreoffice.org/#/c/21542/ Change-Id: If19b5be08d57a9d630647b9ad51a4bb6956c70ed Reviewed-on: https://gerrit.libreoffice.org/21617 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
Diffstat (limited to 'svgio')
-rw-r--r--svgio/inc/svgio/svgreader/svgtools.hxx2
-rw-r--r--svgio/source/svgreader/svgstyleattributes.cxx5
2 files changed, 4 insertions, 3 deletions
diff --git a/svgio/inc/svgio/svgreader/svgtools.hxx b/svgio/inc/svgio/svgreader/svgtools.hxx
index 71fee9e63732..27b687f6f2eb 100644
--- a/svgio/inc/svgio/svgreader/svgtools.hxx
+++ b/svgio/inc/svgio/svgreader/svgtools.hxx
@@ -36,7 +36,7 @@ namespace svgio
#endif
// recommended value for this device dependent unit, see CSS2 section 4.3.2 Lengths
-#define F_SVG_PIXEL_PER_INCH 90.0
+#define F_SVG_PIXEL_PER_INCH 96.0
// common non-token strings
struct commonStrings
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx
index 171545d09e95..0bb05b4341d1 100644
--- a/svgio/source/svgreader/svgstyleattributes.cxx
+++ b/svgio/source/svgreader/svgstyleattributes.cxx
@@ -2337,8 +2337,9 @@ namespace svgio
return maFontSizeNumber;
}
- // default is 'medium'
- const double aDefaultSize = 12.0;
+ // default size is 'medium' or 16px, which is equal to the default PPI used in svgio ( 96.0 )
+ // converted to pixels
+ const double aDefaultSize = F_SVG_PIXEL_PER_INCH / 6.0;
//In CSS2, the suggested scaling factor between adjacent indexes is 1.2
switch(maFontSize)