Giter Club home page Giter Club logo

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.5

๐ŸŽ‰ 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+)
    • NOTE: For Mac, the default system Python v2.7 doesn't work. Make sure you install Python 3.
  • Node.js
  • Install fonttools from https://github.com/fonttools/fonttools
    • Windows/Linux: pip install fonttools
      • NOTE: For Windows you should use a console with administrative permissions if your Python sit under C:\PythonX
      • NOTE: For Linux in WSL/WSL2, ensure that fonttools is added to PATH after install. Alternatively, consider installing via sudo apt install fonttools.
    • Mac: pip3 install fonttools (from Python 3)

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

๐Ÿ’ป
kilua99
kilua99

๐Ÿ“–
Reland Boyle
Reland Boyle

๐Ÿ“–
Luigi
Luigi

๐Ÿ“–
Tomek Weksej
Tomek Weksej

๐Ÿ’ป

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

operator-mono-lig's People

Contributors

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

Stargazers

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

Watchers

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

operator-mono-lig's Issues

Add Haskell bind operators >>= and =<<

Hi Killman and friends,

Really appreciate your effort of bringing ligatures to Operator Mono!

If possible, would you kindly add support for the Haskell bind (>>=) and reverse bind (=<<) operators?

Currently >>= would be rendered as >โ‰ฅ, which is sort of weird.

Although =<< works fine, it might be nice to add it too, for the sake of symmetry if >>= could be fixed.

Thank you so much and happy holidays!

'ttx' is not recognized

Hi there,

When I run the build command I get the following error when building the fonts:

'ttx' is not recognized as an internal or external command, operable program or batch file.

Any idea how to resolve this?

Which font weight do you use?

Select which weight/type you use. This will help prioritize order of developing fonts.

NOTE: Difference between ScreenSmart (SSm) and regular font.






Is Glyph the only program you can do this with?

I don't own a Mac and I was going to try my hand and making some of the PHP ligatures to help out, but I'm kinda new to this font editing stuff, I've looked at a few applications, but I'm uncertain what the app needs to be able to do to to export the xml's you are using...thoughts?

Request: Curly Brace {{ }}, {% %}, {!! !!} ligatures.

Double curly braces are used a lot in Angular, Mustache, Blade and Twig templates as output delimiters.

{{ variable }} or {{ expression result }}
Then you have the others like the
{% twig execute delimiter %}
and the
{!! blade non-escaped variable !!}

The double curly brace especially gets used in a bunch of other places, a lot of template syntax's in Javascript use them and I've also heard rumor of a dreaded use in Java, but since I don't do Java I'm OK with it.

build.sh does not work in zsh, but in bash

When I started the build.sh in zsh it only changed directory to /build, but it did nothing else. When I started bash (even from zsh) and started build.sh again everything worked.

Error: ENOENT: no such file or directory, open './original/OperatorMono-Medium.ttx'

I get this error when run build.sh, I am using node v8.4.0

