summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--svgio/source/svgreader/svgstyleattributes.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx
index 0bb05b4341d1..3e3fa0091378 100644
--- a/svgio/source/svgreader/svgstyleattributes.cxx
+++ b/svgio/source/svgreader/svgstyleattributes.cxx
@@ -2314,6 +2314,10 @@ namespace svgio
SvgNumber SvgStyleAttributes::getFontSizeNumber() const
{
+ // 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;
+
if(maFontSizeNumber.isSet())
{
// #122524# Handle Unit_percent realtive to parent FontSize (see SVG1.1
@@ -2332,15 +2336,15 @@ namespace svgio
aParentNumber.getUnit(),
true);
}
+ // if there's no parent style, set the font size based on the default size
+ // 100% = 16px
+ return SvgNumber(
+ maFontSizeNumber.getNumber() * aDefaultSize / 100.0, Unit_px, true);
}
return maFontSizeNumber;
}
- // 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)
{