On 04/30/2011 04:07 AM, Werner LEMBERG wrote:
I've had some hope to show working bytecode stuff at the beginning of May, but things are a bit more complicated, unfortunately: While the library has been extended to support generated bytecode already, I have first to define some auxiliary bytecode functions to support hinting similar to FreeType's autohinter.
.
Here an example. The following code is taken from `af_latin_compute_stem_width', transformed into some pseudo code which can be easier converted to bytecode: Function: compute_stem_width
...
This corresponds to the following (still untested) bytecode: // In the comments below, the top of the stack (`s:') // is the rightmost element. // Function 0: compute_stem_width // // in: width // is_serif // is_round // out: new_width // CVT: std_width 0xB0, // PUSHB_1 0x00, // 0
....
0x59, // EIF 0x2D, // ENDF It took me three hours to write that small bit of code, but meanwhile it's getting much faster :-)
Those look really mind boggling. Maybe you can make use of the xgridfit tool to semi auto-gen the TT instructions. 1. map the pseudo code to xgridfit xml 2. generate .sfd from the xgridfit with an empty font. 3. ripoff the TT instruction from .sfd 4. edit the TT instruction further to fit ttfautohint. You can even write a script to automatic the 2, 3 steps. _______________________________________________ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel