parlr / ruby-font-creator

Generate rich Unicode open fonts with custom annotations, transliterations, pronunciations.
21 stars 3 forks source link
chinese font hanzi pinyin

Build Status Code Climate

Ruby Font Creator

Font creator to help students learn and read foreign languages faster by appending pronunciation or meaning to each glyph.

Features

languages preview state repository base-font
Chinese top βœ”οΈ hanzi-pinyin-font DroidSansFallbackFull
Tifinagh - πŸƒβ€ hanzi-pinyin-font DroidSansFallbackFull
:speaking_head: request new one - - - Please provide an open-source font

Legend: ⏸→ πŸƒβ€β†’ βœ”οΈ

Install

Requirements: nodejs, yarn or npm.

yarn install

Usage

Requirements: a JSON file describing codepoint-glyph-gloss tuple (e.g. src/data.json).

yarn build

Custom config:

yarn build --config ./src/config/default.js

Custom data:

yarn build --data ./path-to/data.json

Custom Font Name:

yarn build --font-name 'custom-font-name'

:information_source: maintenance tasks available are in the [makefile][./makefile], run make to see possible actions.

Data Structure

A list of objects, each describing a glyph, with the following 3 elements:

  1. a unicode codepoint ;
  2. a base glyph ;
  3. a ruby text.

Example:

[
  {
    "codepoint": "U+03B1",
    "glyph": "Ξ±",
    "ruby": "alpha"
  }
]

Font

This project use fonts under open-source licenses : DejaVuSans, DroidSansFallbackFull, Noto Sans CJK.

License

Apache License 2.0

Contributors