Tip: Bring your own fonts

Wednesday, August 08, 2007 at 8:56 PM



Did you know you can supply custom fonts for use in your gadget? Say you have a font named "illegible" contained in "MyIllegibleFont.TTF". To use the font in your gadget, first add it to gadget.gmanifest:
  <gadget minimumGoogleDesktopVersion="5.0.0.0">
<install>
<font src="MyIllegibleFont.TTF"/>
</install>
...
</gadget>
Now you can use the font in your text elements:
  <label font="illegible">Hello</label>
Check out this knowledge base entry for more information.

Have a tip you'd like to share? Send it to gd-developer AT google DOT com.

1 comment:

Bijoy Thangaraj said...

Wow! Great Tip James. I never knew this...

Keep posting these cool Tips...