plugin:typography [DokuWiki]
.--- todo
Heavy text
=== .dp
https://www.dokuwiki.org/plugin:typography
DokuWiki It's better when it's simple
+ Typography Plugin
(code-begin)
Compatible with DokuWiki
2020-07-29 "Hogfather" yes
2018-04-22 "Greebo" yes
2017-02-19 "Frusterick Manners" yes
2016-06-26 "Elenor Of Tsort" yes
Enable typesetting capabilities with CSS font properties such as font
face, size, weight, and color of text
Last updated on: 2020-07-31
Provides: Syntax
Repository: Source [https://github.com/ssahara/dw-plugin-typography]
Conflicts with: edittable
(code-end)
Similar to fontcolor, fontfamily, fontsize2, wrap
Tagged with fonts, style, typography
By Pawel Piekarski, Satoshi Sahara [mailto:sahara%20%5Bdot%5D%20satoshi%20%5Bat%5D%20gmail%20%5Bdot%5D%20com]
medialist numberedheadings abbr gview inlinejs canvas toctweak exttab3 pagetitle commentsyntax and 3 more
.--- Download and Installation
Search and install the plugin using the Extension Manager. Refer to
Plugins on how to install plugins manually.
** * Feature**
Typography plugin extends DokuWiki markup by typesetting
abilities.\\
(code-begin)
The ... markup tag specifies CSS font properties such as
font face, size, weight, and color of text. The parameter consists of
CSS property-value pairs ( property: value; ), each pair must be
separated by semicolon ( ; ) however last one may be omitted. You can
use abbreviated short name instead of full property name.
Some specific short name are also available as markup tag; (font
familiy/name), (size), (color), (background-color),
(weight). Typography plugin fully
(code-end)
replaces: fontfamily, fontsize2, and fontcolor.
(code-begin)
* short name - css property name description
fc color color of text
bg background-color background color of text
fs font-size font size of text (large or small)
fw font-weight weight of a font (thick or thin characters in text)
fv font-variant display text in a small-caps font
ff font-family font family for text, must be single quoted if a font name contains white-space and non-ASCII characters
lh line-height space between the lines
ls letter-spacing an extra space between characters (in px, em, etc)
ws word-spacing an additional space between words (in px, em, etc)
sp white-space specifies how white-space is handled (preserve or collapse)
va vertical-align sets the vertical alignment
- text-transform controls the capitalization of text (capitalize, uppercase or lowercase)
- text-shadow adds shadow to text
(web-font) specify a web font class which prefixed “wf-” wf
(code-end)
Sometimes, inline styles are necessary when you are building a page by
hand. You should however avoid them whenever possible for “semantic
markup”, better maintainability, and reusability. The wrap plugin will
provide most powerful and flexible method for specifying a class
attribute.
Using short syntax with Toolbar menu
1 of 4
05/11/2021 09:42 AMplugin:typography [DokuWiki]
https://www.dokuwiki.org/plugin:typography\\
Typography plugin provides short name (or single property) syntax
those are compatible with fontfamily, fontcolor, and fontsize2. If you
have enabled these three plugin, the short syntax are treated by
relevant plugins instead of this plugin. These short syntax are
available through toolbar icons.
.-- + Examples/Usage
* Single parameter example .lp
Large,
Very large,
Huge, and
smaller size text.
* Multiple parameter example:\\
Bold serif,
red Small-caps text
* Nesting syntax:\\
There is nothing either good or bad, \\ but thinking makes it so.
\\
//-- William Shakespeare, “Hamlet”, Act 2 scene 2//
* Using Web font \\
For getting started with the Google Fonts API
[https://developers.google.com/fonts/docs/getting_started] , you may
add a stylesheet link to request the desired web font(s) in
conf/meta.html file, for example:
(code-begin)
conf/meta.html
Then you can use the font name (eg. Tangerine) in the font-family value:
Making the Web Beautiful!Making the Web Beautiful!
(code-end)
+ Renderer support
Starting with release 2014-10-13 this plugin also supports ODT export
(Open Document Text format). On the left side you see a screenshot
taken from a typography test page opened in a browser, on the right
side you see the page exported to ODT:
2 of 4
05/11/2021 09:42 AMplugin:typography [DokuWiki]\\
https://www.dokuwiki.org/plugin:typography
As you might see there are currently some limitations regarding the
ODT export: altering the text size is currently not supported Altering
the text size is supported since release 2015-04-02. after a
line-height typography tag is closed, a new paragraph begins. ODT only
supports setting the line-height per paragraph. The XHTML renderer
stays in the same line after the tag is closed. word spacing is not
supported by the ODT format the white space options are currently not
supported
Note: The ODT export feature of typography plugin requires PHP 5 >= 5.3.0
+ Development
Typography plugin for DokuWiki was initially developed by Paweł
Piekarski, original version (v0.1101 / 2011-01-18) is still available
from http://treecode.pl/typography.html\\
[http://treecode.pl/typography.html] .
Since 2014-07-28, the plugin code has moved to github repository to
provide better accessibility for install and further development
opportunity. Thanks Paweł for your early work and encouraging me to
move the code to github. — s.sahara
[https://forum.dokuwiki.org/u/s.sahara] 2014-07-28 14:57\\
The ODT renderer feature is contribution from Lars (LarsDW223).
Change Log from github repository
update plugin.info
[https://github.com/ssahara/dw-plugin-typography/commit/fc4e6792a632bbfc1a570296c1feb9926853facc]
(2020-07-31 07:31)
Merge pull request #27 from Rainbow-Spike/patch-3
[https://github.com/ssahara/dw-plugin-typography/commit/fd288ccf1b1674209945cc8819e084d8ea235836]
(2020-07-31 07:25)
Merge pull request #25 from Rainbow-Spike/patch-1
[https://github.com/ssahara/dw-plugin-typography/commit/2886d3f0db3c0cd3d0bc742587da7791a19befff]
(2020-07-31 07:23)
White color also needed
[https://github.com/ssahara/dw-plugin-typography/commit/08c0432573d23e8a005c2303622ee3ab3769623d]
(2020-07-27 13:17)
Add Russian translation
[https://github.com/ssahara/dw-plugin-typography/commit/d0828f56899e683065334f2e7852676930a022ec]
(2020-07-27 13:15)
.-- + ToDo/Wish List
add fw: (font-weight) and sp: (white-space) parameters
it would be nice to have the text-align parameter
.-- + Known Bugs and Issues
see also: https://github.com/ssahara/dw-plugin-typography/issues
[https://github.com/ssahara/dw-plugin-typography/issues]
.-- + Not working
This plugin doesn't seem to be working at all for me. Is anyone else
having the same problem? ~~lenehey 10/31/2010 I get just garbage out
of this plugin. dokuwiki 2010-11-07a “Anteater”. Schplurtz. 13/03/2011
Can't second it. The first two given examples on the plugin homepage
are working as they should. —
M. S. [https://forum.dokuwiki.org/u/lupo49] 2011/03/14 18:17 .lp
The examples given worked fine in my “Anteater” — antoniomch 4/4/2011
This plugin works. There are only certain conditions in which it will
work. I find that it does not work for lists, and thus need to apply
the code to every single “bullet” in the list for it to apply. Not a
huge issue, but using styled formatting works fine. -eiri. 12/13/2013 .lp
This plugin is incompatible with the EditTable plugin which is not
working anymore when Typography is active. -Ronan 2014/08/04 (using
DokuWiki Binky version) .lp
The EditTable plugin worked fine with the Typography plugin on the DW
“Ponder Stibbons”. — s.sahara [https://forum.dokuwiki.org/u/s.sahara]
2014-08-06 02:40 .lp
The font weight does not work, please check and give an example
2015-08-07 .lp
For example try\\
Heavy text — LarsDW223
[https://forum.dokuwiki.org/u/LarsDW223] All the features I've tried
work fine with dokuwiki Release 2015-08-10a “Detritus”. You have to
have those semi-colons though. I've used the and tags with
great
3 of 4
05/11/2021 09:42 AMplugin:typography [DokuWiki]\\
https://www.dokuwiki.org/plugin:typography
success.
The font color icon doesn't show up correctly on USB Stick-Version of
“Elenor Of Tsort” the color picker doesn't show colors. Did solve it
by removing the if-case
//if ($isSameHost && $isColorSet) {
// }
Also tried to install font color plug in, still the same. - twdreamer 2017/04/10
Since 2016-05-16 version, no dependent of PHP GD library (gdlib) and
color picker icons are rendered as SVG instead of PNG if gdlib is not
available. I hope new version will work on USB Stick-Version of
DokuWiki.
— s.sahara [https://forum.dokuwiki.org/u/s.sahara] 2017-05-16 15:05\\
plugin/typography.txt · Last modified: 2020-07-31 07:34 by s-sahara
Imprint
4 of 4
05/11/2021 09:42 AM