Skip to content

Commit

Permalink
Gloss é
Browse files Browse the repository at this point in the history
  • Loading branch information
lynn committed Aug 14, 2023
1 parent 14d47de commit 06582de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/gloss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function glossPrefix(prefix: string): string {
return (entry.gloss_abbreviation || entry.gloss) + '-';
}

// hack
// hacky fallback for unknown prefixes: gloss them as if they were words
const rootEntry = dictionary.get(prefix);
if (rootEntry) {
return (rootEntry.gloss_abbreviation || rootEntry.gloss) + '-';
Expand All @@ -66,6 +66,9 @@ function glossRoot(root: string): string {
if (entry) {
return entry.gloss_abbreviation || entry.gloss;
}
if (clean(root) === 'é') {
return 'the\\EVA';
}
const bareRoot = bare(root);
const bareEntry = dictionary.get(bareRoot);
if (bareEntry) {
Expand Down
4 changes: 2 additions & 2 deletions src/png-gloss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export function pngGlossSentence(sentence: string): Buffer {
const yMargin = 20;
let x = xMargin;
let y = yMargin;
const toaqFont = 'bold 20pt Segoe UI';
const englishFont = 'italic 18pt Segoe UI';
const toaqFont = 'bold 20pt Noto Sans';
const englishFont = 'italic 18pt Noto Sans';
let clipWidth = 0;

for (const { toaq, english } of glossSentence(sentence.slice(0, 1000))) {
Expand Down

0 comments on commit 06582de

Please sign in to comment.