Thursday, February 07, 2008
Wednesday, February 06, 2008
embedding fonts
[haXe] Embedded fonts in Flash 9 target?
After watching the Helvetica Movie, I'm thinking about fonts a lot, and it's really cool that Flash lets you embed whatever font you like right in the file.
I'm really digging Flash lately, it has a lot of power. It's awesome writing it with haXe, because I get all the goodness of Linux and GPLed code, but still get to write some very powerful display applications.
The language count is going up and up, for my new project I'm going to be writing code in:
haXe
Actionscript 3.0
Flash
swfmill XML
C++
Ruby (on Rails)
MySQL
XHTML/CSS
Sweeeeeet!
embed bitmap in haxe
I wanted to use swfmill to generate a library of images and then display them in haXe. Krzysztof Rozalski came up with a solution on the haXe mailing list. Thanks Christopher, this was really helpful!
The code I wrote ended up looking like:
swflib.xml:
<?xml version="1.0" encoding="iso-8859-1" ?>
<movie version="9" width="320" height="240" framerate="12">
<background color="#ffffff"/>
<frame>
<library>
<bitmap id="MyBitmapData" name="MyBitmapData" import="library/play.png" />
</library>
</frame>
</movie>
And the haXe code:
import flash.display.BitmapData;
class MyBitmapData extends BitmapData
{
public function new()
{
super(0,0);
}
}
class SwfImport
{
static function main ()
{
var bitmapData:BitmapData;
bitmapData = new MyBitmapData();
flash.Lib.current.addChild( new flash.display.Bitmap(
bitmapData, flash.display.PixelSnapping.AUTO, true ) );
}
}
This is all compiled with:
-main SwfImport
-swf ../swfimport.swf
-swf-version 9
-swf-lib swflib.swf
bluegene web
Wow, the IBM Blue/Gene architecture is pretty amazing, with 1024 processors per rack and theoretically up to 16,384 racks, giving you 67.1m cores with 32PB of memory.
They're using this architecture to build their own model of the internet.
iswitchb and rails
I'm learning about Icicles, which is an Emacs mode to more efficiently complete text and switch between buffers.
I've been a big fan of iswitchb since switching to it about 5 years ago, but it's being stretched with these Ruby on Rails projects that I'm working on. Rails requires you to switch back and forth between large numbers of files. I have 12 Emacs windows open, and have different source files in each one, yet I still find myself doing a lot of switching between buffers.
Tuesday, February 05, 2008
calling from the coast
callingfromthecoast.com is a website that has videos about interesting topics from the west coast of Canada. Very neat.
offspring
offspring.js is an interesting little javascript program that adds things like "nth-child" by iterating over the DOM.
It does slow down your site a bit, because it has to iterate over all the elements in the dom, but in most cases, this is less than 500ms, so not so bad.
Monday, February 04, 2008
Sunday, February 03, 2008
Friday, February 01, 2008
Subscribe to:
Posts (Atom)