Recently I asked on a different forum about the glyph width of the Source Code Pro font (it’s 600). This helps me in setting tab stops in a word processor for code samples.
How do I find the glyph width of other Monospaced fonts?
Recently I asked on a different forum about the glyph width of the Source Code Pro font (it’s 600). This helps me in setting tab stops in a word processor for code samples.
How do I find the glyph width of other Monospaced fonts?
Copyright © 2021 Jogjafile Inc.
You can retrieve font metrics using opentype.js
Once the font file is parsed, you can easily check many glyph or font properties against the retrieved objects:
So far opentype.js does not support
woff2files.You can use google webfont helpers api to fetch
woffortruetypefiles.Since some webfonts use 2048 units per em, you might calculate a normalized glyph width (relative to 1000 units per em):