With all the excitement around those two great articles on JagerMonkey yesterday, I forgot to blog about another amazing development, the DirectWrite & Direct2D landing in the nightly builds (though pref'd off.)
DirectWrite and Direct2D are Windows Vista and Windows 7 APIs for text and 2-D graphics that can be hardware accelerated.
This is brand new code and there are sure to be bugs. If you'd like to help us test these changes and you're on a supported platform, please download the latest nightly build and make these changes to enable the features:
(To disable, set gfx.font_rendering.directwrite.enabled to false, delete mozilla.widget.render-mode, then restart.)
If you find bugs, please report them here or to Bugzilla.
note: Some extensions like stylish and adblock+ may break the new features. If you're not seeing the new DirectWrite and Direct2D changes, try starting in Safe Mode.
update: If you want to help others find and test this new feature, please digg it. Thanks.
update2: The fonts look really great with DirectWrite enabled. Really great.
Posted by: Wladimir Palant | February 27, 2010 2:46 PM
Wladamir, this might be a starting point https://bugzilla.mozilla.org/show_bug.cgi?id=549090
- A
Posted by: Asa Dotzler | February 27, 2010 3:03 PM
Applying this changes to the nightly build made it crash upon start and also rendered my actual firefox 3.6 unusable. I had to research and manually modify the preferences file to make firefox work again for me.
You should do this under a different profile or inside a virtual machine...
Posted by: Matias Jose | February 27, 2010 11:01 PM
Matias, can you type about:crashes in the addressbar and locate the crash report(s) that this change caused?
- A
Posted by: Asa Dotzler | February 27, 2010 11:09 PM
Ah, ok, my guess was correct then. This issue is already fixed in the development builds of Adblock Plus then (because of https://bugzilla.mozilla.org/show_bug.cgi?id=542111).
Posted by: Wladimir Palant | February 28, 2010 2:09 AM
Can we get some screenshots?
Posted by: jb | February 28, 2010 5:49 AM
Sorry to be off-topic, but in Firefox 3.6, the back button fails to work on this blog Asa, any idea's as to why that could be?
Posted by: Chris | February 28, 2010 8:06 AM
what about the linux platform?
Posted by: Ionut Biru | February 28, 2010 9:48 AM
I am not sure if I am seeing any difference, maybe you could post some screenshots comparing the font quality?
Posted by: José | February 28, 2010 11:49 AM
Here Asa,
http://crash-stats.mozilla.com/report/index/bp-9124f929-aaec-4840-a9bd-e27762100227
http://crash-stats.mozilla.com/report/index/bp-703c7c2d-59f6-4ca1-bed9-96ca92100227
I don't know which one was first...
Posted by: Matias Jose | February 28, 2010 12:00 PM
Ionut: Linux doesn't offer comparable APIs yet.
Posted by: Robert O'Callahan | February 28, 2010 1:18 PM
The font rendering looks awful unless I zoom in.
And when I zoom in the text looks really, really nice.
Posted by: Stuart Foy | February 28, 2010 1:36 PM
Just to show an example.
http://i48.tinypic.com/25pog38.jpg
Normal rendering at the top.
Posted by: Stuart Foy | February 28, 2010 1:41 PM
I have the same problem as Matias Jose.
Posted by: Alexander Gee | February 28, 2010 4:46 PM
@Stuart Foy: The underline actually looks better with normal rendering. Assuming that the top text is without the Direct2D enabled.
Posted by: José | March 1, 2010 12:02 AM
Ugh. From Stuart Foy's screen capture, it looks like this is going to make the fonts as ugly and (at slightly smaller sizes, unreadable) on my PC as they are on my Mac. I appreciate the desire to show off your sub-pixel rendering, but below about 11-13 pixels fonts just look better aliased. (IMO, of course.) I'm glad this is off by default, but I'm guessing I'll need to bookmark this page so I can remember how to turn it off manually when the next major version of Firefox comes out.
Posted by: Jason | March 1, 2010 5:17 AM
Actually, I take it back, font looks really really nice now. I also noticed that certain pages, such as Ajaxian, scroll much smoother now (try zooming in 3x first) compared to without Direct2D.
Is there any equivalent API for Mac OS X?
Posted by: José | March 1, 2010 6:15 AM
Every thing does look really nice in some places, especially when zoomed in.
But iGoogle is an eye sore for me. Much faster though, when zoomed in, which is a god send!
Posted by: Stuart Foy | March 1, 2010 8:05 AM
the fonts look great with DirectWrite? Nope, for me it looks horrible. It becomes blurry and the edges of the fonts somehow "bleed out", especially the URL links, really really bad.
It also crashes all the time, or showing blank pages and strange things when navigating between pages. Currently it looks quite bad and it's way too crashy.
Posted by: wechrome | March 1, 2010 5:44 PM
Hi
i get some strange graphic errors when scrolling:
http://s5b.directupload.net/images/100302/mluitfgn.jpg
the slower I scroll the closer the lines are
i used firefox-3.7a3pre.en-US.win32.zip
no addons or other stuff
Posted by: Akira | March 2, 2010 2:39 AM
@wechrome
"This is brand new code and there are sure to be bugs."
Posted by: José | March 2, 2010 4:48 AM
I can confirm the issue that Akira has experienced with seeing lines when scrolling. I think that it was Fx 2 that had a similar or same problem.
I'm not technically knowledgeable enough (about anything) to know what's up, but it's like the page is being drawn/rendered too fast because,
the lines seem to show up (more often than not) towards the end of pages, and,
the lines hardly appear at all when the page is refreshed a few times.
Each time that the page is refreshed, the lines appear lower and lower on the page until they're gone completely and the issue goes away (somewhat, and not always) except for the very bottom of the page. Zooming in or out (by any factor) works the same as refreshing.
Anything to do with caching?
The lines appear right through and regardless of what the content is (text, graphics, etc).
Is there a specific bug filed for this issue yet?
@ Matias anything with the word nightly associated with it should be done in a new profile first.
In case you didn't know about this, I left some comments about how to run multiple versions of Firefox simultaneously here.
http://lifehacker.com/comment/19906785
I've had a major issue with page scrolling speed slowing to a crawl when pages are zoomed in 3.6. I didn't notice this in the nightly. Perhaps it's an add-on causing the issue for me.
@ Chris
History altogether doesn't work (back or forward).
That's odd.
I've had 3.7 running for 30-40 minutes now and it hasn't crashed. It's actually very fast on the slowest sites that I visit the most (AMO, deviantART.com and others).
As far as the quality of the appearance of fonts, I'm afraid that I can't offer any feedback on that. I need to zoom pages to read them.
Posted by: Ken Saunders | March 2, 2010 3:08 PM
Oh, one other thing, it would be cool if the about:config changes showed up in about:support under Modified Preferences to know what to remove and revert back to as far as settings.
I guess that it's still very early though.
Posted by: Ken Saunders | March 2, 2010 3:14 PM
@José
from my experience, "there are sure to be bugs" is quite an understatement, "it may likely be completely unusable" sounds more appropriate...
well, maybe it has something to do with the nVidia GT240M mobile GPU I have in my notebook...
Posted by: wechrome | March 2, 2010 5:47 PM
http://img59.imageshack.us/img59/5121/flashavisnapshot0003201.png
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a3pre) Gecko/20100302 Minefield/3.7a3pre
Posted by: Teoh Han Hui | March 2, 2010 11:51 PM
The comparable api for 2d and text is formed by OpenGL and OpenVG.
(OpenGL can render images and glyphs very fast. OpenVG is svg almost completely natively accelerated. The svg file is almost sent to the graphic card and rendered there, it's svg on steroids. )
Come on Firefox, support SVGFONTS and use OpenGL+OpenVG.
It's the alternative API for Linux, UNIX, MAC, (ES version for iPhone and Google's Android.)
Posted by: dfghdgdfh | March 4, 2010 10:43 AM
Don't forget to work on letting the text have motion blur when scrolling.
Strange as it sounds, this makes scrolling (moving) text better readable.
Posted by: swfgsgj | March 4, 2010 10:46 AM
The fonts are smoooooth. Firefox's back button does not work on this page though, really weird.
Posted by: Brandon | March 9, 2010 5:33 PM
I don't like the new font rendering. It makes it harder to read.
Posted by: Nothx | March 9, 2010 6:12 PM
Why didn't they just make the Cairo library more hardware accelerated ? It already had some acceleration if I'm not mistaken.
Posted by: Lennie | March 10, 2010 2:29 AM
Asa, where can I find more information on Adblock Plus breaking this feature? Particularly how I would see that it is broken? I guess that it is fixed in the latest development build (https://adblockplus.org/devbuilds/adblockplus/) but it would be nice to verify.