Skip to content

Commit

Permalink
Version Packages (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
seek-oss-ci authored May 5, 2024
1 parent 630a5fe commit 72ba15b
Show file tree
Hide file tree
Showing 11 changed files with 141 additions and 99 deletions.
43 changes: 0 additions & 43 deletions .changeset/hip-pumas-dream.md

This file was deleted.

8 changes: 0 additions & 8 deletions .changeset/slimy-trees-design.md

This file was deleted.

37 changes: 0 additions & 37 deletions .changeset/sour-mayflies-visit.md

This file was deleted.

40 changes: 40 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,45 @@
# @capsizecss/core

## 4.1.1

### Patch Changes

- [#198](https://github.com/seek-oss/capsize/pull/198) [`f55acae`](https://github.com/seek-oss/capsize/commit/f55acae09286855e31df556d6ac793bb78ebe7fe) Thanks [@michaeltaranto](https://github.com/michaeltaranto)! - createFontStack: Apply `line-gap-override` with no `lineGap` in preferred font

Ensure that the `line-gap-override` property is applied correctly when overriding a fallback font with a web font that has no `lineGap`.
Previously if the override was zero it would be omitted from the declaration, rather than the correct behaviour of overriding the fallback metric to zero.

- [#199](https://github.com/seek-oss/capsize/pull/199) [`630a5fe`](https://github.com/seek-oss/capsize/commit/630a5fedd0b4a62eaaa6747073c275bd70dcd8a9) Thanks [@michaeltaranto](https://github.com/michaeltaranto)! - createFontStack: Ensure provided \`size-adjust\` is factored into metric overrides

Ensures a custom `size-adjust` value provided via the `fontFaceProperties` option is factored into the calculations for the metric overrides.

#### Example

If a custom `size-adjust` value is provided:

```ts
createFontStack([merriweatherSans, arial], {
fontFaceProperties: {
sizeAdjust: '300%',
},
});
```

The resulting metric overrides are now adjusted accordingly:

```diff
@font-face {
font-family: "Merriweather Sans Fallback";
src: local('Arial');
- ascent-override: 92.3409%;
+ ascent-override: 32.8%;
- descent-override: 25.619%;
+ descent-override: 9.1%;
line-gap-override: 0%;
size-adjust: 300%;
}
```

## 4.1.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@capsizecss/core",
"version": "4.1.0",
"version": "4.1.1",
"description": "Flipping how we define typography",
"keywords": [
"capsize",
Expand Down
44 changes: 44 additions & 0 deletions packages/metrics/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,49 @@
# @capsizecss/metrics

## 3.1.0

### Minor Changes

- [#195](https://github.com/seek-oss/capsize/pull/195) [`aa77cb2`](https://github.com/seek-oss/capsize/commit/aa77cb2b58f1fa9de9bd01e6933b6ad838ba325c) Thanks [@michaeltaranto](https://github.com/michaeltaranto)! - Extract and expose `postscriptName` and `fullName` from font metrics

The font metrics returned now include the `postscriptName` and `fullName` properties as authored by the font creator.

For example:

```ts
// Arial Regular metrics
{
"familyName": "Arial",
"fullName": "Arial",
"postscriptName": "ArialMT",
...
}

// Arial Bold metrics
{
"familyName": "Arial",
"fullName": "Arial Bold",
"postscriptName": "Arial-BoldMT",
...
}
```

These values are particularly useful when constructing CSS `@font-face` declarations, as they can be used to specify [local(\<font-face-name\>)] sources.
MDN recommends using bothto assure proper matching across platforms”.

```css
@font-face {
font-family: 'Web Font Fallback';
src: local('Arial Bold'), local('Arial-BoldMT');
font-weight: 700;
ascent-override: 89.3502%;
descent-override: 23.1683%;
size-adjust: 108.3377%;
}
```

[local(\<font-face-name\>)]: https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/src#localfont-face-name

## 3.0.0

### Major Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/metrics/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@capsizecss/metrics",
"version": "3.0.0",
"version": "3.1.0",
"description": "Font metrics library for system and Google fonts",
"keywords": [
"capsize",
Expand Down Expand Up @@ -63,7 +63,7 @@
"generate": "pnpm clean && tsx ./scripts/generate.ts"
},
"devDependencies": {
"@capsizecss/unpack": "^2.1.0",
"@capsizecss/unpack": "^2.2.0",
"@types/cli-progress": "^3.9.2",
"@types/node-fetch": "^2.6.2",
"cli-progress": "^3.9.1",
Expand Down
44 changes: 44 additions & 0 deletions packages/unpack/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,49 @@
# @capsizecss/unpack

## 2.2.0

### Minor Changes

- [#195](https://github.com/seek-oss/capsize/pull/195) [`aa77cb2`](https://github.com/seek-oss/capsize/commit/aa77cb2b58f1fa9de9bd01e6933b6ad838ba325c) Thanks [@michaeltaranto](https://github.com/michaeltaranto)! - Extract and expose `postscriptName` and `fullName` from font metrics

The font metrics returned now include the `postscriptName` and `fullName` properties as authored by the font creator.

For example:

```ts
// Arial Regular metrics
{
"familyName": "Arial",
"fullName": "Arial",
"postscriptName": "ArialMT",
...
}

// Arial Bold metrics
{
"familyName": "Arial",
"fullName": "Arial Bold",
"postscriptName": "Arial-BoldMT",
...
}
```

These values are particularly useful when constructing CSS `@font-face` declarations, as they can be used to specify [local(\<font-face-name\>)] sources.
MDN recommends using bothto assure proper matching across platforms”.

```css
@font-face {
font-family: 'Web Font Fallback';
src: local('Arial Bold'), local('Arial-BoldMT');
font-weight: 700;
ascent-override: 89.3502%;
descent-override: 23.1683%;
size-adjust: 108.3377%;
}
```

[local(\<font-face-name\>)]: https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/src#localfont-face-name

## 2.1.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/unpack/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@capsizecss/unpack",
"version": "2.1.0",
"version": "2.2.0",
"description": "Unpack capsize font metrics from fonts",
"keywords": [
"capsize",
Expand Down
10 changes: 6 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
"directory": "site"
},
"dependencies": {
"@capsizecss/core": "^4.1.0",
"@capsizecss/metrics": "^3.0.0",
"@capsizecss/unpack": "^2.1.0",
"@capsizecss/core": "^4.1.1",
"@capsizecss/metrics": "^3.1.0",
"@capsizecss/unpack": "^2.2.0",
"@chakra-ui/icons": "^2.1.1",
"@chakra-ui/react": "^2.8.2",
"@emotion/react": "^11.11.3",
Expand Down

0 comments on commit 72ba15b

Please sign in to comment.