I have decided to use \fontdimen parameters as an array of numbers (to store data about Unicode Character Properties). The question now is to fill in those \fontdimen parameters in the most efficient way. I would much prefer methods that work for pdfTeX, XeTeX and LuaTeX.
The most efficient way is to load a tfm file unicodedata.tfm defining a font with many \fontdimen parameters. The tfm file format begins with two bytes declaring its size in words (= 32 bits) as a signed integer (see texdoc tftopl or an old TUGBoat paper), so the maximum number of \fontdimen parameters declared through a tfm file is 32738 (slightly less than 2^15 because of some header information). I need around 2^17.
Maybe there exists a file format other than tfm to provide font metric to TeX?
The other approach, much slower, is to do it inside TeX: something like
\font\foo=cmr10 at 1sp
\fontdimen 1\foo = 13459847sp
\fontdimen 2\foo = 14839847sp
% ...
\fontdimen 1114111\foo = 10872349sp
This is (presumably) slower because TeX has to parse each of these dimensions, and each entry takes around 10 characters in a file. Space-wise, this can be improved and reduced to 4 bytes per entry, but that then requires even more work from TeX to decode.
\fontdimen0? I don't think so. However, I think that the answer to your question is no. Split the information across eight TFM files to overcome the limitation. – egreg Jun 11 '15 at 18:03\fontdimen0. from appendix g, p.441: ",,, at least 22\fontdimenparameters. For brevity we shall call these parameters\sigma_1to\sigma_{22}..." – barbara beeton Jun 11 '15 at 19:45\fontdimenvalue is assigned, the<number>must be positive and not greater than the number of parameters in the font’s metric information file, unless that font information has just been loaded into TeX’s memory – egreg Jun 11 '15 at 20:07\fontdimen <char-num>\unidatafontgives a 25 bit integer (maximum providable through a tfm), where I can hopefully compress all Character Properties of that character. – Bruno Le Floch Jun 11 '15 at 20:34