Plugin extends wiki markup to give wiki users ability to write beautiful text. There is sometimes some need for nice looking slogan, paragraphs of article or quotation. The best description of this plugin will be presentation I think.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots.
So far, the Universe is winning.
Powers of Typography plugin are:
As everything Typography plugin has it's strong and weak sides. Well, currently supported units are:
Pixel unit px does not allow you to use decimal part, so 20px is accepted but 20.5px is not.
Due to text-height css property handling when element has children in document tree, this sometimes can behave not as precise as you wish to.
Whole syntax walks around <typo parameters>beatifull looking test</typo, where parameters syntax looks quite intuitive: name:value; (Have in mind there is no space after colon and do not forget about semicolon).
For example lets check font size 10 pixels and 10 points. Those are different, cause size based on points is browser/printer dpi dependent. For relative sizing you can use em units or percents. As you can observe 1.5em = 150%. Lets check how wiki markup looks like for that paragraph.
For example lets check font <typo fs:10px;>size 10 pixels</typo> and <typo fs:10pt;>10 points</typo>. Those are different, cause size based on points is browser/printer dpi dependent. For relative sizing you can use <typo fs:1.5em;>em units</typo> or <typo fs:150%;>percents</typo>. As you can observe 1.5em = 150%. Lets check how wiki markup looks like for that paragraph.
Let's see this markup in action. Current paragraph should have Trebuchet MS font face choosen, if not found standard browser sans font will be used. Additionally you can specify smallcaps parameter right after tag name. You can use only smallcaps flag without specifing font family to smallcapsize default font face.
<typo ff:Trebuchet MS, sans;>Let's see this markup in action. Current paragraph should have **Trebuchet MS** font face choosen, if not found standard browser **sans** font will be used.</typo> <typo fv:smallcaps;> Additionally you can specify //smallcaps// parameter right after tag name.</typo> You can use only //smallcaps// flag without specifing font family to smallcapsize default font face.
To give you more power in typography on you wiki Typography text line height, letter spacing and word spacing setting is possible.
<typo lh:30px; ls:2px; ws:15px;>To give you more power in typography on you wiki [[typography|Typography]] text line height, letter spacing and word spacing setting is possible.</typo>
| functionality | parameter syntax | comment |
|---|---|---|
| font family | <typo ff:Coma separated, font famliy names, can contain spaces;>Text</typo> | |
| font variant | <typo fv:smallcaps;>Text</typo> | only “smallcaps” value allowed |
| font size | <typo fs:20px;>Text</typo> | values below zero not allowed |
| line height | <typo lh:20px;>Text</typo> | values below zero not allowed |
| letter spacing | <typo ls:20px;>Text</typo> | values below zero allowed |
| spacing between word | <typo ws:20px;>Text</typo> | values below zero allowed |
Let's see the code of quotation on top of page.
<typo fs:1.8em; ff:Iwona, Georgia, serif; ls:-2px; ws:-0.1em;>Programming today is <color #F0276E>a race between software engineers</color> striving to build bigger and better idiot-proof programs, <color #F0276E>and the Universe</color> trying to produce bigger and better idiots.</typo> <typo fs:1.8em; fv:smallcaps; lh:10px; ff:Iwona, Georgia, serif;>So far, the Universe is winning.</typo>
This software is provided as it is witout any warranty. Licensed on LGPL.
Report bugs, suggest features or improvements directly to me.