fixes font problem on El Capitan OS X

This commit is contained in:
Jeena 2015-10-14 19:26:45 +02:00
parent 342b1d6a3d
commit edb4f914ab

View file

@ -56,7 +56,9 @@ Item {
function setDefaults() {
// font name needs to be enclosed in single quotes
runJavaScript("document.body.style.fontFamily = \"'" + fontLabel.font.family + "'\";");
// and this is needed for El Capitain because ".SF NS Text" won't work
var defFont = ', system, -apple-system, ".SFNSDisplay-Regular", "Helvetica Neue", "Lucida Grande"';
runJavaScript("document.body.style.fontFamily = \"'" + fontLabel.font.family + "'" + defFont + "\";");
runJavaScript("document.body.style.fontSize = '" + content.textFontSize + "pt';");
}