@t[Graphtext Plugin]~~META:date created = 2012-11-03~~ Graphtext is a Flatpress plugin to create images showing text. [gt paper=804000]Like[/gt] [gt font=code2000 paper=408040 ink=ffff00 size=32]these[/gt] [gt font=arialuni paper=4040a0 size=48 height=64]words.[/gt] This is very useful for displaying text with special characters that may not be available in all browsers and all devices. An image will appear the same everywhere. Without Graphtext, you have to type your text in an editor, make a screenshot, crop the image, save it, upload it, refer to it in your text, and there’s another file to consume hard drive space and time when making a backup or moving your blog. With Graphtext, you can simply type a tag and forget about everything else. On the other hand, of course, it takes some server time to create the image each time the page is loaded. To install Graphtext, download it from [[http://lattilad.org/store/graphtext.zip|here,]] unzip it and upload it to your blog, in a folder called //fp-plugins/graphtext.// Then choose the fonts you need and upload them in //fp-plugins/graphtext/font.// Go to Flatpress Control Panel, Plugins, and enable Graphtext. Now you’re ready. Graphtext gives you a new tag: GT. [gt]this is the text[/gt] → [gt]this is the text[/gt] Why big yellow letters on a blue background? Because this was the style used before. To change the look of your text, use attributes for the tag: **font**=//font name// to change the font (a file name from the //font// folder, without the ending //.ttf//) **ink**=//ink color// to change the color of the letters (six hexadecimal digits in the format //rrggbb//) **paper**=//paper color// to change the color of the background **size**=//size// to change the size of the letters (in points) **height**=//height// to change the height of the containing rectangle (in points; use a number greater than //size// **up**=//pixels// to move the letters up in the rectangle **down**=//pixels// to move the letters down in the rectangle Default values are: **font=times** (needs //times.ttf// to be present) **size=24** (24 points) **ink=ffffff** (white letters) **paper=000000** (black background) **height=40** (40 points high) **up=0** and **down=0** (letters not moved) Specify any attribute to change them and omit any of them to leave unchanged. For example, if now I type [gt size=12]smaller[/gt], I will get [gt size=12]smaller[/gt] text, but in the same font and color, since I left them unchanged. And in a big box, since I left //height// unchanged, too. [gt height=12]too small, letters g, y, q, p cropped[/gt] → [gt height=12]too small, letters g, y, q, p cropped[/gt] Here you can see why should //height// be greater than //size.// Now they’re both 12, but this crops descenders. You can try moving your text up: [gt up=4]great, but ÁÁÁ[/gt] → [gt up=4]great, but ÁÁÁ[/gt] but you can’t display both descenders and accented uppercase letters. So rather increase //height// instead. Graphtext doesn’t know everything and even won’t until a PHP bug is fixed. For example, these Devanagari consonant clusters are created with the [[http://www.sanskritweb.net/cakram|Chandas]] font that’s capable to display correct ligatures, but PHP can’t handle them. [gt font=chandas size=60 height=72 up=0 paper=000000 ink=ffffff]क्त त्त द्व[/gt] These are the same ligatures typed with the same font in a text editor and cropped from a screenshot – just like the way I described before: {{121103-2.png}} So if you need text written the second way, Graphtext cannot help yet. @blogf[!]