Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
font-detective
Advanced tools
Note: v1.x supported getting a full list of fonts with Flash; v2.x drops support for Flash.
Detects available system fonts with JavaScript, from a list of common fonts.
See a demo. You can edit the sample text.
<script src="lib/font-detective.js"></script>
<script>
FontDetective.each(function(font){
$("<option>")
.val(font)
.text(font.name)
.appendTo("select");
font.name; // e.g. 'Arial'
font.toString(); // e.g. '"Arial"'
});
FontDetective.all(function(fonts){
console.log(fonts);
});
</script>
FontDetective.each(callback)
Font
every time a font is detected and testedFontDetective.all(callback)
Array
of Font
s when all fonts are detected and testedFontDetective.preload()
all
or each
right awayFontDetective.Font
font.name
property can be used to display the name of the fontfont
can be used anywhere you'd use a font-family
(e.g. div.style.fontFamily = font
)For detecting fonts from Node.js, see font-manager
MIT-licensed, see LICENSE for details
FAQs
Detect fonts in-browser
The npm package font-detective receives a total of 1 weekly downloads. As such, font-detective popularity was classified as not popular.
We found that font-detective 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.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.