Giter Site home page Giter Site logo

aidanasc20 / operator-mono-lig Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kiliman/operator-mono-lig

0.0 0.0 0.0 5.25 MB

Add ligatures to Operator Mono similar to Fira Code

License: MIT License

Batchfile 2.34% JavaScript 91.99% Shell 2.84% HTML 0.61% Go 2.21%

operator-mono-lig's Introduction

Operator Mono Ligatures

All Contributors

This project will generate new OpenType fonts for Operator Mono that includes ligatures similar to those found in the popular Fira Code font.

These ligatures were custom created using Glyphs. There are even italic versions of the ligatures.

๐ŸŽ‰ What's New in Version 2

All new redesigned ligatures with better hinting. Updated font generation to support advanced OpenType features like those found in Fira Code. For example, the cursor now moves inside the ligature. It also handles repeating characters properly.

With the awesome help from Mark Skelton, we now have the full set of ligatures for the following fonts. Thanks Mark, and thanks to all of you who have been patiently waiting for these ligatures to be completed.

  • Operator Mono SSm Light/Light Italic
  • Operator Mono SSm Book/Book Italic
  • Operator Mono SSm Medium/Medium Italic
  • Operator Mono SSm Bold/Bold Italic
  • Operator Mono Light/Light Italic
  • Operator Mono Book/Book Italic

๐Ÿ™ Help Wanted

As noted above, v2 does not include all weights for Operator Mono. In order to update the other fonts, all the ligatures need to be redone. Unfortunately I just don't have the time to do that at the moment. If you have a Mac and are interested in helping, please let me know. I will even purchase a license to Gylphs Mini for you.

You can reach me at [email protected].

โ˜‘๏ธ Take the poll

Which font weight of Operator Mono do you use? Also note difference between Screen Smart (SSm) and regular version. This will help prioritize the order of development.

NOTE: Because Operator Mono is not a free font, you must have the original font files. This utility will merge the ligature definitions into a copy of the original font. The new font family is named Operator Mono Lig so you can install it side-by-side with the original font.

Prerequisites

  • The original Operator Mono font... of course.
  • Python (v2.7+)
  • Node.js
  • Install fonttools from https://github.com/fonttools/fonttools
    • Windows/Linux: pip install fonttools
    • Mac: pip3 install fonttools

Installation

Once all the prerequisites have been installed, clone this repo or download latest release from Releases and unzip.

Next, copy your Operator Mono OpenType files into the original folder. NOTE: Filenames must not include spaces. It should look like:

  • OperatorMonoSSm-Book.otf
  • OperatorMonoSSm-BookItalic.otf
  • OperatorMono-Light.otf
  • OperatorMono-LightItalic.otf
  • etc.

Finally, run the following commands to install npm dependencies and build the font files. The new font files will be placed in the build folder. You can now install these fonts on your system.

npm install

# Windows
build

# Linux/Mac
./build.sh

Docker

If you use Docker, you can also use the executable Docker image here. It handles all the prerequisite installation for you, you just need to:

  1. Clone the repo located here.
  2. Copy your Operator Mono OpenType files into the input folder.
  3. From the command line run:
    docker-compose run --rm operator-mono-lig

The image will build and execute the conversion. The new font files will be generated into the build folder.

Configure Your Code Editor

You can now select the newly generated font in your code editor. Make sure you enable font ligatures and set the desired font weight if using Windows. The code block below shows what this might look like if using VS Code.

  "editor.fontFamily": "OperatorMonoSSmLig-Book",
  "editor.fontLigatures": true,
  // for Windows
  "editor.fontFamily": "Operator Mono SSm Lig",
  "editor.fontLigatures": true,
  "editor.fontWeight": "500",   // adjust for desired weight

๐Ÿ”ง Customize the generated font

By default, all available ligatures will be added to the generated font. However, if you don't like a particular ligature, or would prefer to use an alternate glyph, you can create a profiles.ini file in the ./original folder to configure how the font should be built.

You can create one or more profiles. Each profile will have a set of directives. You can specify alternate glyphs for a given ligature. You can also prevent a ligature from being added.

Each profile will be listed with [profile name] (the first profile should be named default). The generated font will include the profile name. For example [Go] would generate the font: Operator Mono Lig Go. This way you can configure a different set of ligatures for each language in your favorite code editor.

# name of profile (one or more sections, first should be name default)
[default]
# glyph=altglyph
greater_equal.liga=greater_equal.2.liga

# do not include glyph (add ! prefix)
!equal_equal.liga

# another optional section (will create a font named Operator Mono Lig Go)
[Go]
... add custom directives for this font ...

๐Ÿ˜ Thank You

Thanks to Hoefler&Co for making such an amazing font. It makes writing code truly pleasurable.

Thanks also to all of you for your kinds words of encouragement and feedback. I really appreciate it.

โœจ Contributors

Thanks goes to these wonderful people (emoji key):

Kiliman
Kiliman

๐Ÿ’ป ๐Ÿ“– ๐ŸŽจ
Mark Skelton
Mark Skelton

๐ŸŽจ
Derick Rodriguez
Derick Rodriguez

๐Ÿ“–
Amit Parekh
Amit Parekh

๐Ÿ“– ๐ŸŽจ
NikSun
NikSun

๐ŸŽจ
Jakob Pearson
Jakob Pearson

๐Ÿ’ป

This project follows the all-contributors specification. Contributions of any kind welcome!

operator-mono-lig's People

Contributors

kiliman avatar mskelton avatar amitkparekh avatar emaballarin avatar timhecker avatar dependabot[bot] avatar newswim avatar drod3763 avatar leshow avatar hjdarnel avatar jakob6174 avatar sethbergman avatar sjousse avatar marsqing avatar

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.