
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
🅰️ Parse font file (TTF, OTF) metadata like font family name.
Upload a font and see the results at: https://danbovey.uk/fontname
npm install fontname
yarn add fontname
FontName.parse(ArrayBuffer)
Parses an ArrayBuffer (binary data of the font from a FileReader) and returns an object with font meta. Throws on failure.
import FontName from 'fontname';
const fontFile = e.target.files[0]; // File
const reader = new FileReader();
reader.onload = e => {
const buffer = e.target.result; // ArrayBuffer
try {
const fontMeta = FontName.parse(e.target.result)[0];
console.log(fontMeta);
} catch (e) {
// FontName may throw an Error
}
};
reader.readAsArrayBuffer(fontFile);
const fs = require('fs');
const FontName = require('fontname');
try {
const fontMeta = FontName.parse(fs.readFileSync('font.tff'))[0];
console.log(fontMeta);
} catch (e) {
// FontName may throw an Error
}
{
"copyright": "Copyright 2011 Google Inc. All Rights Reserved.",
"_lang": 0,
"fontFamily": "Roboto",
"fontSubfamily": "Regular",
"ID": "Roboto",
"fullName": "Roboto",
"version": "Version 2.137; 2017",
"postScriptName": "Roboto-Regular",
"trademark": "Roboto is a trademark of Google.",
"designer": "Google",
"urlVendor": "Google.com",
"urlDesigner": "Christian Robertson",
"licence": "Licensed under the Apache License, Version 2.0",
"licenceURL": "http://www.apache.org/licenses/LICENSE-2.0"
}
File parsing logic from Typr.js.
FAQs
🅰️ Parse font file (TTF, OTF) metadata like font family name.
We found that fontname demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.