Git Product home page Git Product logo

iosevka-generate's Introduction

Iosevka Generate

Iosevka Generate is a tool to generate your own Iosevka font for you.

Iosevka is a fantastic 'for code from code' font, for which all credit goes to Belleve Invis - this repo is merely a helper script to leverage others' hard work.

NB: Iosevka itself now has a TOML spec for font building, which can now be used as the input to iosevka-generate. The remaining added value is:

  • handle acquiring & installing repo and dependencies automatically
  • similarly auto-storing/re-caching the generated font
  • patch with nerd font (currently in INI format only, cf. #8)

Usage

In your $XDG_CONFIG_HOME (or $HOME/.config) create iosevka/my-font.toml in Iosevka's 'private-build-plans' TOML format (recommended), or iosevka/config.ini in INI format (which may be removed in the future) such as:

[options]
    name = myosevka
    serifs = sans
    ligset = haskell
    nerdfont = fontawesome powerline material octicons

[common]
    l = hooky

[upright]
    q = straight
    zero = slashed

[italic]
    i = hooky
    at = fourfold

[oblique]
    g = opendoublestory
    numbersign = slanted

This format is kept only for backwards compatibility - it is recommended to use private-build-plans.toml format now that it exists; which supports many more options than our INI format ever did, such as restricting widths/weights (helpful to reduce build time for a monospace/term only font).

In the TOML format, nerdfont options can be specified with an iosevka-generate options section:

[buildPlans.myosevka.iosevka-generate]
nerdfont = ["fontawesome", "powerline", "material", "octicons"]

For the rest of the (upstream) options, Iosevka Customizer is a handy tool to generate the plan visually, or even just to familiarise yourself with the format and sorts of options available.

Installation

If you clone this repo, you can just create a symbolic link to the contained script somewhere on your $PATH:

ln -s $CLONED_DIR/iosevka-generate /usr/local/bin/iosevka-generate

On Arch, use the PKGBUILD script in this repo or from the AUR.

On macOS, use the brew formula:

brew install OJFord/formulae/iosevka-generate

Licence

The helper tool in this repository is licensed according to the LICENCE.md contained within.

This tool retrieves and makes use of the Iosevka font and supporting build tooling, which are copyright of Belle Invis and licensed as described in that project's repository.

Nerd Font is (optionally) used for patching additional glyphs, and is copyright of Ryan L. McIntyre and licensed as described in that project's repository.

iosevka-generate's People

Contributors

jfeick avatar jfrankenau avatar ojford avatar tokebe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

jfeick komori tokebe

iosevka-generate's Issues

systemd service to watch config & run on change

Not a duplicate of #1, since it would only work on systems with systemd, but on such systems would be a better solution than simply running iosevka-generate every N seconds or on login or whatever.

Support iosevka's build-plan.toml format as input

The format is now cleaner, similar to that used here.

Ultimately it would be good to use a superset of the same toml format - just adding interpretation of nerdfont etc. that iosevka itself would hopefully ignore if it was run directly even.

As a first step, let's just also support the build plan toml input, basically just skipping the parse and toml generation steps.

Add option to patch as a 'nerd font'

c.f. ryanoasis/nerd-fonts.

It would be nice to be able to do something like:

[options]
    ; ...
    nerd-font = fontawesome fontlinux powerline

to patch the referenced nerd-fonts.

A further option could be whether to override Iosevka if there's any conflict in private use area usage. Default should probably be not to, so that nerd-font behaves like a fallback.

Arch package seems to be broken

I ran

 iosevka-generate ~/.config/iosevka/my-font.toml  

and in the end the message Iosevka installed. was printed, however, I cannot find the generated font files. They are neither in ~/.local/share/fonts, nor in /usr/share/fonts.
I get three times the warnings:

npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.

Could you help me? I wonder if I should have downloaded some file from Iosevka's github page or if the recent update of the font to 4.5 broke something in the script.

Store installed state and check for update

The script should store a copy of the parsed configuration to something like $XDG_CONFIG_HOME/iosevka/.installed and check against it when invoked, before actually regenerating the fonts.

This would allow running the script on startup, login, etc. without penalty.

Iosevka no longer uses a makefile

Since the release of Iosevka 2.0, the new build system uses npm and custom blocks in build-plans.toml. Most of the syntax is the same so that shouldn't be too hard to port, but it involves writing to a file instead of passing arguments to make.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.