We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d956b7 commit 7ed0a96Copy full SHA for 7ed0a96
benchmarks/run.js
@@ -64,6 +64,22 @@ function done (benchmark, times, start, isAsync) {
64
65
// node-canvas
66
67
+function fontName () {
68
+ return String.fromCharCode(0x61 + Math.floor(Math.random() * 26)) +
69
+ String.fromCharCode(0x61 + Math.floor(Math.random() * 26)) +
70
71
+ String.fromCharCode(0x61 + Math.floor(Math.random() * 26))
72
+}
73
+
74
+bm('font setter', function () {
75
+ ctx.font = `12px ${fontName()}`
76
+ ctx.font = `400 6px ${fontName()}`
77
+ ctx.font = `1px ${fontName()}`
78
+ ctx.font = `normal normal bold 12cm ${fontName()}`
79
+ ctx.font = `italic 9mm ${fontName}, "Times New Roman", "Apple Color Emoji", "Comic Sans"`
80
+ ctx.font = `small-caps oblique 44px/44px ${fontName()}, "The Quick Brown", "Fox Jumped", "Over", "The", "Lazy Dog"`
81
+})
82
83
bm('save/restore', function () {
84
for (let i = 0; i < 1000; i++) {
85
const max = i & 15
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments