Template:Font-stretch/doc

From Wikisource
Jump to navigation Jump to search

Usage[edit]

Formats condensed or expanded text, sometimes used titles and headers.

Basic usage - default 0.7 width factor
Normal text {{Font-stretch|Condensed by 0.7}} More normal text 

Normal text Condensed by 0.7 More normal text

Custom width factors - set parameter 1
* Normal text {{Font-stretch|0.5|Condensed by 0.5}} More normal text 
* Normal text {{Font-stretch|1.5|Expanded by 1.5}} More normal text 
  • Normal text Condensed by 0.5 More normal text
  • Normal text Expanded by 1.5 More normal text

Implementation note: this simulates the effect by scaling the font, rather than using the CSS font-stretch property, because font-stretch only works if the font supports it, which most do not.