Quote font names with spaces

This commit is contained in:
Tim Schaub
2017-10-14 12:30:27 -06:00
committed by Andreas Hocevar
parent a80458f2c3
commit 06728ab0fa
2 changed files with 7 additions and 7 deletions

View File

@@ -97,7 +97,7 @@ var createTextStyle = function(feature, resolution, dom) {
var maxAngle = dom.maxangle ? parseFloat(dom.maxangle.value) : undefined;
var exceedLength = dom.exceedlength ? (dom.exceedlength.value == 'true') : undefined;
var rotation = parseFloat(dom.rotation.value);
if (dom.font.value == 'Open Sans' && !openSansAdded) {
if (dom.font.value == '\'Open Sans\'' && !openSansAdded) {
var openSans = document.createElement('link');
openSans.href = 'https://fonts.googleapis.com/css?family=Open+Sans';
openSans.rel = 'stylesheet';