简体   繁体   中英

How I can use the differents font size of a *.ttf file?

I downloaded differents *.ttf font files. In these files there is a lot of available sizes.

However, i see no font-size attributes in the @font-face declaration in css files.

There is style (normal, italic...etc), weight (bold for example), but not any attribute to implement to use the differents size in the file.

@font-face {
  font-family: 'dragon';
  font-style: normal;
  font-weight: normal; 
  src: local('Dragon'), url('./fonts/dragon.ttf') format('truetype');
}

Thank you for your help.

Truetype fonts may include glyphs of different styles and weights (so you can specify what the file contains) but they scale so it wouldn't make sense to specify what sizes of fonts the file contains: It contains all of them.

The size-adjust property allows you to apply a multiplier to the scaling so that different fonts can play better together.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM