Turning Text Into Graphics

How do you turn text into graphics? Easy. I’m using a small PHP script which converts any text into a graphic image. This article goes through the step-by-step process on how to turn your titles into graphic images in your WordPress Themes or on any HTML page that you like.

All you need is this neat and powerful little file called titles.php created by Patrick Stuart.

1. Before we get started, let’s test the script by cutting and pasting the following URL to your browser.

http://ulyssesonline.com/files/titles.php?letters=Hello World

Awesome, it works. This script passes the text “Hello World” to the titles script via the browser. As you may have noticed, by default, we are using the Boston True Type Font.

2. Now, let’s try the simple PHP script. Download the titles.php and the Boston files and place both files on your web server. Assuming the file is in the root directory, you can call the PHP file using this HTML code:

<img src=”titles.php?letters=Hello Universe”/>

3. Cool. How about using other fonts? Well, you can use hundreds of fonts that are freely available at webpublicity.com. Just download the fonts. For simplicity sake, rename the files in small caps without any spaces. Upload the fonts to your directory, then edit the titles.php file to reflect the new font. The sample code shows the Parisian True Type Font is now the default.

$font = './parisian.ttf';

4. To change font size, text margin, angle, color, background color, shadows, etc. just edit titles.php and change the following variables. Save and refresh the page.

$txt_size = 24;   // Size of Text
$x_margin = 5;   // Set Margin of x of text
$y_margin = 10;   // Set Margin of y of text
$txt_angle = 0;   // Angle of Text
$shdw_angle = 0;   // Angle of Text Shadow
$shdw_x_offset = 1;   // Horizontal Shadow offset
$shdw_y_offset = 1;   // Vertical Shadow offset
$bg_r = 255;   // Background Color Red
$bg_g = 255;   // Background Color Green
$bg_b = 255;   // Background Color Blue
$txt_r = 0;   // Text Color Red
$txt_g = 0;   // Text Color Green
$txt_b = 0;   // Text Color Blue
$shdw_r = 255;   // Text Shadow Color Red
$shdw_g = 255;   // Text Shadow Color Green
$shdw_b = 255;   // Text Shadow Color Blue

A New Look

I’ve decided to change things a little bit by changing my color scheme. It’s a far cry from the original Black-Letterhead theme, but believe it or not, it still uses the same framework. My new theme now uses a dark-red color scheme similar to the colors of the old Roman Empire. The biggest change is the use of a PHP script that converts text to graphic images. The header, page and post titles are actually graphic images generated on the fly whenever a page is requested.

Vista OS

Dean Takahashi writes in the San Jose Mercury News the complexity of the Microsoft Vista Project, the spiraling costs, the amount of labor it took to complete the project, and the product’s potential in a monopolized market. As much as 10,000 Microsoft employees have worked on the Vista project totaling to about $10 billion dollars in development labor cost alone. It’s just a drop in the bucket for Microsoft since it has money to burn.

Speaking of profits, how much money will Microsoft make from this product? An estimated 20% of businesses this year will move over to Vista, that’s roughly 76 million computers. Most of it is due to technology refresh as new computers coming in are fitted with the new Vista operating system. Microsoft expects to make $11.5 billion next year in Vista sales alone. I am sure profits will continue to trickle in the years to come due to the lack of competitors in the desktop operating systems market.

No doubt Vista will be successful. It will be around for a number of years. Maybe, Vista will be the last of its kind. It took five years to develop Vista. I can’t imagine Microsoft launching another Vista-like project in the future. In the meantime, I plan to use the Fedora desktop, a free Linux variant courtesy of Redhat. It is stable, robust and most of all, the price is right, it’s free. To me, this is the future of the desktop operating system.

Fake Your Space

Jessica Guynn writes in SFGate, the online version of the San Francisco Chronicle, how to fake your space. What did she really mean by faking your space? Well, for $0.99 cents a month, you can spruce up your MySpace or FaceBook accounts by signing up with FakeYourSpace which promises to give you a long list of fake hot friends. Your model-beautiful friends will leave you messages, comments and will even pose as your lover. Do you want to make your ex jealous? Or just want to become popular? Well, sign up with FakeYourSpace. Well, hurry now!