Read ligature from a font
See original GitHub issueIs it possible to read the “ligatures” from a font?
What I mean is, get a dictionary (an array) where the key is the substituion and the value is the Glyph object (or just the unicode integer value), something like:
var font = ... ; // a Font object
var ligatures = font.getLigatures(); // an array where key is the ligature, value is the Glyph(or just the unicode integer will do it too)
foreach(var l in ligatures) {
console.log(l, ligatures[l]); //
}
For example, Google’s Material Icons font has the “face” ligature, see: https://google.github.io/material-design-icons/#using-the-icons-in-html
Issue Analytics
- State:
- Created 4 years ago
- Comments:23 (1 by maintainers)
Top Results From Across the Web
Ligatures in programming fonts
First, what are ligatures? Ligatures are special characters in a font that combine two (or more) troublesome characters into one. For instance, in...
Read more >Ligature – Fonts Knowledge
A glyph that combines the shapes of two (or more) characters into a new form, making for a more harmonious reading experience.
Read more >Ligatures Part 1 - Standard - Fonts.com
Although the “fi” and “fl” ligatures are standard in Type 1 and TrueType® fonts, a broader range of standard ligatures are found in...
Read more >How to Use Font Ligatures in InDesign, Photoshop & Illustrator
Font ligatures are one of the most purposeful elements in graphic design, especially in long forms of text. Learn what font ligatures are ......
Read more >How to Use Ligatures in Open Type Font with Windows ...
Select the ligature you would like to use by clicking on it and pressing the "Select" button. Now highlight the character and press...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
To get a list of ligatures would really be helpful!
Recently a FontDrop! user sent me a script that he used to get ligatures. He wrote:
Here is the code
I’m not a javascript developer, but maybe it is a starting point …
I made an NPM module for getting an array of ligature names from a font. It’s published to npm as
ligatures
. https://github.com/petermikitsh/ligatures