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

fontaine

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fontaine - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

18

package.json
{
"name": "fontaine",
"version": "0.1.1",
"version": "0.1.2",
"description": "Automatic font fallback based on font metrics",
"repository": "danielroe/fontaine",
"repository": "unjs/fontaine",
"keywords": [

@@ -52,6 +52,6 @@ "fonts",

"magic-regexp": "^0.5.0",
"magic-string": "^0.26.4",
"pathe": "^0.3.8",
"magic-string": "^0.26.7",
"pathe": "^0.3.9",
"scule": "^0.3.2",
"ufo": "^0.8.5",
"ufo": "^0.8.6",
"unplugin": "^0.9.6"

@@ -64,4 +64,5 @@ },

"@types/serve-handler": "^6.1.1",
"@vitest/coverage-c8": "^0.23.4",
"c8": "latest",
"@typescript-eslint/eslint-plugin": "^5.40.0",
"@typescript-eslint/parser": "^5.40.0",
"@vitest/coverage-c8": "^0.24.3",
"conventional-changelog-conventionalcommits": "latest",

@@ -72,3 +73,2 @@ "eslint": "latest",

"execa": "^6.1.0",
"expect-type": "latest",
"get-port-please": "^2.6.1",

@@ -89,3 +89,3 @@ "husky": "latest",

},
"packageManager": "pnpm@7.12.2"
"packageManager": "pnpm@7.13.4"
}

@@ -10,9 +10,7 @@ # fontaine

- [✨  Changelog](https://github.com/danielroe/fontaine/blob/main/CHANGELOG.md)
- [▶️  Online playground](https://stackblitz.com/github/danielroe/fontaine/tree/main/playground)
- [✨  Changelog](https://github.com/unjs/fontaine/blob/main/CHANGELOG.md)
- [▶️  Online playground](https://stackblitz.com/github/unjs/fontaine/tree/main/playground)
## Features
**⚠️ `fontaine` is under active development. ⚠️**
- 💪 Reduces CLS by using local font fallbacks with crafted font metrics.

@@ -55,3 +53,3 @@ - ✨ Generates font metrics and overrides automatically.

const options = {
fallbacks: ['BlinkMacSystemFont', 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', 'Noto Sans'],
fallbacks: ['BlinkMacSystemFont', 'Segoe UI', 'Helvetica Neue', 'Arial', 'Noto Sans'],
// You may need to resolve assets like `/fonts/Roboto.woff2` to a particular directory

@@ -94,5 +92,4 @@ resolvePath: (id) => 'file:///path/to/public/dir' + id,

font-family: 'Roboto override';
src: local('BlinkMacSystemFont'), local('Segoe UI'), local('Roboto'), local(
'Helvetica Neue'
), local('Arial'), local('Noto Sans');
src: local('BlinkMacSystemFont'), local('Segoe UI'), local('Helvetica Neue'),
local('Arial'), local('Noto Sans');
ascent-override: 92.7734375%;

@@ -126,3 +123,4 @@ descent-override: 24.4140625%;

- amazing tooling and generated metrics from [capsizecss](https://seek-oss.github.io/capsize/)
- suggestion and algorithm from [Katie Hempenius](https://katiehempenius.com/) & [Kara Erickson](https://github.com/kara) on the Google Aurora team - see [notes on calculating font metric overrides](https://docs.google.com/document/d/e/2PACX-1vRsazeNirATC7lIj2aErSHpK26hZ6dA9GsQ069GEbq5fyzXEhXbvByoftSfhG82aJXmrQ_sJCPBqcx_/pub).
- suggestion and algorithm from [Katie Hempenius](https://katiehempenius.com/) & [Kara Erickson](https://github.com/kara) on the Google Aurora team - see [notes on calculating font metric overrides](https://docs.google.com/document/d/e/2PACX-1vRsazeNirATC7lIj2aErSHpK26hZ6dA9GsQ069GEbq5fyzXEhXbvByoftSfhG82aJXmrQ_sJCPBqcx_/pub)
- package name suggestion from [**@clemcode**](https://github.com/clemcode)

@@ -141,5 +139,5 @@ ## License

[npm-downloads-href]: https://npmjs.com/package/fontaine
[github-actions-src]: https://img.shields.io/github/workflow/status/danielroe/fontaine/ci/main?style=flat-square
[github-actions-href]: https://github.com/danielroe/fontaine/actions?query=workflow%3Aci
[codecov-src]: https://img.shields.io/codecov/c/gh/danielroe/fontaine/main?style=flat-square
[codecov-href]: https://codecov.io/gh/danielroe/fontaine
[github-actions-src]: https://img.shields.io/github/workflow/status/unjs/fontaine/ci/main?style=flat-square
[github-actions-href]: https://github.com/unjs/fontaine/actions?query=workflow%3Aci
[codecov-src]: https://img.shields.io/codecov/c/gh/unjs/fontaine/main?style=flat-square
[codecov-href]: https://codecov.io/gh/unjs/fontaine

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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