Skip to content

Commit ed63a2c

Browse files
committed
Fixes the font icons for Apple devices
1 parent ddae8e3 commit ed63a2c

File tree

1 file changed

+41
-9
lines changed

1 file changed

+41
-9
lines changed

js/blocks/RhythmBlockPaletteBlocks.js

Lines changed: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,15 @@ function setupRhythmBlockPaletteBlocks(activity) {
277277
* Constructs a SixtyFourthNoteBlock.
278278
*/
279279
constructor() {
280-
super("sixtyfourthNote", _("1/64 note") + " 𝅘𝅥𝅱");
280+
if (isAppleBrowser()) {
281+
super("sixtyfourthNote", _("1/64 note"));
282+
// Custom generator only needed for Apple devices
283+
this.appleNoteBlock();
284+
} else {
285+
// TRANS: Do not modify the following line
286+
super("sixtyfourthNote", _("1/64 note") + " 𝅘𝅥𝅱");
287+
}
288+
281289
this.setPalette(rhythmBlockPalette, activity);
282290
this.setHelpString();
283291
this.makeMacro((x, y) => [
@@ -300,8 +308,14 @@ function setupRhythmBlockPaletteBlocks(activity) {
300308
* Constructs a ThirtySecondNoteBlock instance.
301309
*/
302310
constructor() {
303-
// TRANS: Do not modify the following line
304-
super("thirtysecondNote", _("1/32 note") + " 𝅘𝅥𝅰");
311+
if (isAppleBrowser()) {
312+
super("thirtysecondNote", _("1/32 note"));
313+
// Custom generator only needed for Apple devices
314+
this.appleNoteBlock();
315+
} else {
316+
// TRANS: Do not modify the following line
317+
super("thirtysecondNote", _("1/32 note") + " 𝅘𝅥𝅰");
318+
}
305319

306320
// Set the palette and activity for the block
307321
this.setPalette(rhythmBlockPalette, activity);
@@ -328,8 +342,14 @@ function setupRhythmBlockPaletteBlocks(activity) {
328342
* Constructs a SixteenthNoteBlock instance.
329343
*/
330344
constructor() {
331-
// TRANS: Do not modify the following line
332-
super("sixteenthNote", _("1/16 note") + " 𝅘𝅥𝅯");
345+
if (isAppleBrowser()) {
346+
super("sixteenthNote", _("1/16 note"));
347+
// Custom generator only needed for Apple devices
348+
this.appleNoteBlock();
349+
} else {
350+
// TRANS: Do not modify the following line
351+
super("sixteenthNote", _("1/16 note") + " 𝅘𝅥𝅯");
352+
}
333353

334354
// Set the palette and activity for the block
335355
this.setPalette(rhythmBlockPalette, activity);
@@ -412,8 +432,14 @@ function setupRhythmBlockPaletteBlocks(activity) {
412432
* Constructs a HalfNoteBlock instance.
413433
*/
414434
constructor() {
415-
// TRANS: Do not modify the following line
416-
super("halfNote", _("half note") + " 𝅗𝅥");
435+
if (isAppleBrowser()) {
436+
super("halfNote", _("half note"));
437+
// Custom generator only needed for Apple devices
438+
this.appleNoteBlock();
439+
} else {
440+
// TRANS: Do not modify the following line
441+
super("halfNote", _("half note") + " 𝅗𝅥");
442+
}
417443

418444
// Set the palette and activity for the block
419445
this.setPalette(rhythmBlockPalette, activity);
@@ -440,8 +466,14 @@ function setupRhythmBlockPaletteBlocks(activity) {
440466
* Constructs a WholeNoteBlock instance.
441467
*/
442468
constructor() {
443-
// TRANS: Do not modify the following line
444-
super("wholeNote", _("whole note") + " 𝅝");
469+
if (isAppleBrowser()) {
470+
super("wholeNote", _("whole note"));
471+
// Custom generator only needed for Apple devices
472+
this.appleNoteBlock();
473+
} else {
474+
// TRANS: Do not modify the following line
475+
super("wholeNote", _("whole note") + " 𝅝");
476+
}
445477

446478
// Set the palette and activity for the block
447479
this.setPalette(rhythmBlockPalette, activity);

0 commit comments

Comments
 (0)