Chiroyce1 / ScratchFontCreationTool

Effortlessly create costumes and kerning/widths values for stamp/clone text engines on Scratch.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ScratchFontCreationTool

image Effortlessly create costumes and kerning/widths values for stamp/clone text engines on Scratch.

Installation

Download a release for your operating system, place a font file beside the executable, and run from the command line.

Run with .\FontCreationTool.exe

Run with chmod +x FontCreationTool; ./FontCreationTool

Run chmod +x FontCreationTool

Go to System Preferences → Security & Privacy and allow FontCreationTool.

Finally, run ./FontCreationTool

Run with chmod +x FontCreationTool

Go to System Preferences → Security & Privacy and allow FontCreationTool.

Finally, run ./FontCreationTool

Usage

The app generates all the costumes for every character of the charset provided.

The kerning list stores how much each character has to move by based on the character before it, so there are a total of n×n combinations for each of the possible n×n character combination pairs.

You can access the kerning/width values by using this algorithm: (item ((previousChar-1)×n+currentChar) of kerning)×size where n is the length of the charset, previousChar and currentChar are the costume numbers of the previous and current character, and size is the size of the text. Note that you would have to adjust these values if the costumes don't start from the beginning.

Dependencies

ScratchFontCreationTool wouldn't have been possible without these Node.js packages:

  • opentype.js
  • prompts
  • pkg

Build

  1. Install Node.js from https://nodejs.org/
  2. Install dependencies using: npm install
  3. Build using: npm run build

To-do

  1. Generate entire sprites rather than costumes
  2. Replace the CLI with a web app

About

Effortlessly create costumes and kerning/widths values for stamp/clone text engines on Scratch.


Languages

Language:JavaScript 100.0%