Skip to content

[css-fonts] Support 1 @font-face (1 file) providing both normal and italic font-styles #3908

@davelab6

Description

@davelab6

@nyshadhr9 pointed out today that this doesn't work as expected:

<html>
  </head>
    <style>
      @font-face {
        font-family: 'Sample VF';
        font-weight: 400;
        font-style: normal;
        src: url("VfItalSlnt-Regular.ttf") format('truetype');
      }
      @font-face {
        font-family: 'Sample VF';
        font-weight: 400;
        font-style: italic;
        src: url("VfItalSlnt-Regular.ttf") format('truetype');
      }
      p1 {
        font-family: 'Sample VF', display;
        font-style: normal;
      }
      p2 {
        font-family: 'Sample VF', display;
        font-style: italic;
      }
    </style>
  </head>

<body>
  <p1>hello world</p1><br>
  <p2>hello world</p2>
</body>
</html>

Screen Shot 2019-05-10 at 9 53 27 AM

VfItalSlnt-Regular.zip

Perhaps rather than duplicating the @font-face, this should be possible:

      @font-face {
        font-family: 'Sample VF';
        font-weight: 400;
        font-style: normal italic;
        src: url("VfItalSlnt-Regular.ttf") format('truetype');
      }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions