Chrome 62以降でも@font-faceでフォントを置換する
font-weight: bold;が効かなくなったことへの対処
Stylusを使ってMSゴシック、MS Pゴシックを置き換えていたが、Chrome 62以降で太字(Bold)が適切に表示されなくなった。
色々試してみると、boldのところだけ、フォーマットの指定format('truetype')
をすると上手くいった。normalのところにもformatを指定するとダメだった。
対処済みのCSS
@font-face {
font-family: 'MS Pゴシック';
font-weight: normal;
src: local('Gen Shin Gothic P');
}
@font-face {
font-family: 'MS Pゴシック';
font-weight: normal;
src: local('Gen Shin Gothic P');
}
@font-face {
font-family: 'MS PGothic';
font-weight: normal;
src: local('Gen Shin Gothic P');
}
@font-face {
font-family: 'MS Pゴシック';
font-weight: bold;
src: local('Gen Shin Gothic P') format('truetype');
}
@font-face {
font-family: 'MS Pゴシック';
font-weight: bold;
src: local('Gen Shin Gothic P') format('truetype');
}
@font-face {
font-family: 'MS PGothic';
font-weight: bold;
src: local('Gen Shin Gothic P') format('truetype');
}
新規コメント