Hi all,

calling fontloader.to_table() appears to be redundant when
extracting font names, see the attached patch. On my system I
measured 42 (patched) vs 59 (vanilla) seconds for rebuilding the
entire index:

  mtxrun --script fonts --reload --force

The resulting index is -- except for the uuid, naturally --
identical in both cases.

Best,
Philipp

--- /home/phg/base/font-syn.lua 2013-10-25 00:01:04.000000000 +0200
+++ font-syn.lua        2013-11-09 18:30:33.540364371 +0100
@@ -266,8 +266,21 @@
 function fontloader.fullinfo(...) -- check with taco what we get / could get
     local ff = fontloader.open(...)
     if ff then
-        local d = ff and fontloader.to_table(ff)
-        d.glyphs, d.subfonts, d.gpos, d.gsub, d.lookups = nil, nil, nil, nil, 
nil
+        local fields = table.tohash (fontloader.fields (ff), true)
+        local d   = {
+            names               = fields.names               and ff.names,
+            familyname          = fields.familyname          and ff.familyname,
+            fullname            = fields.fullname            and ff.fullname,
+            fontname            = fields.fontname            and ff.fontname,
+            weight              = fields.weight              and ff.weight,
+            italicangle         = fields.italicangle         and 
ff.italicangle,
+            units_per_em        = fields.units_per_em        and 
ff.units_per_em,
+            design_range_bottom = fields.design_range_bottom and 
ff.design_range_bottom,
+            design_range_top    = fields.design_range_top    and 
ff.design_range_top,
+            design_size         = fields.design_size         and 
ff.design_size,
+            italicangle         = fields.italicangle         and 
ff.italicangle,
+            pfminfo             = fields.pfminfo             and ff.pfminfo,
+        }
         fontloader.close(ff)
         return d
     else

Attachment: pgpACw5YFizX4.pgp
Description: PGP signature

___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to