Skip to content

Commit f3fe518

Browse files
author
Lauren McCarthy
committed
Merge branch 'master' of github.com:processing/p5.js
2 parents d100d08 + 54bad27 commit f3fe518

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/core/environment.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ p5.prototype.cursor = function(type, x, y) {
170170
// https://developer.mozilla.org/en-US/docs/Web/CSS/cursor
171171
coords = x + ' ' + y;
172172
}
173-
if (type.substring(0, 6) !== 'http://') {
173+
if ((type.substring(0, 7) === 'http://') ||
174+
(type.substring(0, 8) === 'https://')) {
174175
// Image (absolute url)
175176
cursor = 'url(' + type + ') ' + coords + ', auto';
176177
} else if (/\.(cur|jpg|jpeg|gif|png|CUR|JPG|JPEG|GIF|PNG)$/.test(type)) {

src/typography/p5.Font.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ p5.Font.prototype.textBounds = function(str, x, y, fontSize, options) {
126126

127127
var gm = glyph.getMetrics();
128128

129-
if (glyph.name !== 'space') {
129+
if (glyph.name !== 'space' && glyph.unicode !== 32) {
130130

131131
xCoords.push(gX + (gm.xMax * scale));
132132
yCoords.push(gY + (-gm.yMin * scale));

0 commit comments

Comments
 (0)