17
17
- [ get_score()] ( #get_score )
18
18
- [ get_page_format_prefs()] ( #get_page_format_prefs )
19
19
- [ 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 )
21
22
- [ is_font_smufl_font(font_info)] ( #is_font_smufl_font )
22
23
- [ simple_input(title, text, default)] ( #simple_input )
23
24
- [ is_finale_object(object)] ( #is_finale_object )
@@ -288,26 +289,44 @@ the .json files for each font. The table is in the format:
288
289
### get_smufl_metadata_file
289
290
290
291
``` lua
291
- library .get_smufl_metadata_file (font_info )
292
+ library .get_smufl_metadata_file (font_info_or_name )
292
293
```
293
294
294
295
[ View source] ( https://github.com/finale-lua/lua-scripts/tree/refs/heads/master/src/library/general_library.lua#L375 )
295
296
296
297
| Input | Type | Description |
297
298
| ----- | ---- | ----------- |
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 |
299
300
300
301
| Return type | Description |
301
302
| ----------- | ----------- |
302
303
| `file handle\\ | nil` | |
303
304
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
+
304
323
### is_font_smufl_font
305
324
306
325
``` lua
307
326
library .is_font_smufl_font (font_info )
308
327
```
309
328
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 )
311
330
312
331
| Input | Type | Description |
313
332
| ----- | ---- | ----------- |
@@ -323,7 +342,7 @@ library.is_font_smufl_font(font_info)
323
342
library .simple_input (title , text , default )
324
343
```
325
344
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 )
327
346
328
347
Creates 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.
329
348
@@ -341,7 +360,7 @@ Creates a simple dialog box with a single 'edit' field for entering values into
341
360
library .is_finale_object (object )
342
361
```
343
362
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 )
345
364
346
365
Attempts to determine if an object is a Finale object through ducktyping
347
366
@@ -359,7 +378,7 @@ Attempts to determine if an object is a Finale object through ducktyping
359
378
library .get_parent_class (classname )
360
379
```
361
380
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 )
363
382
364
383
Returns the name of the parent of a class.
365
384
@@ -377,7 +396,7 @@ Returns the name of the parent of a class.
377
396
library .get_class_name (object )
378
397
```
379
398
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 )
381
400
382
401
Returns 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
383
402
@@ -395,7 +414,7 @@ Returns the real class name of a Finale object. Some classes in older JW/RGPLua
395
414
library .system_indent_set_to_prefs (system , page_format_prefs )
396
415
```
397
416
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 )
399
418
400
419
Sets the system to match the indentation in the page preferences currently in effect. (For score or part.)
401
420
The 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
415
434
library .calc_script_filepath ()
416
435
```
417
436
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 )
419
438
420
439
Returns the full filepath of the running script.
421
440
@@ -429,7 +448,7 @@ Returns the full filepath of the running script.
429
448
library .calc_script_name (include_extension )
430
449
```
431
450
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 )
433
452
434
453
Returns the running script name, with or without extension.
435
454
@@ -447,7 +466,7 @@ Returns the running script name, with or without extension.
447
466
library .get_default_music_font_name ()
448
467
```
449
468
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 )
451
470
452
471
Fetches the default music font from document options and processes the name into a usable format.
453
472
0 commit comments