elm-css icon indicating copy to clipboard operation
elm-css copied to clipboard

WIP: Add `@font-face`

Open listrophy opened this issue 7 years ago • 0 comments

This code is currently in-progress and should not be merged

This PR will add @font-face support for the most commonly used attributes:

  • font-family
  • src
  • font-variant
  • font-weight
  • font-style

It does not implement unicode-range, font-feature-settings, or font-stretch. Other authors are encouraged to add these in later.

Questions for elm-css core team

There already exist functions called fontFamily and src in elm-css. They seem to be incompatible with the semantics of @font-face. To wit:

fontFamily takes only FontFamily a, which only allows for serif, sansSerif, monospace, cursive and fantasy. In this case, we're defining a brand new font with a new name. The docs suggest using fontFamilies if you want custom-named fonts, but that doesn't make sense here because we're defining one font name.

src is of type ImportType compatible -> String, and I just really don't know what to do about that.

To see what an ideal implementation would look like, see the proposed fixture.

listrophy avatar Mar 28 '17 15:03 listrophy