====== FontFace Plugin ====== ---- plugin ---- description: Embed fonts (via uploaded fonts or Google Fonts) author : Anika Henke email : anika@selfthinker.org type : action lastupdate : 2016-04-06 compatible : Lemming, Anteater, Rincewind, Angua, Adora Belle, Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners, Greebo, !Hogfather, 2023-04-04 depends : conflicts : similar : tags : fonts, typography, style downloadurl: https://github.com/selfthinker/dokuwiki_plugin_fontface/zipball/master bugtracker : https://github.com/selfthinker/dokuwiki_plugin_fontface/issues sourcerepo : https://github.com/selfthinker/dokuwiki_plugin_fontface/ donationurl: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=11071728 ---- ===== Installation ===== Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually. :!: **External requirements:** If you're not using a Google Font, then the used font needs to be **uploaded** into the plugin's **"./fonts/"** directory first. To help you decide on the technique, see [[http://socialcompare.com/en/comparison/comparison-of-web-fonts-solutions|Comparison of web fonts solutions on SocialCompare.com]] ==== Uploaded fonts (@font-face) ==== You need to upload at least two files into the plugin's "fonts" directory to accommodate the majority of all the different browsers: * .ttf * .woff Optionally you can also add: * .eot * .svg * .woff2 Here you will find ready-made font packages which will already contain all four of them: http://www.fontsquirrel.com/fontface ==== Google Fonts ==== You don't need to upload any files. You can use any of the fonts listed here: http://www.google.com/webfonts You can add variants into the "fontFile" option, e.g. 'Expletus+Sans:regular,bold'. ===== Configuration and Settings ===== * **''technique''**: Font embedding technique, with a choice of 'fontface' (Uploaded fonts) and 'google' (Google Fonts) * **''fontFile''**: Font file name (for uploaded fonts: without extension; for Google fonts: what comes after "''?family=''", [[#installation|see instructions]]) * **''fontName''**: Font name (as used in CSS) * **''elements''**: For which elements should the font be used? (comma separated, not needed when font is used in other CSS files) * **''genericFamily''**: Generic font family (serif, sans-serif, monospace, cursive, fantasy) * **''fontFile2''**: Second font file name * **''fontName2''**: Second font name * **''elements2''**: For which elements should the second font be used? * **''genericFamily2''**: Second generic font family Go Admin menu > Configuration manager > Font face > Do your changes > Save. ===== Development ===== ==== Change Log ==== {{rss>https://github.com/selfthinker/dokuwiki_plugin_fontface/commits/master.atom date}} ==== Known Bugs and Issues & ToDo/Wish List ==== Have a look at [[https://github.com/selfthinker/dokuwiki_plugin_fontface/issues?label=bug|bugs]], [[https://github.com/selfthinker/dokuwiki_plugin_fontface/issues?label=feature|feature requests]] and [[https://github.com/selfthinker/dokuwiki_plugin_fontface/issues?label=todo|ToDos]] in the bug tracker. ===== Discussion ===== Before reporting any issues (bugs or requests), please first take a look at the [[faq:pluginproblems|FAQ on plugin problems]]. You can report any issues either on the [[https://github.com/selfthinker/dokuwiki_plugin_fontface/issues|Issue Tracker]] or here in this section. ---- Having some trouble getting this working 100% with Google Ubuntu font. These are my settings:\\ Google Font API\\ fontFile: \\ fontName: font-family: 'Ubuntu', sans-serif;\\ headings: h1 only checked\\ addStyles: checked\\ genericFamily: sans-serif\\ The font appears on the site, but bold and italic do not work. It's probably something simple in the setup that I'm missing but I can't see what it is. Suggestion? > The settings should be the following instead: > fontFile: ''Ubuntu:400,400italic,700,700italic'' > fontName: ''Ubuntu'' > --- [[user>ach|Anika Henke]] //2011/08/06 12:46// >> I have now clarified the config options in the config manager (and on this page). --- [[user>ach|Anika Henke]] //2015-04-05 15:33// How can i use https://fonts.googleapis.com/earlyaccess/scheherazade.css > Early access Google fonts are currently not supported, sorry. You could add it yourself to the ''meta.html'' file (if your template supports that). --- [[user>ach|Anika Henke]] //2015-04-05 15:33// possible bug - fonts are being served from local plugin directory. When 1st going to my site, the fonts don't load (start.txt) page. But when you navigate to another page, they load fine and then will also load on the start.txt page. Might be an issue with other items getting loaded into the browser before the fonts? www.james-johnson.net site name & p.claim should load as fonts from the font directory. > I have the same problem. I use https://gtmetrix.com to check the performance of site and I see this issue that some .woff fonts not loaded. I have this warning: The following requests are returning 404/410 responses. Either fix the broken links, or remove the references to the non-existent resources. It seems there is a problem with plugin! --- [[user>atronoush|atronoush]] //2015-09-11 14:36// >> I cannot reproduce this locally. And I cannot check the above URL as it doesn't use DokuWiki anymore. Do you have any URL you can share where this issue appears? --- [[user>ach|Anika Henke]] //2016-04-06 21:01//