Hans Hagen wrote:
Taco Hoekwater wrote:
PS. I can create a series of slides that show internals of the font reading process for the ntg meeting, if you are interested.
sounds like a good idea to me
For those of you who are interested in this sort of thing, I've posted an 884-page PDF document that illustrates TeX's loading of a few font metric files: nullfont (internal) cmr10 cmsy10 cmex10 De document, and sources, are available at: http://tex.aanhet.net/temp/fontreader.pdf http://tex.aanhet.net/temp/fontreader.zip Beware, the PDF is pretty large (7.7Mb). MetaPost, Perl and Context sources are quite small (12kb), but very much a hack. Taco
Taco Hoekwater wrote:
De document, and sources, are available at:
http://tex.aanhet.net/temp/fontreader.pdf http://tex.aanhet.net/temp/fontreader.zip
Beware, the PDF is pretty large (7.7Mb). MetaPost, Perl and Context sources are quite small (12kb), but very much a hack.
brilliant, you made my day Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
For those of you who are interested in this sort of thing, I've posted an 884-page PDF document that illustrates TeX's loading of a few font metric files:
Very nice illustration. Thanks, Taco! Patrick -- ConTeXt wiki and more: http://contextgarden.net
Hi, Vaguely connected to the font reader visualisation I posted last month, I have created a visualisation of the trie (\pattern) processing source code in initex. There are files here: http://tex.aanhet.net/temp/patreader.zip (12.825 bytes) http://tex.aanhet.net/temp/patreader.pdf (> 36 Megabytes) Please fetch the zip file and attempt to generate a local version yourself before downloading the PDF document :) The process itself is a bit harder to comprehend than the font reader, so some background knowledge is needed. It also helps if you have the TeX pascal sources handy. I should probably write a descriptive text in prose to go along with the images, but I'm bored with this stuff. It took me much longer than I had anticipated, because I kept running into limitations of MP ;-( Roughly, the execution order <-> pages mapping is as follows: pages function action 1 - 8 new_patterns() % \patterns for language 0 9 - 23 new_patterns() % \patterns for language 2 24 - 26 new_patterns() % \patterns for language 1 27 - 29 init_trie() % initialization of arrays 30 - 41 init_trie() % reshuffling languages 2 and 1 42 - 42 init_trie() % prepare for compression 43 - 241 compress_trie() % trie compression 242 - 244 init_trie() % prepare for packing 245 - 717 first_fit() % trie packing 718 - 965 init_trie() % finalizations for run-time The various blue items are used runtime (i.e. during hyphenation), the other arrays are only used in initex or only for statistics reporting. trie_hash is physically the same array as trie_ref, but it is cleaner to show them separately. The supplied perl script can in fact demonstrate the hyphenation of words using TeX's algorithm, but if you want meaningful results you have to feed it hyphen.tex instead of the three demonstration languages, and in that case, you have to increase the two limits ($trie_size and $trie_op_size). Check the top (and bottom) of the perl script for that. Have fun, Taco
participants (3)
-
Hans Hagen
-
Patrick Gundlach
-
Taco Hoekwater