npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

nexrender-action-install-font

v1.0.7

Published

This library is for use as a font installer during the nexrender prerender phase for windows machines. It will install a font that you supplied as a static asset and will work without a restart.

Downloads

7

Readme

nexrender-action-install-font

This library is for use as a font installer during the nexrender prerender phase for windows machines. It will install a font that you supplied as a static asset and will work without a restart.

Prerequisits

  • Windows OS ( limited to windows for now )
  • Font file name and font name should be the exact same e.g. name La Piratas.ttf can not be saved as LaPiratas.ttf ( case sensitive )
  • Specify your working directory e.g. 'C:/renders' - see usage for an example.
  • Font needs to be added as a static asset so that it can be copied to the temporary working directory e.g.
assets: [
  {
    type: 'static',
    src:
      's3://bucket-name.s3.region.amazonaws.com/La Pirata DEMO.otf'
  }
]

Configuration

Windows Fonts Folder Permissions

You need to provide permission to the fonts folder so that the fonts can be copied.

  • Add the security tab to your 'C:/windows/fonts' directory using attrib –r –s c:\windows\fonts.
  • Right click the folder and select properties.
  • Go to the security tab and click on Advanced.
  • Click the owner user and click on edit.
  • Change the current owner to yourself (your user).
  • Check the “Replace owner on subcontainers and objects” box.
  • Click OK, your user should now have access to write to that folder.

Windows Fonts Registry Permissions

You need to supply access to the fonts registry so that new font keys can be added.

  • Run regedit.
  • Browse to : HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS NT\CURRENT VERSION\FONTS.
  • Give read and write permission to Users or your User account.
  • Restart windows.

Usage

Install using npm or yarn

npm install nexrender-action-install-font / yarn add nexrender-action-install-font 

Usage from the api/client sdk.

assets: [
  {
    type: 'static',
    src:
      's3://bucket-name.s3.region.amazonaws.com/La Pirata DEMO.otf'
  }
],
actions: {
    prerender: [
        {
          module: 'nexrender-action-install-font',
          workingDirectory: 'C:/renders',
          fonts: ['La Pirata Demo.otf', 'Pixelfy.ttf']
        }
    ]
}

How it works

The module will install the font from the working directory using the supplied name and extension e.g. workingdirectory/Pixelfy.ttf. It adds an entry to the windows registry(HKLM) and copies the font to your 'c:/windows/fonts' directory.

Other

Feel free to use as you wish, you're welcome to fork or add PR's to the exising project :) Enjoy.