Comments (2)
I originally used FontForge, an open source font editor. https://fontforge.github.io/en-US/
Basically, I edit the fonts and save it as OTF. Put the .otf file in the ligature_source
folder, then run extract
. It will then generate the XML files for you.
If you're going to add a new ligature, you need to do a few things:
- When you name the glyph, use the format: 'glyph1_glyph2_glyph3.liga' where each glyph is the component name, like 'equal_greater.liga'
- Make sure the width is a multiple of 550 for the normal OM font and 625 for ScreenSmart. So if you have a ligature of 3 characters, it will be 3 * 550 = 1650 or 3 * 625 = 1875.
- I typically try to set my LSB (Left-Side Bearing) to 87 and then stretch and make the RSB 87 as well. If you're making a glyph like
&&
or??
, then I typically center the glyph. Sometimes you'll want to "optically" center instead of mathematically center. That is, move the glyph around until it looks balanced on both sides. Curves and slants tend to fool the eye. The Glyphs app had a nice feature where you can add text around the glyph so you could see it better in context. Check out the YouTube video from the README to see what I mean.
You'll also need to do the following outside the font editor:
- Update the file
/ligatures/glyphs.xml
and add your new glyphs. Don't worry about the id, they'll be renumbered when building the new font. Just make it the next sequence. - Update the file
/ligatures/lookup.xml
to add your ligature mapping. Look for the first character in your glyph (likeequal
and find the corresponding<LigatureSet glyph="equal">
. Add a new<Ligature/>
entry, wherecomponents="..."
the remaining characters (comma separated for multiple). NOTE: Make sure you order them with the longest sequence first as the first match will be the one that is displayed.
This is just a quick summary off the top of my head. One of the issues is that the extract and build tools expect all ligatures be present in each font weight. That's why I've been slow to add new ligatures for now. You can also run extract and build scripts by passing in the font name: build OperatorMonoLig-Book
to build individual fonts.
Anyway, if you have any questions, post them here and I'll try to answer.
from operator-mono-lig.
Awesome. Thanks for the directions. I'll start fiddling around with this this weekend!
from operator-mono-lig.
Related Issues (20)
- Build fails in Big Sur HOT 6
- Erro on VSCODE - letter spacing 0? HOT 12
- Operator Mono SSm Lig Book does not work with Vscode HOT 9
- Build script doesn't do anything HOT 6
- Ligatures Not Working HOT 16
- some ligatures dont work in italics. HOT 4
- build doesn't do anything HOT 10
- Create ligatures for `Operator Mono Bold` HOT 2
- Running ./build.sh just create build folder with empty HOT 10
- Glyphs are way too small HOT 3
- npm install always giving errors HOT 3
- Not an issue: meant to help to use Win 10 Npm problems HOT 2
- Create `::` ligature HOT 10
- Cannot run npm install node-pre-gyp ERR! build error HOT 2
- Got a lot of errors after npm install. (Windows 11) HOT 6
- Only two fonts in build folder HOT 6
- Does not work with Python 2.7 shipped with MacOS Montery HOT 1
- The following glyph names are referenced but are missing from the glyph set: underscore.alt HOT 1
- If you get error after error!
- Copyright to matter about? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from operator-mono-lig.