All Projects → FontStruct → Fonthx

FontStruct / Fonthx

Licence: mit
Font File Generation in Haxe

Programming Languages

haxe
709 projects

Projects that are alternatives of or similar to Fonthx

chiron-sans-hk
昭源黑體:現代筆形風格,平衡標準字形和印刷體慣用筆形的免費開源黑體字型
Stars: ✭ 131 (+104.69%)
Mutual labels:  font, opentype
rapid-arrows-font
OTF comic font
Stars: ✭ 30 (-53.12%)
Mutual labels:  font, opentype
font-v
Font version string reporting and modification library + executable tool
Stars: ✭ 15 (-76.56%)
Mutual labels:  font, opentype
perplexed
OTF monospace typeface, a derivative of IBM Plex Mono with Powerline glyphs added
Stars: ✭ 23 (-64.06%)
Mutual labels:  font, opentype
Libertinus
The Libertinus font family
Stars: ✭ 518 (+709.38%)
Mutual labels:  font, opentype
fdiff
An OpenType table diff tool for fonts. Based on the fontTools TTX format.
Stars: ✭ 33 (-48.44%)
Mutual labels:  font, opentype
bitsnpicas
Bits'N'Picas - Bitmap & Emoji Font Creation & Conversion Tools
Stars: ✭ 171 (+167.19%)
Mutual labels:  font, opentype
Fonts
✒️ Font loading and drawing library.
Stars: ✭ 135 (+110.94%)
Mutual labels:  font, opentype
Fontdue
The fastest font renderer in the world, written in pure rust.
Stars: ✭ 499 (+679.69%)
Mutual labels:  font, opentype
Opentype.js
Read and write OpenType fonts using JavaScript.
Stars: ✭ 3,393 (+5201.56%)
Mutual labels:  font, opentype
punk-otf
Punk Nova - an OpenType implementation of Donald Knuth's Punk font
Stars: ✭ 37 (-42.19%)
Mutual labels:  font, opentype
Source Han Mono
Source Han Mono | 思源等宽 | 思源等寬 | 思源等寬 香港 | 源ノ等幅 | 본모노
Stars: ✭ 591 (+823.44%)
Mutual labels:  font, opentype
Typography
C# Font Reader (TrueType / OpenType / OpenFont / CFF / woff / woff2) , Glyphs Layout and Rendering
Stars: ✭ 246 (+284.38%)
Mutual labels:  font, opentype
xits
XITS - OpenType implementation of STIX fonts with math support
Stars: ✭ 299 (+367.19%)
Mutual labels:  font, opentype
Source Han Super Otc
Source Han & Noto CJK Mega/Ultra OTCs
Stars: ✭ 153 (+139.06%)
Mutual labels:  font, opentype
emojione-color
OpenType-SVG font of EmojiOne 2.3
Stars: ✭ 112 (+75%)
Mutual labels:  font, opentype
Adobe Variable Font Prototype
Variable font example in OpenType-CFF2 & TrueType formats
Stars: ✭ 116 (+81.25%)
Mutual labels:  font, opentype
Fonttools Opentype Feature Freezer
OTFeatureFreezer GUI app and pyftfeatfreeze commandline tool in Python to permanently "apply" OpenType features to fonts, by remapping their Unicode assignments
Stars: ✭ 130 (+103.13%)
Mutual labels:  font, opentype
Xits
XITS - OpenType implementation of STIX fonts with math support
Stars: ✭ 257 (+301.56%)
Mutual labels:  font, opentype
Rusttype
Mirror of https://gitlab.redox-os.org/redox-os/rusttype
Stars: ✭ 521 (+714.06%)
Mutual labels:  font, opentype

fonthx: Simple TrueType Generation for Haxe

  • A very basic font generation library (OpenType with TrueType/CFF outlines) written in Haxe
  • The core of the font generation module used by FontStruct
  • Aimed at Haxe (or other) developers who wish to create font generation tools
  • Should work with nodejs, js, cpp, c# and java targets. WASM too if you’re lucky.
  • Does not and will not do overlap removal!

Example

https://fontstruct.github.io/fonthx/

Installation

  1. Clone this repo with git to a folder on your machine

     git clone [email protected]:FontStruct/fonthx.git
    
  2. Install Haxe, e.g. from https://haxe.org/download/
    Currently only supports 3.4.

  3. Install Haxe dependencies (anyone installing with haxelib should check this issue first)

     haxelib install haxelib.json
    
  4. To compile for node, you will need to have nodejs installed. To compile for java, you will need to have a java JDK installed. Other requirements listed below. If on Windows, you may need to adjust some of the paths below.

Try it for node

Build:

haxe build/examples/pixelfonter/pixelfonter-node.hxml

This will build the pixelfonter example, which will create a TrueType font from a PNG image.

Now run:

node dist/examples/pixelfonter/node/PixelFonterApp.js -i build/examples/pixelfonter/pixel-font-5x5.png -c65-91 -o tmp/pixelfont.ttf

Try the same thing for Java

Build:

haxe build/examples/pixelfonter/pixelfonter-java.hxml

Run:

java -jar dist/examples/pixelfonter/java/PixelFonterApp.jar -i build/examples/pixelfonter/pixel-font-5x5.png -c65-91 -o tmp/pixelfont.ttf

Or, for a font with CFF outlines:

java -jar dist/examples/pixelfonter/java/PixelFonterApp.jar -i build/examples/pixelfonter/pixel-font-5x5.png -c65-91 -o tmp/pixelfont.otf -f otf    

Try the same thing for native C++

Build:

haxe build/examples/pixelfonter/pixelfonter-cpp.hxml

Run:

dist/examples/pixelfonter/cpp/PixelFonterApp -i build/examples/pixelfonter/pixel-font-5x5.png -c65-91 -o tmp/pixelfont.ttf

And C# !?!

In order to build and run this example on OSX or Linux you will need to install mono, e.g. via brew install mono

Build:

haxe build/examples/pixelfonter/pixelfonter-cs.hxml

Run:

mono dist/examples/pixelfonter/cs/bin/PixelFonterApp.exe -i build/examples/pixelfonter/pixel-font-5x5.png -c65-91 -o tmp/pixelfont.ttf

And in the browser with a simple GUI

haxe build/examples/pixelfonter/pixelfonter-js.hxml    

– In order to view this example, you will need to point a web server at dist/examples/pixelfonter/js/index.html

And even with WASM!

HXCWD=`pwd` haxe build/examples/pixelfonter/pixelfonter-wasm.hxml     

– You will need to setup emscripten in order to compile this one. You will also need to point a web server at dist/examples/pixelfonter/wasm/index.html. The easiest way is with emrun e.g.

emrun --no_emrun_detect --browser chrome dist/examples/pixelfonter/wasm/PixelFonterBrowserApp-debug.html

(May well take a while to initialise)

Developing and Testing

Set up the dev tools (gulp):

npm install gulp-cli -g
npm install

Run specs:

gulp specs

Or, develop and run specs:

gulp specs-watch

Develop using the pixelfonter example app (node target):

gulp pixelfonter-watch

Show all the available gulp tasks:

gulp --tasks

Build a font generation tool

Look at the Pixelfonter example for guidance, in particular PixelFonter

You need to:

  1. create a font class implementing IFont (optionally extending AbstractFont)
  2. create a glyph class implementing IContourGlyph (optionally extending AbstractContourGlyph)
  3. instantiate your font class, add some glyphs to it, then
  4. get your TrueType bytes using TrueTypeBuilder
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].