Adjusting Kerning in CSS

前端 未结 6 1041
死守一世寂寞
死守一世寂寞 2020-12-31 01:06

Is it possible with CSS to adjust kerning in CSS? I\'d like to be able to kern a block of text such that it will actually look like a block of text (both left and right edge

6条回答
  •  再見小時候
    2020-12-31 01:27

    Kerning, letter-spacing (aka tracking) and justify blocks are three different typography properties.

    The newest link I found about kerning is from TypeKit, with directions on how to enable the embedded kerning data with their webfonts. http://blog.typekit.com/2014/02/05/kerning-on-the-web/#comment-19916

    Manual kerning - adjusting the space between each single letter in a word - will always be a matter of taste and preference. And can be achieved thru kern.js or kerning.js

    What makes the TypeKit solution stand out to me, is it enables kerning for all body text automatically by utilizing the meta data in OpenType fonts. I just found it, and am pretty excited to use it in my next project!

    For easy reference, the new css properties discussed in the link are:

    text-rendering: optimizeLegibility;
    font-feature-settings: "kern";
    font-kerning: normal;
    

    With prefixes for font-feature-settings including:

      -webkit-font-feature-settings: "kern";
      -moz-font-feature-settings: "kern";
      -moz-font-feature-settings: "kern=1";
    

提交回复
热议问题