From 69a40866f37420adbeaf684e9be2f6d194c8ac88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Lomi=C4=8D?= Date: Fri, 4 Sep 2015 21:09:31 +0200 Subject: [PATCH] Bug: getFont() returns wrong font-style version of font. Repaired --- dev/raphael.core.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/raphael.core.js b/dev/raphael.core.js index 13bcc71a..981cc7d0 100644 --- a/dev/raphael.core.js +++ b/dev/raphael.core.js @@ -5168,11 +5168,11 @@ var thefont; if (font) { for (var i = 0, ii = font.length; i < ii; i++) { - thefont = font[i]; - if (thefont.face["font-weight"] == weight && (thefont.face["font-style"] == style || !thefont.face["font-style"]) && thefont.face["font-stretch"] == stretch) { - break; + if (font[i].face["font-weight"] == weight && (font[i].face["font-style"] == style || !font[i].face["font-style"] && style=="normal") && font[i].face["font-stretch"] == stretch) { + thefont = font[i]; } } + if (!thefont) thefont = font[0]; } return thefont; };