mooman219 / fontdue

The fastest font renderer in the world, written in pure rust.
Apache License 2.0
1.44k stars 72 forks source link

Can you add an example of how to create a simple letter and save as a font? #134

Closed alexhallam closed 1 year ago

alexhallam commented 1 year ago

Say I want to make a "pixel" style font from scratch. For example the letter "p" would be represented as

    [
        [0, 1, 1, 0, 0],
        [1, 0, 0, 1, 0],
        [1, 0, 0, 1, 0],
        [1, 0, 0, 1, 0],
        [1, 1, 1, 0, 0],
        [1, 0, 0, 0, 0],
        [1, 0, 0, 0, 0],
    ]
Screenshot 2023-02-10 at 5 49 39 PM

How can I create this letter and save as a ttf or otf using Rust and this library?

mooman219 commented 1 year ago

You cannot use Fontdue to modify or create a new font, sorry! There's no intention of doing so either.