[JW Lua] SMuFL constants in JW Lua
Jari Williamsson
jari.williamsson at mailbox.swipnet.se
Sat Aug 22 22:16:04 CEST 2015
On 2015-08-22 17:09, Thomas Weber wrote:
> I understand those "global" constants are so to say inherited from C++,
> but as you're explicitly saying you'd like to include SMuFL support in
> JW Lua, I'd suggest doing it the Lua way.
The global "finale" namespace was a decision based on many factors, but
the C++ namespaces were not one of them. The constants in C++ are
contained in various class namespaces. But I agree that for some types
of data, separate namespaces are indeed superior, and it would make much
sense to me to move the FFUUID_ constants to their own namespace, since
these are a separate entity compared to conventional PDK constants.
Your suggestion to base the SMuFL support on the .json files is good,
specially since Lua is very well suited for the json file format. There
are a couple of considerations:
* Ease of use. It must be very easy and transparent for an end user of a
script to get an script environment that works correctly with the fonts
the user has on the computer.
* Speed. The loading of the .json files must be fast. I think json table
caches in JW Lua could be an approach.
* Script convenience. The script programmer must be able to find the
information in the tables in a predictable and secure way, with a syntax
that is easy to use.
* To me, the most important json data to provide dynamically in tables
are the font-specific metadata, such as the metadata in
bravura_metadata.json. The 3 json files that are part of the SMuFL
standard seems much more unlikely to change over time than the
font-specific data.
BTW, do you know if there are any guidelines for applications on how the
SMuFL json files are to be installed/accessed in a notation program? For
the Bravura font for example, the real benefits of the font and the
SMuFL standard only becomes available if bravura_metadata.json file is
available to the notation application.
Best regards,
Jari Williamsson
More information about the JWLua
mailing list