Yue Wang wrote: > \usetypescriptfile[zhfonts] > \usetypescript[myfont] > \setupbodyfont[myfont,rm,11pt] > \starttext > 你好 {\it 你好} {\bf 你好} > \stoptext > MtxRun | total runtime: 194.156
> If no Chinese fonts are used, three cases are tested: > \usetypescriptfile[zhfonts] > \usetypescript[myfont] > \setupbodyfont[myfont,rm,11pt] > \starttext > Hello > \stoptext > MtxRun | total runtime: 89.938 the reason for this is that including the files in the pdf files takes long; we suspect that there might be a memory issue there (not freed) so that on your system you end up with swapping (it is on the agenda to look into this) > In a typical chinese science book, usually 4 to 10 chinese > truetype/opentype font are used. Magazines might use twenty or more. > So if we want to use the standard way (use chinese font as body font, > use virtual fonts mechanism to mix the font with latin fonts, use > different alternatives for single chinese font) it's not virtual fonts at all, these fonts are used in parallel and fallbacks are applied by node list parsing; this also means that the fallback fonts have feature support (independent of the main font) > as the zhfonts.tex is presented, the running time here is usually > intolerable (more than 3 minutes' loading time with very simple text > for three fonts). > > A simple XeLaTeX file with three font embeding using XeCJK or > zhspacing for interchartoken font switching usually runs less than 8 > seconds. In this case, all the family (rm, ss, tt) parts (like bf, it, > etc) in NFSS are defined. > > So, I think there should be a way to improve the font loading > procedure. Maybe we had made deep copy to every fontsynonym defined > here which made the loading time terribly long? Are there some way to > mirror all the unchanged part of a new loading font B from a loaded > time A and only leave the modified table when A and B points to same > physical font? Thanks. at the lua end there is already a lot of sharing going on but eventually the font has to be fed into tex itself where there is no such sharing anyhow, performance might improve over time 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 ----------------------------------------------------------------- ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________