From e6463ea8e9d9845fa3948dc1754ff089e1951137 Mon Sep 17 00:00:00 2001 From: Simon Chapman Date: Sat, 30 Jan 2021 21:29:04 +0000 Subject: [PATCH 1/2] montserrat --- packages/victory-core/src/victory-util/textsize.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/victory-core/src/victory-util/textsize.js b/packages/victory-core/src/victory-util/textsize.js index c406641c6..10291fee0 100644 --- a/packages/victory-core/src/victory-util/textsize.js +++ b/packages/victory-core/src/victory-util/textsize.js @@ -62,6 +62,10 @@ const fonts = { widths: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.2359375,0.2234375,0.3921875,0.7125,0.49375,0.8859375,0.771875,0.2125,0.3078125,0.309375,0.375,0.4234375,0.234375,0.3125,0.234375,0.3,0.5828125,0.365625,0.434375,0.3921875,0.5234375,0.3984375,0.5125,0.4328125,0.46875,0.5125,0.234375,0.234375,0.515625,0.4234375,0.515625,0.340625,0.7609375,0.7359375,0.6359375,0.721875,0.8125,0.6375,0.5875,0.8078125,0.853125,0.4296875,0.503125,0.78125,0.609375,0.9609375,0.8515625,0.8140625,0.6125,0.8140625,0.71875,0.49375,0.7125,0.76875,0.771875,1.125,0.7765625,0.7734375,0.65625,0.321875,0.3078125,0.321875,0.3546875,0.5,0.3375,0.446875,0.5359375,0.45,0.5296875,0.4546875,0.425,0.4921875,0.54375,0.2671875,0.240625,0.5390625,0.25,0.815625,0.5375,0.5234375,0.5390625,0.5421875,0.365625,0.36875,0.35625,0.5171875,0.5015625,0.75,0.5,0.509375,0.44375,0.2421875,0.14375,0.2421875,0.35], avg: 0.5116447368421051 }, + "Montserrat": { + widths = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.2625,0.2609375,0.3734375,0.696875,0.615625,0.8296875,0.6703125,0.203125,0.3296875,0.3296875,0.3875,0.575,0.2125,0.3828125,0.2125,0.3953125,0.6625,0.3625,0.56875,0.5640625,0.6625,0.5671875,0.609375,0.5890625,0.6390625,0.609375,0.2125,0.2125,0.575,0.575,0.575,0.5671875,1.034375,0.7171875,0.7546875,0.7203125,0.8265625,0.6703125,0.634375,0.7734375,0.8140625,0.303125,0.5078125,0.7125,0.5890625,0.95625,0.8140625,0.8390625,0.71875,0.8390625,0.7234375,0.615625,0.575,0.7921875,0.6984375,1.1125,0.65625,0.6359375,0.6515625,0.31875,0.396875,0.31875,0.5765625,0.5,0.6,0.590625,0.678125,0.5640625,0.678125,0.6046875,0.375,0.6875,0.678125,0.2703125,0.365625,0.6015625,0.2703125,1.0625,0.678125,0.628125,0.678125,0.678125,0.4015625,0.4890625,0.40625,0.6734375,0.5421875,0.8796875,0.534375,0.5671875,0.5125,0.334375,0.2953125,0.334375,0.575], + avg = 0.571792763157895 + }, monospace: { widths: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.5984375,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6078125,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.61875,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.615625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6140625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625], avg: 0.6020559210526316 From 9a20d57c111023867bbdf1a9f3b4835acd76f4d3 Mon Sep 17 00:00:00 2001 From: Simon Chapman Date: Mon, 1 Feb 2021 13:14:19 +0000 Subject: [PATCH 2/2] syntax fix --- packages/victory-core/src/victory-util/textsize.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/victory-core/src/victory-util/textsize.js b/packages/victory-core/src/victory-util/textsize.js index 10291fee0..b8d92e7f2 100644 --- a/packages/victory-core/src/victory-util/textsize.js +++ b/packages/victory-core/src/victory-util/textsize.js @@ -63,8 +63,8 @@ const fonts = { avg: 0.5116447368421051 }, "Montserrat": { - widths = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.2625,0.2609375,0.3734375,0.696875,0.615625,0.8296875,0.6703125,0.203125,0.3296875,0.3296875,0.3875,0.575,0.2125,0.3828125,0.2125,0.3953125,0.6625,0.3625,0.56875,0.5640625,0.6625,0.5671875,0.609375,0.5890625,0.6390625,0.609375,0.2125,0.2125,0.575,0.575,0.575,0.5671875,1.034375,0.7171875,0.7546875,0.7203125,0.8265625,0.6703125,0.634375,0.7734375,0.8140625,0.303125,0.5078125,0.7125,0.5890625,0.95625,0.8140625,0.8390625,0.71875,0.8390625,0.7234375,0.615625,0.575,0.7921875,0.6984375,1.1125,0.65625,0.6359375,0.6515625,0.31875,0.396875,0.31875,0.5765625,0.5,0.6,0.590625,0.678125,0.5640625,0.678125,0.6046875,0.375,0.6875,0.678125,0.2703125,0.365625,0.6015625,0.2703125,1.0625,0.678125,0.628125,0.678125,0.678125,0.4015625,0.4890625,0.40625,0.6734375,0.5421875,0.8796875,0.534375,0.5671875,0.5125,0.334375,0.2953125,0.334375,0.575], - avg = 0.571792763157895 + widths: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.2625,0.2609375,0.3734375,0.696875,0.615625,0.8296875,0.6703125,0.203125,0.3296875,0.3296875,0.3875,0.575,0.2125,0.3828125,0.2125,0.3953125,0.6625,0.3625,0.56875,0.5640625,0.6625,0.5671875,0.609375,0.5890625,0.6390625,0.609375,0.2125,0.2125,0.575,0.575,0.575,0.5671875,1.034375,0.7171875,0.7546875,0.7203125,0.8265625,0.6703125,0.634375,0.7734375,0.8140625,0.303125,0.5078125,0.7125,0.5890625,0.95625,0.8140625,0.8390625,0.71875,0.8390625,0.7234375,0.615625,0.575,0.7921875,0.6984375,1.1125,0.65625,0.6359375,0.6515625,0.31875,0.396875,0.31875,0.5765625,0.5,0.6,0.590625,0.678125,0.5640625,0.678125,0.6046875,0.375,0.6875,0.678125,0.2703125,0.365625,0.6015625,0.2703125,1.0625,0.678125,0.628125,0.678125,0.678125,0.4015625,0.4890625,0.40625,0.6734375,0.5421875,0.8796875,0.534375,0.5671875,0.5125,0.334375,0.2953125,0.334375,0.575], + avg: 0.571792763157895 }, monospace: { widths: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.5984375,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6078125,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.61875,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.615625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6140625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625,0.6015625],