Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Canvas itself does not support text; there are various hacks to, e.g., port PS fonts to canvas, but it's a really ugly scene. Other methods include overlaying HTML text via CSS and server-side image rendering fonts. It's all really ugly.



Firefox 3 supports native text rendering. There's a couple demos that show this (although you're out in the cold in other browsers, for now at least).


Yup it does, and it's been recently added to the spec (http://www.whatwg.org/specs/web-apps/current-work/#text). Unfortunately, the font rendering as currently in the spec won't return the path of the font, which is a feature that allows nodebox to do some really neat things (eg http://nodebox.net/code/index.php/LetterKnitter).


Is there any word on whether other browsers will be implementing this in the future? It's what's keeping me from using canvas today, and partially what's keeping me from writing a certain app I've been thinking about for a little while.


partially what's keeping me from writing a certain app I've been thinking about for a little while

Have you played with SVG?


In my experience it's painfully slow and advanced features are spottily supported on every implementation I've tried; is yours different?


I've tested some of my SVG demos with FF 3 and they run much faster than with FF 2 (I think that's due to Cairo being integrated into Firefox 3). Opera and Safari are very fast compared to FF 2, too.

As for feature completeness I agree with you. The Firefox SVG team is very small and not funded by the Mozilla corporation (at least that was the case last year when I talked to one of its members) - the SVG standard, on the other hand, is HUGE.


I'm using it for a simple web app, testing in FF2/FF3/Safari, seems to work fine... there are some annoying bugs in the implementation (the kind that have been open for years), and inconsistencies between Safari and FF, but nothing I couldn't work around so far.

What were your issues?


We started by using graphviz to generate svg, but then couldn't find any decent in-line svg viewers. Do you know of any non-java applet inline svg viewers?


Not yet, I've looked at it a bit but haven't looked in to browser compatability at all.


Processing.js now supports Ture Type Fonts: http://processingjs.org/source/ttf-pfonts/ttf-pfont-pjs.html


I mean TrueType fonts of course :P




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: