From cec9d08d6104112b926ecd563d223ba67111f28c Mon Sep 17 00:00:00 2001 From: Nico Rehwaldt Date: Thu, 28 Jun 2018 09:47:22 +0200 Subject: [PATCH] fix(draw): revert to Arial as default font This partially reverts commit 891cf4ac0cd262295e4bfbf99cf8ac67ece3d851 which set `sans-serif` as the default font. Setting it back to Arial solves SVG export and rendering issues, especially on platforms (Windows, Mac) where the default font metrics differ highly from Arial. NOTE: The font can still be easily overriden if integrators wish to do so in order to give their users a more native look and feel. Closes #819 --- lib/draw/TextRenderer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/draw/TextRenderer.js b/lib/draw/TextRenderer.js index 8df3c58b..8d1fe0d3 100644 --- a/lib/draw/TextRenderer.js +++ b/lib/draw/TextRenderer.js @@ -11,7 +11,7 @@ var MIN_TEXT_ANNOTATION_HEIGHT = 30; export default function TextRenderer(config) { var defaultStyle = assign({ - fontFamily: 'sans-serif', + fontFamily: 'Arial, sans-serif', fontSize: DEFAULT_FONT_SIZE, fontWeight: 'normal', lineHeight: LINE_HEIGHT_RATIO