jonathantneal / directory-fonts-complete

Generate a complete list of fonts and their sources from a directory

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Directory Fonts Complete

Generate a complete list of fonts and their sources from a directory.

Usage

return require('directory-fonts-complete')('/System Folder/Fonts', ['custom/font/path/on/site']);

yields

{
    "Apple Braille": {
        "variants": {
            "400": {
                "normal": {
                    {
                        "local": [
                            "Apple Braille",
                            "AppleBraille"
                        ],
                        "url": {
                            "ttf": "/System/Library/Fonts/Apple Braille.ttf"
                        }
                    }
                }
            }
        }
    },
    ...
}

About

Generate a complete list of fonts and their sources from a directory

License:Other


Languages

Language:JavaScript 100.0%