Swiftpack.co - nrkno/nrk-sans-styles as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by nrkno.
nrkno/nrk-sans-styles 1.0.2
Definitions of the font styles of NRK Sans.
⭐️ 1
🕓 2 weeks ago
iOS tvOS
.package(url: "https://github.com/nrkno/nrk-sans-styles.git", from: "1.0.2")

nrk-sans-styles

Why?

Most of the text styles of NRK Sans override the default attribute values of the font. This repository (alongside Figma) should be considered the truth when it comes to these attributes.

How?

As part of the build pipeline, the platforms should fetch the font-definitions from this repository.

Format

The definitions under "tv" should be used in all large-screen applications — smart TV, Apple TV, Android TV, etc. The definitions under "responsive" should be used for everything else.

  • size, int: The point size
  • lineHeight, float, Relative to Size
  • explicitLineHeight, int: The total lineheight (Android TV Compose only)
  • letterSpacing, float, Relative to Size
  • "weight", int
  • "width", int
{
    "responsive": {
        "title9": {
            "size": 29,
            "lineHeight": 1.20,
            "explicitLineHeight": 35,
            "letterSpacing": 0.004,
            "weight": 660,
            "width": 100
        },
        { /* ... */ }
    },
    "tv": {
        "title9": {
            "size": 29,
            "lineHeight": 1.3,
            "explicitLineHeight": 38,
            "letterSpacing": -0.002,
            "weight": 400,
            "width": 100
        },
        { /* ... */ }
    }
}

GitHub

link
Stars: 1
Last commit: 2 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

1.0.2
2 weeks ago
  • Remove static from Package.swift to make it play nice with SwiftUI previews in Xcode 14

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics