Commit 816ed14c authored by techird's avatar techird

bug fix

parent 4797a3b0
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
var FONT_ADJUST = { var FONT_ADJUST = {
'微软雅黑,Microsoft YaHei': -0.15, '微软雅黑,Microsoft YaHei': -0.15,
'arial black,avant garde': -0.17 'arial black,avant garde': -0.17,
'default': -0.15
}; };
var TextRenderer = KityMinder.TextRenderer = kity.createClass('TextRenderer', { var TextRenderer = KityMinder.TextRenderer = kity.createClass('TextRenderer', {
...@@ -23,7 +24,7 @@ var TextRenderer = KityMinder.TextRenderer = kity.createClass('TextRenderer', { ...@@ -23,7 +24,7 @@ var TextRenderer = KityMinder.TextRenderer = kity.createClass('TextRenderer', {
var lineHeight = node.getStyle('line-height'); var lineHeight = node.getStyle('line-height');
var fontSize = s('font-size'); var fontSize = s('font-size');
var fontFamily = node.getData('font-family'); var fontFamily = s('font-family') || 'default';
var height = (lineHeight * fontSize) * textArr.length - (lineHeight - 1) * fontSize; var height = (lineHeight * fontSize) * textArr.length - (lineHeight - 1) * fontSize;
var yStart = -height / 2; var yStart = -height / 2;
......
...@@ -9,7 +9,7 @@ html, body, div { ...@@ -9,7 +9,7 @@ html, body, div {
} }
body, svg { body, svg {
font-family: Arial, "Microsoft Yahei", "Heiti SC", sans-serif; font-family: "Microsoft Yahei", "Heiti SC", Arial, sans-serif;
} }
html, body { html, body {
......
...@@ -1282,7 +1282,7 @@ div { ...@@ -1282,7 +1282,7 @@ div {
} }
body, body,
svg { svg {
font-family: Arial, "Microsoft Yahei", "Heiti SC", sans-serif; font-family: "Microsoft Yahei", "Heiti SC", Arial, sans-serif;
} }
html, html,
body { body {
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment