Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^3.0.0
->^4.0.0
Release Notes
seek-oss/capsize (@capsizecss/core)
v4.1.2
Compare Source
Patch Changes
#200
6238501
Thanks @michaeltaranto! - createFontStack: PreferpostscriptName
orfullName
for fallback sourceThe
@font-face
declaration aliases generated bycreateFontStack
now favourpostscriptName
andfullName
overfamilyName
from the provided metrics when selecting a local font face as a fallback.MDN recommends using either
fullName
andpostscriptName
when accessing local fonts to ensure the best matching across platforms, while also enabling selection of a single font face within a larger family, e.g.Arial Bold
orArial-BoldMT
withinArial
.For details see MDN.
v4.1.1
Compare Source
Patch Changes
#198
f55acae
Thanks @michaeltaranto! - createFontStack: Applyline-gap-override
with nolineGap
in preferred fontEnsure that the
line-gap-override
property is applied correctly when overriding a fallback font with a web font that has nolineGap
.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
630a5fe
Thanks @michaeltaranto! - createFontStack: Ensure provided `size-adjust` is factored into metric overridesEnsures a custom
size-adjust
value provided via thefontFaceProperties
option is factored into the calculations for the metric overrides.Example
If a custom
size-adjust
value is provided:The resulting metric overrides are now adjusted accordingly:
v4.1.0
Compare Source
Minor Changes
#177
879208b
Thanks @michaeltaranto! - xWidthAvg: Addsubset
support for non-latin character setsPreviously the
xWidthAvg
metric was calculated based on the character frequency as measured from English text only.This resulted in the
xWidthAvg
metric being incorrect for languages that use a different unicode subset range, e.g. Thai.Supporting Thai now enables adding support for other unicode ranges in the future.
What's changed?
@capsizecss/metrics
The
subsets
field has been added to the metrics object, providing thexWidthAvg
metric for each subset — calculated against the relevant character frequency data.There are no changes to any of the other existing metrics.
@capsizecss/core
Fallback font stacks can now be generated per subset, allowing the correct
xWidthAvg
metric to be used for the relevant subset.The
createFontStack
API now acceptssubset
as an option:v4.0.0
Compare Source
Major Changes
#168
8819ff1
Thanks @mrm007! - Precompile Capsize packages with CrackleMigrating Capsize packages to be precompiled with Crackle, with a key change being Crackle now handles entry points instead of Preconstruct.
Other benefits include:
BREAKING CHANGES:
API changes
While technically a breaking change, consumers of Capsize's public APIs are not affected by this change.
If you are affected due to reaching into package internals, please get in touch and see if we can find a more maintainable approach.
TypeScript
TypeScript consumers should ensure they are using a compatible [
moduleResolution
strategy in TSConfig][moduleResolution strategy in TSConfig] — eithernode16
,nodenext
orbundler
. This will ensure types are correctly resolved across the different module specifications.Patch Changes
#164
a308885
Thanks @michaeltaranto! - createFontStack: Append original fallback font name to the font stackThe
fontFamily
returned fromcreateFontStack
now includes the original fallback font name(s). These are appended to the end of the font stack in the case the preferred font and generated fallbacks are not available.Where
fontFamily
is now:#164
a308885
Thanks @michaeltaranto! - createFontStack: Quotefont-family
in@font-face
declaration if neededPreviously, when using
fontFaceFormat: 'styleObject'
, the generated fallback name was not quoted as necessary within the@font-face
declaration.This could cause issues if the font family name contained spaces or other characters that required quoting.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.