» tagged pages
» logout

sorted by: recent | see : popular
Content Tagged with Dojo + svg

SitePen Blog " Custom fonts with dojox.gfx

Custom fonts thanks to rendering SVG font definitions. Who needs to wait for the browser wars to shake out?

Dojo: del.icio.us tag dojo

SitePen Blog " Custom fonts with dojox.gfx

"rendering SVG font definitions using dojox.gfx, coming in the Dojo Toolkit 1.2 release!"

Dojo: del.icio.us tag dojo

Custom fonts thanks to rendering SVG font definitions

Tom Trenka has a fantastic post on custom fonts with dojo.gfx that shows the SVG font definition implementation.

Part one of the article deals with painful, practical issues around the licensing of fonts. Tom discusses the various technical options out there, and then gets to the solution:

In general, the issues surrounding font usage have to do with the ability for someone to visit a web site, grab a specific file, and be able to reuse it without paying for a legitimate copy within any of the most commonly used programs (such as Office). Because of this concern, both the EOT and sIFR techniques work–because the fonts are embedded in a form that is not reusable in a common way.

One approach: the SVG Font Specification

Similarly, the SVG Font specification allows for the same concept—by working with a specific font definition, especially one that can be customized for the specific usage, the spec avoids most of the prickly issues surrounding licensing.

SVG fonts are relatively simple in concept; within the <defs> element, you define the main specifications of a font, and then you include specific glyph definitions. Optionally, you can include character-specific kerning information (the space between letters); some fonts include this type of hinting, and the SVG specification supports it.

JAVASCRIPT:
  1.  
  2. dojo.require("dojox.gfx");
  3. dojo.require("dojox.gfx.VectorText");
  4.  
  5. var myfont = dojox.gfx.getVectorFont(someUri);
  6.  
  7. var s = dojox.gfx.createSurface(someNode, width, height);
  8. var g = s.createGroup();
  9. var phrase = myfont.draw(
  10.     g,
  11.     { text: "The rain in Spain falls mainly on the plain.", align: "middle" },
  12.     { size: "3em" },
  13.     "blue"
  14. );
  15.  

Very impressive. If you are a typography wonk, then you have probably watched Helvetica: The Movie:

Ajax: Ajaxian

Vitamin Features " Create cross browser vector graphics

For years, web developers have asked the question, "How can I draw in the browser?". This simple question has anything but a straightforward answer. While the image tag is great, CSS is amazing, and Flash gets the job done,

Dojo: del.icio.us tag dojo

Sketch: SVN Editor in Dojo

I had totally missed this

Dojo: del.icio.us tag dojo

Page 1 | Next >>