Skip to content

Commit

Permalink
Add hard-coded optional glyphs
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgarthur committed Mar 20, 2023
1 parent 80d43fa commit 0bfda8b
Show file tree
Hide file tree
Showing 8 changed files with 707 additions and 6 deletions.
45 changes: 44 additions & 1 deletion dist/byzhtml.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/byzhtml.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/byzhtml.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/byzhtml.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/_media/byzhtml.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/_media/byzhtml.min.js.map

Large diffs are not rendered by default.

44 changes: 44 additions & 0 deletions lib/services/NeumeMappingService.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import glyphnames from '../../assets/fonts/sbmufl/glyphnames.json' assert { type: 'json' };
import byzhtml from '../byzhtml';

export class NeumeMappingService {
constructor() {
Expand All @@ -17,5 +18,48 @@ export class NeumeMappingService {
const codepoint = Number('0x' + data.codepoint.substring(2));
this.glyphNameToCodepointMap.set(glyph, String.fromCodePoint(codepoint));
}

// TODO hard-coding optional glyphs
// This is okay for now since Neanes is the only SBMuFL font

this.glyphNameToCodepointMap.set(
'oligonKentimataBelow.alt01',
String.fromCodePoint(0xf000),
);

this.glyphNameToCodepointMap.set(
'oligonKentimataAbove.alt01',
String.fromCodePoint(0xf001),
);

this.glyphNameToCodepointMap.set(
'antikenoma.alt01',
String.fromCodePoint(0xf002),
);

this.glyphNameToCodepointMap.set(
'modeFirst.salt01',
String.fromCodePoint(0xf003),
);

this.glyphNameToCodepointMap.set(
'modeFourth.salt01',
String.fromCodePoint(0xf004),
);

this.glyphNameToCodepointMap.set(
'oligonKentimataBelow.alt02',
String.fromCodePoint(0xf005),
);

this.glyphNameToCodepointMap.set(
'psifiston.salt01',
String.fromCodePoint(0xf006),
);

this.glyphNameToCodepointMap.set(
'heteronConnecting.salt01',
String.fromCodePoint(0xf007),
);
}
}
Loading

0 comments on commit 0bfda8b

Please # to comment.