Skip to content

Option to pass in file specific overrides/defaults to FontData #23

@kontur

Description

@kontur

Somewhat related to #22 it would be great to have an option to a) overwrite or b) provide defaults for FontData return values.

The most pressing use case for this is essentially overwriting the font family name; for example I have a page showing all fonts of a family; various widgets might use the getCSSFontName extracted from the file, but it is redundant to show the Family name repeatedly.

Equally this could be an option to provide a default, should the detection of a value from the file fail.

I'd image this could be a object that has the font file name as key, then objects for overrides and fallbacks, like

{
    "foo.woff":
    "overrides": {
        "familyName": "Bar"
    },
    "fallbacks": {
        "weight": "Normal"
    }
}

What you think, useful for you?

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions