Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@capsizecss/core

Package Overview
Dependencies
Maintainers
2
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@capsizecss/core - npm Package Compare versions

Comparing version 0.0.0-add-subset-support-20240304225850 to 0.0.0-add-weight-italic-support-20240507015549

17

dist/index.d.ts

@@ -147,4 +147,8 @@ import { AtRule } from 'csstype';

interface FontMetrics {
/** The font family name as authored by font creator */
/** The font’s family name as authored by font creator */
familyName: string;
/** The font’s full name as authored by font creator */
fullName: string;
/** The font’s unique PostScript name as authored by font creator */
postscriptName: string;
/**

@@ -175,3 +179,3 @@ * The style of the font: serif, sans-serif, monospace, display, or handwriting.

/** A lookup of the `xWidthAvg` metric by unicode subset */
subsets: Record<SupportedSubset, {
subsets?: Record<SupportedSubset, {
xWidthAvg: number;

@@ -236,3 +240,4 @@ }>;

type FontStackMetrics = Pick<FontMetrics, 'familyName' | 'ascent' | 'descent' | 'lineGap' | 'unitsPerEm' | 'xWidthAvg' | 'subsets'>;
type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
type FontStackMetrics = Optional<Pick<FontMetrics, 'familyName' | 'fullName' | 'postscriptName' | 'ascent' | 'descent' | 'lineGap' | 'unitsPerEm' | 'xWidthAvg' | 'subsets'>, 'fullName' | 'postscriptName'>;
type FontFace = {

@@ -253,4 +258,8 @@ '@font-face': Omit<AtRule.FontFace, 'src' | 'fontFamily'> & Required<Pick<AtRule.FontFace, 'src' | 'fontFamily'>>;

/**
* The unicode subset to use for calculating the `size-adjust` property.
* The unicode subset to generate the fallback font for.
*
* The fallback font is scaled according to the average character width,
* calculated from weighted character frequencies in written text that
* uses the specified subset, e.g. `latin` from English, `thai` from Thai.
*
* Default: `latin`

@@ -257,0 +266,0 @@ */

{
"name": "@capsizecss/core",
"version": "0.0.0-add-subset-support-20240304225850",
"version": "0.0.0-add-weight-italic-support-20240507015549",
"description": "Flipping how we define typography",

@@ -5,0 +5,0 @@ "keywords": [

@@ -312,3 +312,6 @@ <img src="https://raw.githubusercontent.com/seek-oss/capsize/HEAD/images/capsize-header.png#gh-light-mode-only" alt="Capsize" title="Capsize" width="443px" />

> [!NOTE] Worth noting, passing any of the metric override CSS properties will be ignored as they are calculated by Capsize. However, the `size-adjust` property is accepted to support fine-tuning the override for particular use cases. This can be used to finesse the adjustment for specific text, or to disable the adjustment by setting it to `100%`.
> [!NOTE]
> Passing any of the metric override CSS properties will be ignored as they are calculated by Capsize.
> However, the `size-adjust` property is accepted to support fine-tuning the override for particular use cases.
> This can be used to finesse the adjustment for specific text, or to disable the adjustment by setting it to `100%`.

@@ -327,3 +330,5 @@ #### Scaling for different character subsets

> [!TIP] Need support for a different unicode subset? Either create an issue or follow the steps outlined in the [`generate-weightings` script] and open a PR.
> [!TIP]
> Need support for a different unicode subset?
> Either create an issue or follow the steps outlined in the [`generate-weightings` script] and open a PR.

@@ -330,0 +335,0 @@ [based on character frequency in written language]: packages/metrics/README.md#how-xwidthavg-is-calculated

Sorry, the diff of this file is not supported yet

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