Google フォントからローカルの css フォルダーに .ttf ファイルをダウンロードしましたが、正しく読み込めないようです。私はこれらのアプローチを試しました:
CSS
@import url('./css/css?family=Cabin+Condensed:400,500,600,700');
@font-face {
font-family: 'Cabin Condensed';
font-style: normal;
font-weight: 700;
src: local('Cabin Condensed') format('truetype');
}
body, html {
font-family: 'Cabin Condensed', sans-serif;
}
HTML
<link href="./css/css?family=Cabin+Condensed:400,500,600" rel="stylesheet">
エラーは発生しませんが、フォントも表示されません。奇妙なことに、公式ドキュメントにはローカル フォントについての言及すらありません。