Skip to content

Commit 92c0928

Browse files
committed
Fix bug after renamed variable
1 parent be90be8 commit 92c0928

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/type/p5.Font.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ function font(p5, fn) {
823823
// load the raw font bytes
824824
let result = pathOrData instanceof Uint8Array
825825
? pathOrData
826-
: await fn.loadBytes(path);
826+
: await fn.loadBytes(pathOrData);
827827
//console.log('result:', result);
828828

829829
if (!result) {
@@ -1047,7 +1047,7 @@ function font(p5, fn) {
10471047
const fontData = await fn.parseFontData(path);
10481048

10491049
// make sure we have a valid name
1050-
name = name || extractFontName(font, path);
1050+
name = name || extractFontName(fontData, path);
10511051

10521052
// create a FontFace object and pass it to the p5.Font constructor
10531053
pfont = await create(this, name, path, descriptors, fontData);

0 commit comments

Comments
 (0)