โžœ  operator-mono-lig git:(master) โœ— sh build.sh
rm: original/*.ttx: No such file or directory
build.sh: line 4: ttx: command not found
build.sh: line 5: ttx: command not found
Reading original font file ./original/OperatorMono-Medium.ttx
(node:19784) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: ENOENT: no such file or directory, open './original/OperatorMono-Medium.ttx'
(node:19784) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Reading original font file ./original/OperatorMono-MediumItalic.ttx
(node:19785) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: ENOENT: no such file or directory, open './original/OperatorMono-MediumItalic.ttx'
(node:19785) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
build.sh: line 14: ttx: command not found
build.sh: line 15: ttx: command not found

Build does not generate fonts on Windows and macOS

Hey,
trying to build lig version of operator mono with your scripts:

  1. OTF files are in ./original dir (no sub-dirs),
  2. fonttools are installed @3.21.2,
  3. node @9.5.x,
  4. npm install ok,
  5. running build just creates empty build dir :( no errors, warnings...
~/Downloads/operator-mono-lig-master ๎‚ฐ ttx --version
3.21.2
 ~/Downloads/operator-mono-lig-master ๎‚ฐ node --version
v9.5.0
 ~/Downloads/operator-mono-lig-master ๎‚ฐ ./build.sh
 ~/Downloads/operator-mono-lig-master ๎‚ฐ

Same on Windows :(

SyntaxError

Hi I keep getting the following error, both on win10 and osx.

async function main() {
      ^^^^^^^^
SyntaxError: Unexpected token function
    at Object.exports.runInThisContext (vm.js:78:16)
    at Module._compile (module.js:545:28)
    at Object.Module._extensions..js (module.js:582:10)
    at Module.load (module.js:490:32)
    at tryModuleLoad (module.js:449:12)
    at Function.Module._load (module.js:441:3)
    at Module.runMain (module.js:607:10)
    at run (bootstrap_node.js:420:7)
    at startup (bootstrap_node.js:139:9)
    at bootstrap_node.js:535:3

My font names are as follows:

OperatorMono-Bold.oft

.. and so on.

What am I doing wrong? Thanks

Extract individual glyphs in separate files for easier composition

One of the changes I've made with the updated fonts is extracting each ligature glyph into a separate file.

This has several benefits:

  • Don't need to build every glyph for each font weight immediately. I can work on these as I have time and you'll be able to update your fonts with new ligatures as they are built.
  • Customize which glyphs are included in your font. You'll have the ability to specify which ligature you want or choose between alternate forms.
  • The biggest benefit is that it will make contributions from other users much easier to integrate as each glyph will be standalone and can be merged into the final font.

In order to do this, I have to also include the subroutines that were used in the glyph outline. The old way simply extracted all the subroutines from the source font and then extracted them during the build process. However, this would cause issues for those that want to build custom glyphs as those subroutine indexes will vary from one user to another.

Here is what the new glyph file will look like. As you can see it also contains the metrics so I no longer to have to keep the hmtx file.

<Glyph name="equal_equal.liga" lsb="-531" width="625">
    <CharString>
        1000 callsubr
        -531 1063 vstem
        531 414 1001 callsubr
        -1063 -77 hlineto
        1062 -246 1001 callsubr
        -1063 -77 hlineto
        endchar
    </CharString>
    <Subrs>
        <CharString index="1000">
            168 1000 callgsubr
            return
        </CharString>
        <CharString index="1001">
            rmoveto
            1001 callgsubr
            return
        </CharString>
    </Subrs>
    <GlobalSubrs>
        <CharString index="1000">
            -337 279 rlineto
            return
        </CharString>
        <CharString index="1001">
            rmoveto
            269 -246 61 63 -257 229 263 227 -60 63 -271 -245 rlineto
            endchar
        </CharString>
    </GlobalSubrs>
</Glyph>

SSm should use uppercase S and lowercase m

The file names In the ligature directory should be spelled as SSm rather than Ssm. Otherwise, on a case-sensitive file system, build.sh will not find the corresponding original font.

Request <=> and ?? ligatures

Can I add to this by putting in a request for the following for PHP.
Null coalescing operator ??
and
Spaceship operator <=> <----this one more, as the current <= ligature causes this one to look especially bad!

ligatures_needed

How do you set this font on vscode windows ?

Hi,

How do you use this font on vscode windows ?

this is what the build generate

$ ls
OperatorMonoLig-Book.otf        OperatorMonoLig-Medium.otf
OperatorMonoLig-Book.ttx        OperatorMonoLig-Medium.ttx
OperatorMonoLig-BookItalic.otf  OperatorMonoLig-MediumItalic.otf
OperatorMonoLig-BookItalic.ttx  OperatorMonoLig-MediumItalic.ttx

I want to use the book version, and on my vscode, i can only set with "Operator Mono Lig",

"editor.fontFamily": "Operator Mono Lig",

not "Operator Mono Lig Book", if not the font becomes unvailable

Multiple dash characters look weird

Hi,

Try to chain multiple --------- and you'll see that the rendering is not great as compared to Fira Code.

Is this something that can be fixed?

Thanks!

Request to fix operators

First off, thank you so much @kiliman for the amazing work thus far!!!

I'd like to throw in the suggestion to include/fix some operators here:

  • <|> currently displays as the left pipeline and greater than
  • &&& currently displays as a combined && followed by one more disjointed &

And to echo issue #36:

  • >>= displays as a greater than followed by a greater-than-or-equal symbol
  • =<< displays as a less-than-or-equal followed by a less than symbol

I plan on grabbing the trial of Glyphs to play around, but I doubt I'll end up with anything as solid as the work you've already done ^_^.

Thanks again!

Glyph not added.

Glyphs are not added to my font files, doesn't render in my Illustrator Glyphs panel.

Could be related to this error: WARNING: GSUB/GPOS Coverage is not sorted by glyph ids?

Thank you :)

As a note, I had to do an extra step (use ttx to convert the original .otf files to .ttx before running build), so it might be nice to add this to the README.

But mostly I just wanted to say thank you for doing this!! :) The ligatures look great.

Operator Mono Book Italic has wrong family name and subfamily

When generating your new Operator Mono Book Lig Italic, the font name is set to "Operator Mono Book Lig Italic" and subfamily is set to "Regular".

These values should be set to "Operator Mono Book Lig" and "Italic" respectively.

Without this change the italic font is seen as a separate font family and not a style of Operator Mono Book Lig.

Problem with ./build.sh

Added the fonts in "original" folder https://imgur.com/a/IPa7o
Installed this "pip3 install fonttools";
node -v ~ v9.2.0, npm -v ~ 5.5.1;
npm install;
But, when i put run "./build.sh" - nothing happens.
No errors, "build" folder is empty.
What am I doing wrong?
macOS HighSierra 10.13.1

No output from build

Hello,

I can't seem to get the build step to work. Is there anything I'm missing here?

I'm on OS X 10.12.

operator-mono-lig/original git/master
โฏ ls
Operator Mono Bold Italic.otf    Operator SSm Black Regular.otf
Operator Mono Bold Regular.otf   Operator SSm Bold Italic.otf
Operator Mono Book Italic.otf    Operator SSm Bold Regular.otf
Operator Mono Book Regular.otf   Operator SSm Book Italic.otf
Operator Mono Light Italic.otf   Operator SSm Book Regular.otf
Operator Mono Light Regular.otf  Operator SSm Light Italic.otf
Operator Mono Medium Italic.otf  Operator SSm Light Regular.otf
Operator Mono Medium Regular.otf Operator SSm Medium Italic.otf
Operator Mono XLight Italic.otf  Operator SSm Medium Regular.otf
Operator Mono XLight Regular.otf Operator SSm XLight Italic.otf
Operator SSm Black Italic.otf    Operator SSm XLight Regular.otf
โฏ node -v
v8.4.0
โฏ yarn
yarn install v1.2.0
[1/4] ๐Ÿ”  Resolving packages...
success Already up-to-date.
โœจ  Done in 0.14s.
โฏ python --version
Python 2.7.12
โฏ pip install fonttools
Requirement already satisfied (use --upgrade to upgrade): fonttools in /usr/local/lib/python2.7/site-packages

Running the build script doesn't produce any kind of output at all.

Thanks!

Italic ligatures are currently not working

The Glyphs version of the italic font works fine, so there must be an issue with the extraction/build process.

Compare TTX from Glyphs with the built version and determine differences.

Add "three dashes"/em-dash ligature/kerning pair

Hi,

I noticed that, e.g. in LaTeX documents, three dashes are displayed "incorrectly" as a double-dash followed by a single dash.
Three dashes are sometimes needed in the english language, see https://tex.stackexchange.com/questions/3819/dashes-vs-vs

The following image illustrates the problem:

screen shot 2017-09-18 at 23 30 55

(please ignore the green line below the characters)

Is this something that can be fixed within the font or does the problem originate from a different source?

Unhandled exception has occured/Assestion Error/ValueError: too many values to unpack

Hi! I'm having trouble generating fonts with ligature. I tried to use both Python 2 and Python 3 and I get errors in both. I also tried using the build.bat and build.sh but still having the same output. Here is the output:

C:\Users\ricadiz\operator-mono-lig-master>build Building OperatorMonoLig-Medium Dumping ".\original\OperatorMono-Medium.otf" to ".\original\OperatorMono-Medium.ttx"... Dumping 'GlyphOrder' table... Dumping 'head' table... Dumping 'hhea' table... Dumping 'maxp' table... Dumping 'OS/2' table... Dumping 'name' table... Dumping 'cmap' table... Dumping 'post' table... Dumping 'CFF ' table... Dumping 'GPOS' table... Dumping 'GSUB' table... Dumping 'hmtx' table... Dumping 'DSIG' table... Reading original font file ./original/OperatorMono-Medium.ttx Patching names Patching glyphs Patching gpos Patching gsub Patching hmtx Patching charstrings Writing ligature font file ./build/OperatorMonoLig-Medium.ttx Done Compiling ".\build\OperatorMonoLig-Medium.ttx" to ".\build\OperatorMonoLig-Medium.otf"... Parsing 'GlyphOrder' table... Parsing 'head' table... Parsing 'hhea' table... Parsing 'maxp' table... Parsing 'OS/2' table... Parsing 'name' table... Parsing 'cmap' table... Parsing 'post' table... Parsing 'CFF ' table... Parsing 'GPOS' table... Parsing 'GSUB' table... Parsing 'hmtx' table... Parsing 'DSIG' table... ERROR: Unhandled exception has occurred Traceback (most recent call last): File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\ttx.py", line 399, in main process(jobs, options) File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\ttx.py", line 373, in process action(input, output, options) File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\misc\loggingTools.py", line 372, in wrapper return func(*args, **kwds) File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\ttx.py", line 291, in ttCompile ttf.save(output) File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\ttLib\ttFont.py", line 166, in save writer_reordersTables = self._save(tmp) File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\ttLib\ttFont.py", line 205, in _save self._writeTable(tag, writer, done, tableCache) File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\ttLib\ttFont.py", line 618, in _writeTable self._writeTable(masterTable, writer, done, tableCache) File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\ttLib\ttFont.py", line 622, in _writeTable tabledata = self.getTableData(tag) File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\ttLib\ttFont.py", line 640, in getTableData return self.tables[tag].compile(self) File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\ttLib\tables\C_F_F_.py", line 20, in compile self.cff.compile(f, otFont, isCFF2=False) File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\cffLib\__init__.py", line 108, in compile topDict.recalcFontBBox() File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\cffLib\__init__.py", line 2340, in recalcFontBBox bounds = charString.calcBounds(self.CharStrings) File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\misc\psCharStrings.py", line 984, in calcBounds self.draw(boundsPen) File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\misc\psCharStrings.py", line 979, in draw extractor.execute(self) File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\misc\psCharStrings.py", line 301, in execute rv = handler(index) File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\misc\psCharStrings.py", line 340, in op_callsubr self.execute(subr) File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\misc\psCharStrings.py", line 301, in execute rv = handler(index) File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\misc\psCharStrings.py", line 360, in op_hintmask hintMaskBytes, index = self.callingStack[-1].getBytes(index, self.hintMaskBytes) File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\misc\psCharStrings.py", line 1073, in getBytes assert len(bytes) == nBytes AssertionError (Hit any key to exit) Building OperatorMonoLig-MediumItalic Dumping ".\original\OperatorMono-MediumItalic.otf" to ".\original\OperatorMono-MediumItalic.ttx"... Dumping 'GlyphOrder' table... Dumping 'head' table... Dumping 'hhea' table... Dumping 'maxp' table... Dumping 'OS/2' table... Dumping 'name' table... Dumping 'cmap' table... Dumping 'post' table... Dumping 'CFF ' table... Dumping 'GPOS' table... Dumping 'GSUB' table... Dumping 'hmtx' table... Dumping 'DSIG' table... Reading original font file ./original/OperatorMono-MediumItalic.ttx Patching names Patching glyphs Patching gpos Patching gsub Patching hmtx Patching charstrings Writing ligature font file ./build/OperatorMonoLig-MediumItalic.ttx Done Compiling ".\build\OperatorMonoLig-MediumItalic.ttx" to ".\build\OperatorMonoLig-MediumItalic.otf"... Parsing 'GlyphOrder' table... Parsing 'head' table... Parsing 'hhea' table... Parsing 'maxp' table... Parsing 'OS/2' table... Parsing 'name' table... Parsing 'cmap' table... Parsing 'post' table... Parsing 'CFF ' table... Parsing 'GPOS' table... Parsing 'GSUB' table... Parsing 'hmtx' table... Parsing 'DSIG' table... ERROR: Unhandled exception has occurred Traceback (most recent call last): File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\ttx.py", line 399, in main process(jobs, options) File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\ttx.py", line 373, in process action(input, output, options) File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\misc\loggingTools.py", line 372, in wrapper return func(*args, **kwds) File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\ttx.py", line 291, in ttCompile ttf.save(output) File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\ttLib\ttFont.py", line 166, in save writer_reordersTables = self._save(tmp) File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\ttLib\ttFont.py", line 205, in _save self._writeTable(tag, writer, done, tableCache) File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\ttLib\ttFont.py", line 618, in _writeTable self._writeTable(masterTable, writer, done, tableCache) File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\ttLib\ttFont.py", line 622, in _writeTable tabledata = self.getTableData(tag) File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\ttLib\ttFont.py", line 640, in getTableData return self.tables[tag].compile(self) File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\ttLib\tables\C_F_F_.py", line 20, in compile self.cff.compile(f, otFont, isCFF2=False) File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\cffLib\__init__.py", line 108, in compile topDict.recalcFontBBox() File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\cffLib\__init__.py", line 2340, in recalcFontBBox bounds = charString.calcBounds(self.CharStrings) File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\misc\psCharStrings.py", line 984, in calcBounds self.draw(boundsPen) File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\misc\psCharStrings.py", line 979, in draw extractor.execute(self) File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\misc\psCharStrings.py", line 301, in execute rv = handler(index) File "d:\python27\lib\site-packages\fonttools-3.25.0-py2.7.egg\fontTools\misc\psCharStrings.py", line 578, in op_endchar adx, ady, bchar, achar = args ValueError: too many values to unpack (Hit any key to exit)

Do I need to place the whole Operator Mono font family in the original directory? or just the font that I will use?

By the way, I'm using the following:

ttx --version
3.25.0
node --version
v9.1.0

Windows 10 x64

What do you mean by Mono SSm Versions?

Your project is a godsend, thank you!

I'm sorry but I only have Operator SSm (not mono) and Operator Mono (not SSm).

When I compile nothing works except OperatorMonoLig-Medium.otfand OperatorMonoLig-MediumItalic.otf

What Operator Mono SSm are you talking about? It's not here.

Failed with ttx command not found error

Running on High Sierra with Python 2.7.10:

Building OperatorMonoSSmLig-Book
./build.sh: line 19: ttx: command not found
/Users/st016lo/Downloads/operator-mono-lig-master/index.js:20
async function main() {
      ^^^^^^^^

Fonttools is installed.

Ligatures need better hinting

Compared to Fira Code, the ligatures aren't as readable on a non-retina display.

Most of them are blurry and stuck together.

image

Running ./build.sh does nothing

I'm running OSX 10.12.6

I've followed the prerequisites and have fonttools installed. After I cloned the repo I copied the Operator Mono fonts to original directory and ran ./build.sh. It runs very quickly and produces no output.

I checked the 'build' directory and it's empty. Any ideas?

Allow customizing which ligatures are merged into the font

Not everyone likes all the ligatures, so allow the person to specify which ligatures to merge into the font.

I'll probably have a text file that lists all the available ligatures. The user copies this file to the original folder and simply comments out or deletes the ones they don't want. The build process will only include the ligatures desired.

To take this to the next level, allow the user to create multiple ligature sets. This will allow you to generate a custom font per language, since some ligatures make more sense than others. This will come in handy when a ligature may have a different meaning/representation based on language.

Error building on windows

Don't know if this is anything related to windows or that I did something wrong. But i get the following error while building:

Building OperatorMonoLig-Book
Dumping ".\original\OperatorMono-Book.otf" to ".\original\OperatorMono-Book.ttx"...
Dumping 'GlyphOrder' table...
Dumping 'head' table...
Dumping 'hhea' table...
Dumping 'maxp' table...
Dumping 'OS/2' table...
Dumping 'name' table...
Dumping 'cmap' table...
Dumping 'post' table...
Dumping 'CFF ' table...
Dumping 'GPOS' table...
Dumping 'GSUB' table...
Dumping 'hmtx' table...
Dumping 'DSIG' table...
Reading original font file ./original/OperatorMono-Book.ttx
Patching names
Patching glyphs
Patching gpos
Patching gsub
Patching hmtx
Patching charstrings
Writing ligature font file ./build/OperatorMonoLig-Book.ttx
Done
Compiling ".\build\OperatorMonoLig-Book.ttx" to ".\build\OperatorMonoLig-Book.otf"...
Parsing 'GlyphOrder' table...
Parsing 'head' table...
Parsing 'hhea' table...
Parsing 'maxp' table...
Parsing 'OS/2' table...
Parsing 'name' table...
Parsing 'cmap' table...
Parsing 'post' table...
Parsing 'CFF ' table...
Parsing 'GPOS' table...
Parsing 'GSUB' table...
Parsing 'hmtx' table...
Parsing 'DSIG' table...
ERROR: Unhandled exception has occurred
Traceback (most recent call last):
  File "c:\python27\lib\site-packages\fontTools\ttx.py", line 389, in main
    process(jobs, options)
  File "c:\python27\lib\site-packages\fontTools\ttx.py", line 363, in process
    action(input, output, options)
  File "c:\python27\lib\site-packages\fontTools\misc\loggingTools.py", line 372, in wrapper
    return func(*args, **kwds)
  File "c:\python27\lib\site-packages\fontTools\ttx.py", line 281, in ttCompile
    ttf.save(output)
  File "c:\python27\lib\site-packages\fontTools\ttLib\__init__.py", line 221, in save
    self._writeTable(tag, writer, done)
  File "c:\python27\lib\site-packages\fontTools\ttLib\__init__.py", line 657, in _writeTable
    self._writeTable(masterTable, writer, done)
  File "c:\python27\lib\site-packages\fontTools\ttLib\__init__.py", line 660, in _writeTable
    tabledata = self.getTableData(tag)
  File "c:\python27\lib\site-packages\fontTools\ttLib\__init__.py", line 671, in getTableData
    return self.tables[tag].compile(self)
  File "c:\python27\lib\site-packages\fontTools\ttLib\tables\C_F_F_.py", line 20, in compile
    self.cff.compile(f, otFont, isCFF2=False)
  File "c:\python27\lib\site-packages\fontTools\cffLib\__init__.py", line 108, in compile
    topDict.recalcFontBBox()
  File "c:\python27\lib\site-packages\fontTools\cffLib\__init__.py", line 2341, in recalcFontBBox
    bounds = charString.calcBounds()
  File "c:\python27\lib\site-packages\fontTools\misc\psCharStrings.py", line 984, in calcBounds
    self.draw(boundsPen)
  File "c:\python27\lib\site-packages\fontTools\misc\psCharStrings.py", line 979, in draw
    extractor.execute(self)
  File "c:\python27\lib\site-packages\fontTools\misc\psCharStrings.py", line 301, in execute
    rv = handler(index)
  File "c:\python27\lib\site-packages\fontTools\misc\psCharStrings.py", line 345, in op_callgsubr
    self.execute(subr)
  File "c:\python27\lib\site-packages\fontTools\misc\psCharStrings.py", line 301, in execute
    rv = handler(index)
  File "c:\python27\lib\site-packages\fontTools\misc\psCharStrings.py", line 345, in op_callgsubr
    self.execute(subr)
  File "c:\python27\lib\site-packages\fontTools\misc\psCharStrings.py", line 301, in execute
    rv = handler(index)
  File "c:\python27\lib\site-packages\fontTools\misc\psCharStrings.py", line 634, in op_vvcurveto
    dya, dxb, dyb, dyc = args[i:i+4]
ValueError: need more than 2 values to unpack
(Hit any key to exit)

Any idea what went wrong? I have the following versions:

Python 2.7.12
Node 8.9.0

I only put in the OperatorMono-Book.otf in the original folder

Whitespace looks weird

whitespace looks shrinked and narrower than usual.

image

it looks fine in Operator Mono Lig, but werid in Operator Mono SSm Lig

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.