Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Add fonts to the built-in Stickies widget Apps
The built-in Stickies dashboard widget lets you use a few Apple-selected fonts, but the selection doesn't have very many options. I wanted a way to add other fonts to the Stickies widget. By adding two lines to the code that supports the widget, you can add any font on your computer.

It may be helpful to have some knowledge of HTML and JavaScript, but the procedure is simple enough that you should be able to do it even if you don't have experience with those languages.

The first step is to make a copy of the widget so you're not working on the original. Go to /Library/Widgets and find Stickies. Copy it and paste it into ~/Library/Widgets and name it something else, like StickiesWithFonts.

Close the Stickies widget in your Dashboard; you won't be needing that version anymore.

Next, we begin modifying the code. You'll need a good text editor like TextWrangler or Fraise (both free).

Now, find the first file we're going to modify. Right click on the copy you made (StickiesWithFonts) and choose Show Package Contents. In the new window that appears, open the Stickies.js file with your editor. Next is to modify the JavaScript code.
  • Find the line that goes var fontArray = new Array; (it should be around line 407).
  • Below it are a few other lines that are similar to each other. They follow the form of fontArray["font name"] = 0;.
  • Copy the last line of this type (probably American Typewriter) and paste it below itself.
  • Now, change the line you pasted to this: fontArray["font name"] = 8;.
  • For the font name, type in the name of the font you want to add. Make the number at the end of the line one more than the line above it.
  • Save this file and close it.
Now, back in the Package Contents window, open Stickies.html in your editor. This is the second (and final) document we need to modify, in this one, the HTML code.

To start, find the line that goes

<select id='font-popup' class='popup' onchange='fontchanged(this);'> (should be around line 40).

Below, you'll find a few lines that are similar to each other. Each one begins with<option value.

As with the previous file, copy the last line and paste it below itself. Change the line say <option value='font name'>Font Name</option> where font name is the name of the font you added earlier.

Now, restart Dashboard by opening Terminal and typing killall Dock.

Now you're ready to install the new widget you made. Double click on your StickiesWithFonts in ~/Library/Widgets. It will open in Dashboard.

Choose a font how you normally would, and you'll notice your new font in the popup menu. Select it, and you'll be writing in your newly-added font like this.

Repeat this process whenever you want to add another font.

[crarko adds: I haven't tested this one. As advised, make sure you edit a copy of the original in case something goes awry.]
  • Currently 5.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (3 votes cast)

Add fonts to the built-in Stickies widget | 2 comments | Create New Account
Click here to return to the 'Add fonts to the built-in Stickies widget' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Add fonts to the built-in Stickies widget
Authored by: da2357 on Apr 25, '11 11:01:28AM

Works as described. By putting a copy of StickiesWithFonts in the ~/Library/Widgets folder, you're leaving the original alone in case Apple updates it.

Thanks for the tip!

[ Reply to This | # ]
Add fonts to the built-in Stickies widget
Authored by: pakogiezon on Apr 26, '11 06:53:52AM

Looking for a sticky note program ( preferably like mac's sticky notes ) for my desktop that mimmics apple mac's sticky notes. The main things I am looking for are 1. create as many notes as I want 2. and I can move them anywhere I want. I have windows vista and it will only allow you to create the notes in one place. I do not like this. I want to move them where I need them.

<b><a href="">tel aviv dance</a></b>

[ Reply to This | # ]