Skip to content

多字重版本的字体处理不正确 #32

@idiotWu

Description

@idiotWu

比如我想同时引入 kaigen-gothicRegularBold 版本,CSS 书写如下:

@font-face {
  font-family: 'Kai Gen Gothic';
  src: url('../font/KaiGenGothicCN-Regular.eot');
  src:
    url('../fonts/KaiGenGothicCN-Regular.eot?#font-spider') format('embedded-opentype'),
    url('../fonts/KaiGenGothicCN-Regular.woff') format('woff'),
    url('../fonts/KaiGenGothicCN-Regular.ttf') format('truetype'),
    url('../fonts/KaiGenGothicCN-Regular.svg') format('svg');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Kai Gen Gothic';
  src: url('../font/KaiGenGothicCN-Bold.eot');
  src:
    url('../fonts/KaiGenGothicCN-Bold.eot?#font-spider') format('embedded-opentype'),
    url('../fonts/KaiGenGothicCN-Bold.woff') format('woff'),
    url('../fonts/KaiGenGothicCN-Bold.ttf') format('truetype'),
    url('../fonts/KaiGenGothicCN-Bold.svg') format('svg');
  font-weight: bold;
  font-style: normal;
}

但是只有后书写的规则会被识别,只生成了 KaiGenGothicCN-Bold 的子集。

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions