The MP3car.com Store  

Welcome to the MP3Car.com forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. Registering will also remove advertisements. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   MP3Car.com > Mp3Car Technical > Software & Software Development > Front Ends > StreetDeck > DigitalMods (Scripts / API)

Reply
 
Thread Tools Display Modes
Old 02-16-2006, 04:50 PM   #1
Raw Wave
 
god_of_cpu's Avatar
 
Join Date: Jan 2004
Location: SilverSpring Maryland
Vehicle: 2003/Infiniti/G35 Sport Coupe
Posts: 2,957
My Photos: (0)
StreetDeck Fonts

All fonts in StreetDeck are actually created from specially formatted PNG images. Unlike traditional fonts you use on your desktop like "Arial" and "Times New Roman", the different fonts in StreetDeck do not necessarily represent different font faces, rather a different font exists for each different size and bold attribute for each character. Taking a look at the fonts sub folder in the default streetdeck skin folder (My Documents\StreetDeck\UI\Skins\Default\Fonts) we can see the entire list of fonts supported by StreetDeck. Additional fonts can NOT be added to this sub folder, only fonts with the shown names will be used by StreetDeck when loading the skin.
Name:  Fonts.JPG
Views: 927
Size:  32.6 KB


Most of the fonts in this sub folder are based off the arial font face, bold and unbold fonts look similar, and correspond to the relative height specified in the font name. However, this does not have to be true. For example, notice the differences between Font125Bold.png and Font125.png. The fonts are completely different colors and have a different shading applied to them. Although, all the default fonts are based on the Arial font face, you can apply any number of font faces to the different files, you can even mix and match different font faces in the same file for different characters, i.e. only numbers are italicized. This is the real power of bitmap based fonts, anything you can draw, you can make into a font. i.e. you could make a font with flames coming out of the letters, add drop shadows, or outlines anything you want, as long as you stay within a few loose contraints of the streetdeck font file format.
Name:  FontComp.png
Views: 921
Size:  98.3 KB



An example font from the Default skin in streetdeck is shown below. Notice the single pink pixel RGB(255, 0, 255) found next to and below all the characters in the image. These pixels will not be rendered, but simply denote the width of each corresponding character. Similarly, the first single pink pixel found in the first column of the image scanning from top to bottom denotes the height of EVERY character in the font. All charcters must be the same height. Notice, however, that the characters can contain white space above and below them to account for the difference in height of say a lower case "a" and an upper case "A".
Name:  Font25.png
Views: 901
Size:  17.7 KB

Making a font file like the one shown above is actually a painstaking and extremely difficult process to do manually, since you have to mark and line up all the characters individually. To simplify this process, the StreetDeck development enviornment offers a font template creation and importation tool and premade font templates. To create a new font, run streetdeck in developer mode and goto Font | Create Font Template. Specify the maximum height in pixels of the font you want to create and a filename to save it to. A properly formatted font template like the one shown below on the left will be created; your job is to add the characters to it to make it look like the image below on the right. The blue lines in the templete file show the space that each charcter MUST fit in and the single charcter at the top right of each space indicates the character that should be placed in that space. Once the template is modifed with the new font, each space should contain the final character. All lines, background colors, and the top right characters should be cleared from the file leaving only the characters you want for the font in the space with a completely transparent background. Optionally, rather then using StreetDeck to create the font templates in PNG format, you can use the original PSD files used to create the default StreetDeck fonts found here to greatly ease the task of creating a new font if all you want to do is change the font face and not change the size of the individual characters. Simply use photoshop or another PSD supporting program to alter the text elements in the PSD file and save it to PNG format when your done for importation back into StreetDeck.
Name:  fonttemplate.png
Views: 879
Size:  4.7 KB Name:  FontTemplate2.png
Views: 900
Size:  6.6 KB


After a font template is completed, it needs to be imported back into StreetDeck where it will be converted from a template into a font skin image file and placed in the current skin's font sub folder. To do this goto "Font | Import Font Image" and select the font to import the font image as. All controls that use text drawn with the specified font will now be drawn with the font from the new image.
__________________
StreetDeck.com Developer (I am Chuck)
Get StreetDeck at http://www.streetdeck.com
The Official StreetDeck Forums have moved, please visit us at http://www.streetdeck.com/forum for official support for Streetdeck.

Last edited by god_of_cpu : 08-28-2006 at 09:20 AM.
god_of_cpu is offline   Reply With Quote
Sponsored Links
Old 02-16-2006, 05:21 PM   #2
Raw Wave
 
god_of_cpu's Avatar
 
Join Date: Jan 2004
Location: SilverSpring Maryland
Vehicle: 2003/Infiniti/G35 Sport Coupe
Posts: 2,957
My Photos: (0)
Font Margins

When a font template is imported into StreetDeck. The start and stop of each character is determined by the start and stop of the first non transparent pixel found in a column in the template image. However, when rendering text, characters should usually not be touching each other, rather there should be some white space between each character in the word, this can vary depending on the letter. For example, notice that there is a couple of pixels of white space between pipe characters "|||||" and only 1 pixel of white space between i characters "iiiii" to account for this, StreetDeck right and left margins for each individual character for a font can be specified by going to "Fonts | Font Margins". A negative margin for a character means it will be rendered using some of the space for the previous or following character in the text string being rendered and a positive margin means extra white space will be added between characters. The font below shows negative margins for most characters since each character in this particular font is surrounded by a black outline that should be counted as white space, not as part of the character.
Name:  FontMagins.JPG
Views: 887
Size:  27.0 KB
__________________
StreetDeck.com Developer (I am Chuck)
Get StreetDeck at http://www.streetdeck.com
The Official StreetDeck Forums have moved, please visit us at http://www.streetdeck.com/forum for official support for Streetdeck.

Last edited by god_of_cpu : 02-16-2006 at 05:31 PM.
god_of_cpu is offline   Reply With Quote
Sponsored Links
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
StreetDeck Input Plugins (Remotes, Steering Wheel Controls, etc.) god_of_cpu StreetDeck F.A.Q. 15 08-21-2007 03:46 PM
StreetDeck File Extentions (.sdu and .sdz) god_of_cpu StreetDeck F.A.Q. 0 01-22-2006 10:26 PM
What is StreetDeck, The official answer god_of_cpu StreetDeck 8 01-06-2006 11:33 AM
Why does one need fonts with a skin? ITL RR Skins 5 12-01-2005 05:33 PM
uninstalling my fonts? liquid_smoke Centrafuse 2 11-01-2005 01:10 PM


All times are GMT -5. The time now is 11:20 AM.


Sponsored Links
The MP3car.com Store

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Copyright © 1999 - 2008 Mp3Car.com Inc.
Ad Management by RedTyger
Message Board Statistics