0

http://www.fontsquirrel.com/fontface/generatorを使用して、GillSans フォントのさまざまなバージョン (.svn、.eot...) を生成しました。

次のように使用できるようになりました。

@font-face {
  font-family: 'GillSansFF';
  src: url('fonts/GillSans.eot');
  src: local('☺'), url('fonts/GillSans.woff') format('woff'), url('fonts/GillSans.ttf') format('truetype'), url('fonts/GillSans.svg') format('svg');
  font-weight: normal;
  font-style: normal;
}

h1 {
    font-family: "GillSansFF", Calibri, sans-serif;
}

GillSans には "Gill Sans Light" (Bold、Italic など) も含まれているため、"Light" バージョンを指定するにはどうすればよいですか? ありがとう

編集解決策は、指摘されているように、異なるフォントを使用することです。単一の ttc から ttf を抽出するために、この動作する Python スクリプトを見つけました: http://pastebin.com/QXcAtP24

4

1 に答える 1

1

ライト フォント用に @font-face 宣言を追加するだけです。

@font-face {
  font-family: 'GillSansFF';
  src: url('fonts/GillSans.eot');
  src: local('☺'), url('fonts/GillSans.woff') format('woff'), url('fonts/GillSans.ttf') format('truetype'), url('fonts/GillSans.svg') format('svg');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'GillSansFF';
  src: url('fonts/GillSans-light.eot');
  src: local('☺'), url('fonts/GillSans-light.woff') format('woff'), url('fonts/GillSans.ttf') format('truetype'), url('fonts/GillSans-light.svg') format('svg');
  font-weight: lighter;
  font-style: normal;
}
于 2013-02-18T10:25:39.277 に答える