Package Exports
- @sequencemedia/make-face
- @sequencemedia/make-face/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@sequencemedia/make-face) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Make Face
Convert otf, ttf, eot, svg, woff, or woff2 font files to CSS @font-face {} declarations with embedded data as src: url() (in Base64).
Always:
npm i @sequencemedia/make-faceLogging
Logging is implemented with debug and can be enabled with the @sequencemedia/make-face namespace. This package will execute silently without that namespace enabled. (The command line and JS/ES import examples show how logging can be enabled)
Run from the command line
DEBUG=@sequencemedia/make-face node make-face -f ~/from/file/path -t ~/to/file/pathDEBUG=@sequencemedia/make-face node read-face -f ~/from/file/path -t ~/to/file/path/file.cssMake Face
Read font files from the file system and transform them to css files.
Import using JS
var makeFace = require('make-face').makeFace;
var fromDirectory = '~/origin/file/path';
var toDirectory = '~/css/file/path';
makeFace(fromDirectory, toDirectory);Import using ES
import { makeFace } from 'make-face'
const fromDirectory = '~/origin/file/path'
const toDirectory = '~/destination/file/path'
makeFace(fromDirectory, toDirectory)Read Face
Read css files from the file system and concatenate them to another css file.
Using JS
var debug = require('debug');
var readFace = require('make-face').readFace;
debug.enable('@sequencemedia/make-face');
var fromDirectory = '~/origin/file/path';
var toFile = '~/destination/file/path/file.css';
readFace(fromDirectory, toFile);Using ES
import debug from 'debug'
import { readFace } from 'make-face'
debug.enable('@sequencemedia/make-face')
const fromDirectory = '~/src/file/path'
const toFile = '~/destination/file/path/file.css'
readFace(fromDirectory, toFile)