typography - Is there a way to move letters closer to each other for only a certain range of a string using CSS? -
given have string "software", reduce spacing between "f" , "t" , keep rest of string spacing is.
plan b me @ point add span around letters f , t ideally not have touch markup. question is:
is there way change spacing between letters range of string using css or scss?
code example:
html
<h1>software</h1>
css
h1{ letter-spacing:-0.13em; //is there way specify range here? }
here plan b:
h1{ font-size:5rem; font-family: 'comfortaa', cursive; } span{ letter-spacing: -0.13em; }
<link href='https://fonts.googleapis.com/css?family=exo+2|michroma|comfortaa' rel='stylesheet' type='text/css'> <h1>so<span>ft</span>ware</h1>
what want normal typographical behavior, referred "kerning", adjusts intra-letter spacing in visually pleasing ways. example:
kerning function of font. in other words, fonts have kerning data, , don't. in example above, font times new roman, contain kerning information. can see, "f" , "t" positioned.
comfortaa has no kerning. solve problem, use font contains kerning data.
Comments
Post a Comment