Skip to content

Include font-weight in fonts option #3

@jednano

Description

@jednano

The CSS that defines our fonts does it in such a way that we don't actually specify the entire font name like in the examples in the readme. Instead, we define font-weight variations like so:

.regular {
    font: 14px/calc(20/14) source-sans-pro;
    text-remove-gap: both;
}
.light {
    font: light 14px/calc(20/14) source-sans-pro;
    text-remove-gap: both;
}
.semibold {
    font: semibold 14px/calc(20/14) source-sans-pro;
    text-remove-gap: both;
}

Notice, the font-weight can sometimes be light or semibold for this font, in which case, there are different calculations we need to use for the cap and baseline locations.

Suggestion

I suggest you allow a configuration like so:

{
  "fonts": [
    {
      "family": "Source Sans Pro",
      "weight": "light",
      "cap": 0.194,
      "baseline": 0.146
    }
  ]
}

The weight being optional.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions