online cheap medications order generic bactrim price, and buy cheap online buy cheap discount lasix, and cheap pharmacy lipitor without rx, and online ordering accutane review, and order cheap how much acyclovir to kill, and buy cheapest synthroid order online, and pharmacy cheapest cheap baclofen pill, and order online directions for taking clomid, and online cheap medications cheap hydrochlorothiazide without rx, and cheap pharmacy purchase amoxil cod overnight delivery, and cheap pharmacy arimidex online overnight, and buy cheap online buy buy zithromax pill online, and order online online valtrex prescription in utah, and buy cheapest buy cheap discount online flagyl, and buy online zovirax (acyclovir) cheapest, and buy cheap how to buy prozac online without a rx, and cheap pharmacy cash on delivery paxil, and cheap pharmacy diflucan cod delivery next day, and purchase no prescription propecia cancer prevention, and generic medications neurontin and online overnight delivery, and purchase no prescription norvasc fedex shipping, and online ordering purchase doxycycline next day cod, and ordering online feminizing effects of premarin, and buy cheap online buspar and wellbutrin, and online cheap medications order overnight retin-a, and

Some Alchemy in AlivePDF !

Here is a great news for AlivePDF, I am currently considering using Alchemy to handle all the fonts parsing (TrueType/OpenType) through a c lib called TTF2PT1. This is the cool thing with Alchemy, any c or c++ lib can be compiled to AVM2 bytecode and used in the Flash Player. If you know the TTF2PT1 lib, it handles all the font parsing that AlivePDF is almost doing. The cool thing is that this lib is fully working and the extraction of glyph widths is perfect and AlivePDF will benefit from that.

If you guys remember the current problem we have in AlivePDF when embedding fonts, glyphs may overlap and be incorrectly positioned, this lib will fix all that and handle even complex fonts. The cool thing is that thanks to Alchemy, this c lib will run and do all its work in the Flash Player and smoothly interact with the AlivePDF core engine.

Such a decision could mean that the final release of AlivePDF with complete and fully working font embedding support will be Flash Player 10 only, as Alchemy is Flash Player 10 only. I know you guys may be against that, so the font embedding logic will be given as a seperated SWC than you can link as an extension of AlivePDF so that the core PDF engine from AlivePDF stays fully compatible with Flash Player 9.

So now, let's see a demo, if you download TTF2PT1 and ask to generate the .AFM file for a font with the following command (-a MyFont.ttf) you'll end up with an AFM file (Adobe Font Metrics) which is gold for AlivePDF cause it gives all the informations needed for embedding a font in a PDF.

Click anywhere in the SWF below, the C lib will be called to extract the font characteristics (from a MyriadWebPro.ttf file) and produce an nice AFM file :

A Flash animation should have appeared here, but it seems that your browser has an older version of the Flash Player or it is not installed at all. Please, install the last release of the Flash Player now, then reload this page.

Ok, I admit it, nothing really exciting but believe me, it's a huge step for AlivePDF! :)

Comments 17

  1. Matt Bolt wrote:

    Nice work Thibault! I understand your excitement – Getting complex C libs to work via alchemy can be a nightmare sometimes. I’ve been working on a Ming port for a few weeks now – very frustrating! Congrats on your success thus far… Good luck!

    Posted 05 Nov 2009 at 2:36 am
  2. Thibault Imbert wrote:

    Hi Matt,

    Thanks! As you say it, nightmare is the appropriate word :) Any luck with libming ?


    Posted 05 Nov 2009 at 2:59 am
  3. Matt Bolt wrote:

    For a while, I was trying the “all or nothing” approach without success, but Ive slowly been peeling away layers and it’s getting close. Like anything else… Just wish I had more time to work on it. What would be really nice is an Alchemy update!

    Posted 05 Nov 2009 at 8:08 am
  4. Wayne wrote:

    Closer and closer to the ‘Holy Grail’ of AlivePDF – getting the font metrics to work!

    I’m sure that the flash 9/10 issue isn’t a huge set-back – if it is currently for anyone then it’s only a matter of time before this is outlived.

    Eagerly looking forward to an update to test this out!

    Cheers Thibault.

    Posted 05 Nov 2009 at 10:27 am
  5. Thibault Imbert wrote:

    Hi Wayne,

    Thanks for your encouraging words ;)


    Posted 05 Nov 2009 at 10:34 am
  6. Samuel Tilly wrote:

    This is great! awesome work, really hope you get this working.

    Posted 05 Nov 2009 at 1:13 pm
  7. Jens Wegar wrote:

    Really happy to see that you’re working so actively on AlivePDF right now. From the sound of it, the next version will have some very nice new features :)

    Posted 05 Nov 2009 at 8:23 pm
  8. Thibault Imbert wrote:

    Hi Jens,

    Thanks! Yes, next version should rock! :)


    Posted 05 Nov 2009 at 10:20 pm
  9. Mike Almond wrote:

    Hi Thibault,

    I rencently stumbled upon the Web Open Font Format – WOFF – and as a little ByteArray experiment, made a parser for it in as3.

    A WOFF file contains the same font tables as a ttf/otf font along with optional metadata and private data – the font tables and metadata are compresed with zlib, resulting in much smaller files than a normal ttf for example.

    So, what I’m wondering is – could the C lib be used to parse/convert the TTF/OTF font-tables from a WOFF, like it parses a regular font?

    I’d be happy to share my WOFF parser code if you’d like to use it, I plan to open-source it soon anyway… but have no time to write a post about it at the moment.

    Here’s some WOFF info…
    WOFF in Firefox3.6:

    WOFF file format:

    Posted 06 Nov 2009 at 3:37 pm
  10. Thibault Imbert wrote:

    Hi Mike,

    Thanks for the information, I did not know about this font format and it’s a great news for AlivePDF, it looks much newer and able to describe TrueType but also OpenType font, it is perfect. The current c lib does not handle the WOFF file format but an AS3 parser can do the trick and be used inside AlivePDF.

    I think AlivePDF can get benefits from all that, we will use the c lib to parse former font files like .ttf or .otf and another engine to parse .woff font files. The cool thing would be extracting the font tables in AS3 from the .woff files and pass them to the c lib which parse them, cause font tables data are exactly the same across all those formats.

    Thanks again for the information, definitely cool.


    Posted 06 Nov 2009 at 4:08 pm
  11. Mike Almond wrote:

    Hey Thibault,
    That’s that’s what I was thinking… I’m currently able to extract the font tables (and all the other data) from WOFF but need to parse them. I’ll be blogging about it and releasing the code soon so keep an eye out for it ;)

    Posted 06 Nov 2009 at 5:16 pm
  12. Thibault Imbert wrote:

    Hi Mike,


    Let me know!


    Posted 06 Nov 2009 at 5:22 pm
  13. Mike Almond wrote:

    You can now get the AS3 WOFF parser here….

    Would be ace to see something like this in AlivePDF :) Let me know how it goes!

    Posted 09 Nov 2009 at 11:57 am
  14. Jasper Rense wrote:

    Great news for AlivePDF! Sounds like no more cmap/cid/etc. issues ;-)

    Posted 09 Nov 2009 at 3:15 pm
  15. Afshin K wrote:

    Really exciting news!

    Posted 10 Nov 2009 at 4:32 pm
  16. mityok wrote:

    Thibault Hello!
    I’ve just stumbled upon this entry, and I was wondering if it’s possible to use this way to load fonts in flash to use in text fields and most important text engine.
    Thank you very much, you are always such a huge resource of knowledge.

    Posted 07 Nov 2010 at 1:20 pm
  17. web informer wrote:

    how to create canvas in to a pdf from a flex application. I have already made pdf for text and images. But if i want to claim for canvas will you please let me know the code for it

    Posted 20 Jan 2011 at 9:45 am

Trackbacks & Pingbacks 1

  1. From woff - on 27 Jan 2010 at 9:27 pm

    [...] loading restrictions, as a Web font format, and expect to license fonts for Web use in …AlivePDF – Some Alchemy in AlivePDF !So, what I'm wondering is could the C lib be used to parse/convert the TTF/OTF font-tables from a [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *