kiliman / operator-mono-lig

Add ligatures to Operator Mono similar to Fira Code
MIT License
3.2k stars 202 forks source link

Would this work with Operator Mono office? #78

Closed IceMan81 closed 5 years ago

IceMan81 commented 5 years ago

I think its basically the ttf version of Operator Mono SSm with just three weights Regular, Bold, Italic, BoldItalic.

kiliman commented 5 years ago

It should, but you'll need to convert it to OpenType format. You'll also probably need to play around with the names.

NOTE: Check the metrics to see which ligatures to use: Normal or ScreenSmart.

Here's a web site I found to get font info. https://fontdrop.info/

Drag the font to the window, then click on the Data tab. Scroll down to the hhea table and look at advanceWidthMax. If it is 625, then it is the ScreenSmart version. If it's only 550 then it's the normal width.

image

IceMan81 commented 5 years ago

Thanks. The idea of using the Office fonts is to get fully hinted ttf fonts. Why do the fonts have to the OTF? Is it because the metrics are different?

dannymcgee commented 5 years ago

@IceMan81, if I'm not mistaken, the ScreenSmart versions of HCo's fonts already use full TrueType hinting. The main difference as I understand it with their "Office" fonts is to simplify their use in MS Office type applications — i.e., removing the superfluous weights, making Ctrl+B/Ctrl+I switch to Bold/Italic correctly, etc. If all you're after is proper hinting, then the ScreenSmart fonts are what you need.

One caveat is that if you're using them in an application like VS Code or Atom that's built on Electron (i.e. web technology), I believe you need to install the TTF webfont version in order for that application to take advantage of the hinting. That's been my experience with trying to create my own font for use with VS Code.

Either way though, unfortunately I think @kiliman's utility is incompatible with TrueType hinted fonts, so you may be out of luck.

kiliman commented 5 years ago

Yes, this tool only works on the OpenType versions. However it does support hinting as it still outputs the hstem and vstem instructions.

Try converting the TrueType fonts to OpenType and see if you see a noticeable difference. If not, then you should be able to run the tool as long as you rename the fonts correctly.

Good luck!