New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fontscan

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fontscan

Get font list in specified directory(default system fonts).

  • 0.2.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

fontscan

Get font list in specified directory(default system fonts).

This project respect font-manager.

cf.

is nativeaccuracyCustom directory
fontscanNo. Only node.jsMaybe not accurateYes. Not only installed font
font-managerYes. Made with C languageMaybe accurateNo. Only installed font

Usage

Get system fonts.

const fontscan = require('fontscan');
console.log(await fontscan.getFontList());

// output
[
  FontDescriptor {
    path: 'C:\\Windows\\Fonts\\AGENCYB.TTF',
    postscriptName: 'AgencyFB-Bold',
    family: 'Agency FB',
    monospace: false,
    width: 3,
    weight: 700,
    italic: false,
    style: 'Bold'
  },
  FontDescriptor {
    path: 'C:\\Windows\\Fonts\\AGENCYR.TTF',
    postscriptName: 'AgencyFB-Reg',
    family: 'Agency FB',
    monospace: false,
    width: 3,
    weight: 400,
    italic: false,
    style: 'Regular'
  },
  ... more items ]

Fonts in specified directory.

Note: We recommend that you do not specify the root directory, as custom directories are searched recursively.

await fontscan.getFontList({
  customDirectories: [
    `C:\\Users\\${username}\\Fonts`,
    `D:\\Fonts`
  ],
  onlyCustomDirectories: true
})

API

fontscan.getFontList(options?): Promise<FontDescriptor[]>

  • options
    • customDirectories
      • string[]
    • onlyCustomDirectories
      • boolean

FontDescriptor

Font descriptor has basic font informations.

Properties
  • path: string;
  • family: string;
  • postscriptName: string;
  • width: number;
  • weight: number;
  • style: string;
  • italic: boolean;
  • monospace: boolean;

Keywords

FAQs

Package last updated on 13 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc