1717- [ get_score()] ( #get_score )
1818- [ get_page_format_prefs()] ( #get_page_format_prefs )
1919- [ get_smufl_font_list()] ( #get_smufl_font_list )
20- - [ get_smufl_metadata_file(font_info)] ( #get_smufl_metadata_file )
20+ - [ get_smufl_metadata_file(font_info_or_name)] ( #get_smufl_metadata_file )
21+ - [ get_smufl_metadata_json(font_info_or_name)] ( #get_smufl_metadata_json )
2122- [ is_font_smufl_font(font_info)] ( #is_font_smufl_font )
2223- [ simple_input(title, text, default)] ( #simple_input )
2324- [ is_finale_object(object)] ( #is_finale_object )
@@ -288,26 +289,44 @@ the .json files for each font. The table is in the format:
288289### get_smufl_metadata_file
289290
290291``` lua
291- library .get_smufl_metadata_file (font_info )
292+ library .get_smufl_metadata_file (font_info_or_name )
292293```
293294
294295[ View source] ( https://github.com/finale-lua/lua-scripts/tree/refs/heads/master/src/library/general_library.lua#L375 )
295296
296297| Input | Type | Description |
297298| ----- | ---- | ----------- |
298- | ` font_info ` (optional) | ` FCFontInfo ` | if non-nil, the font to search for; if nil, search for the Default Music Font |
299+ | ` font_info_or_name ` (optional) | ` FCFontInfo ` | or (string) if non-nil, the font to search for; if nil, search for the Default Music Font; if string, search for the font by name |
299300
300301| Return type | Description |
301302| ----------- | ----------- |
302303| `file handle\\ | nil` | |
303304
305+ ### get_smufl_metadata_json
306+
307+ ``` lua
308+ library .get_smufl_metadata_json (font_info_or_name )
309+ ```
310+
311+ [ View source] ( https://github.com/finale-lua/lua-scripts/tree/refs/heads/master/src/library/general_library.lua#L-1 )
312+
313+ @ [ string] the key of the subtable to return from the json
314+
315+ | Input | Type | Description |
316+ | ----- | ---- | ----------- |
317+ | ` font_info_or_name ` (optional) | ` FCFontInfo\|string ` | if non-nil, the font to search for; if nil, search for the Default Music Font; if string, search for the font by name |
318+
319+ | Return type | Description |
320+ | ----------- | ----------- |
321+ | `table\\ | nil` | |
322+
304323### is_font_smufl_font
305324
306325``` lua
307326library .is_font_smufl_font (font_info )
308327```
309328
310- [ View source] ( https://github.com/finale-lua/lua-scripts/tree/refs/heads/master/src/library/general_library.lua#L400 )
329+ [ View source] ( https://github.com/finale-lua/lua-scripts/tree/refs/heads/master/src/library/general_library.lua#L431 )
311330
312331| Input | Type | Description |
313332| ----- | ---- | ----------- |
@@ -323,7 +342,7 @@ library.is_font_smufl_font(font_info)
323342library .simple_input (title , text , default )
324343```
325344
326- [ View source] ( https://github.com/finale-lua/lua-scripts/tree/refs/heads/master/src/library/general_library.lua#L430 )
345+ [ View source] ( https://github.com/finale-lua/lua-scripts/tree/refs/heads/master/src/library/general_library.lua#L461 )
327346
328347Creates a simple dialog box with a single 'edit' field for entering values into a script, similar to the old UserValueInput command. Will automatically resize the width to accomodate longer strings.
329348
@@ -341,7 +360,7 @@ Creates a simple dialog box with a single 'edit' field for entering values into
341360library .is_finale_object (object )
342361```
343362
344- [ View source] ( https://github.com/finale-lua/lua-scripts/tree/refs/heads/master/src/library/general_library.lua#L475 )
363+ [ View source] ( https://github.com/finale-lua/lua-scripts/tree/refs/heads/master/src/library/general_library.lua#L506 )
345364
346365Attempts to determine if an object is a Finale object through ducktyping
347366
@@ -359,7 +378,7 @@ Attempts to determine if an object is a Finale object through ducktyping
359378library .get_parent_class (classname )
360379```
361380
362- [ View source] ( https://github.com/finale-lua/lua-scripts/tree/refs/heads/master/src/library/general_library.lua#L488 )
381+ [ View source] ( https://github.com/finale-lua/lua-scripts/tree/refs/heads/master/src/library/general_library.lua#L519 )
363382
364383Returns the name of the parent of a class.
365384
@@ -377,7 +396,7 @@ Returns the name of the parent of a class.
377396library .get_class_name (object )
378397```
379398
380- [ View source] ( https://github.com/finale-lua/lua-scripts/tree/refs/heads/master/src/library/general_library.lua#L523 )
399+ [ View source] ( https://github.com/finale-lua/lua-scripts/tree/refs/heads/master/src/library/general_library.lua#L556 )
381400
382401Returns the real class name of a Finale object. Some classes in older JW/RGPLua versions have incorrect class names, so this function attempts to resolve them with ducktyping
383402
@@ -395,7 +414,7 @@ Returns the real class name of a Finale object. Some classes in older JW/RGPLua
395414library .system_indent_set_to_prefs (system , page_format_prefs )
396415```
397416
398- [ View source] ( https://github.com/finale-lua/lua-scripts/tree/refs/heads/master/src/library/general_library.lua#L555 )
417+ [ View source] ( https://github.com/finale-lua/lua-scripts/tree/refs/heads/master/src/library/general_library.lua#L588 )
399418
400419Sets the system to match the indentation in the page preferences currently in effect. (For score or part.)
401420The page preferences may be provided optionally to avoid loading them for each call.
@@ -415,7 +434,7 @@ The page preferences may be provided optionally to avoid loading them for each c
415434library .calc_script_filepath ()
416435```
417436
418- [ View source] ( https://github.com/finale-lua/lua-scripts/tree/refs/heads/master/src/library/general_library.lua#L579 )
437+ [ View source] ( https://github.com/finale-lua/lua-scripts/tree/refs/heads/master/src/library/general_library.lua#L612 )
419438
420439Returns the full filepath of the running script.
421440
@@ -429,7 +448,7 @@ Returns the full filepath of the running script.
429448library .calc_script_name (include_extension )
430449```
431450
432- [ View source] ( https://github.com/finale-lua/lua-scripts/tree/refs/heads/master/src/library/general_library.lua#L600 )
451+ [ View source] ( https://github.com/finale-lua/lua-scripts/tree/refs/heads/master/src/library/general_library.lua#L633 )
433452
434453Returns the running script name, with or without extension.
435454
@@ -447,7 +466,7 @@ Returns the running script name, with or without extension.
447466library .get_default_music_font_name ()
448467```
449468
450- [ View source] ( https://github.com/finale-lua/lua-scripts/tree/refs/heads/master/src/library/general_library.lua#L622 )
469+ [ View source] ( https://github.com/finale-lua/lua-scripts/tree/refs/heads/master/src/library/general_library.lua#L655 )
451470
452471Fetches the default music font from document options and processes the name into a usable format.
453472
0 commit comments