-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add major improvements to the importer
* Add items previouly elided due to name conflicts (e.g. UpButton2) * Add group and subgroup properties to `SingleEmoji` (see #7) * Automate code generation (supporting both web and headless node)
- Loading branch information
Showing
10 changed files
with
27,974 additions
and
16,877 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
const fs = require("fs").promises; | ||
const path = require("path"); | ||
const fontkit = require("fontkit"); | ||
const importer = require("./importer.js"); | ||
|
||
const codeRoot = "../unicode"; | ||
(async function() { | ||
let text = await fs.readFile("emoji-test.txt", { encoding: "utf-8" }); | ||
let font = fontkit.create(await fs.readFile("seguiemj.ttf")); | ||
|
||
let generator = new importer.CodeGenerator(font, text); | ||
|
||
let code = generator.generate(); | ||
|
||
await fs.writeFile(codeRoot + "/Emoji-Emojis.cs", code.emoji, { encoding: "utf-8" }); | ||
await fs.writeFile(codeRoot + "/Emoji-All.cs", code.lists.all, { encoding: "utf-8" }); | ||
await fs.writeFile(codeRoot + "/Emoji-Basic.cs", code.lists.basic, { encoding: "utf-8" }); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "importers", | ||
"version": "1.0.0", | ||
"main": "index.js", | ||
"license": "MIT", | ||
"dependencies": { | ||
"fontkit": "^1.8.0" | ||
} | ||
} |
Oops, something went wrong.