Skip to content

Commit 0fd683d

Browse files
chore: autopublish 2025-06-24T16:15:43Z
1 parent 3e03e2c commit 0fd683d

File tree

196 files changed

+15422
-844
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

196 files changed

+15422
-844
lines changed

dist/UI_switch_to_selected_part.lua

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ package.preload["library.client"] = package.preload["library.client"] or functio
7777
luaosutils = {
7878
test = finenv.EmbeddedLuaOSUtils,
7979
error = requires_later_plugin_version("the embedded luaosutils library")
80+
},
81+
cjson = {
82+
test = client.get_lua_plugin_version() >= 0.67,
83+
error = requires_plugin_version("0.67", "the embedded cjson library"),
8084
}
8185
}
8286

@@ -367,20 +371,44 @@ package.preload["library.general_library"] = package.preload["library.general_li
367371
return font_names
368372
end
369373

370-
function library.get_smufl_metadata_file(font_info)
371-
if not font_info then
372-
font_info = finale.FCFontInfo()
373-
font_info:LoadFontPrefs(finale.FONTPREF_MUSIC)
374+
function library.get_smufl_metadata_file(font_info_or_name)
375+
local font_name
376+
if type(font_info_or_name) == "string" then
377+
font_name = font_info_or_name
378+
else
379+
if not font_info_or_name then
380+
font_info_or_name = finale.FCFontInfo()
381+
font_info_or_name:LoadFontPrefs(finale.FONTPREF_MUSIC)
382+
end
383+
font_name = font_info_or_name.Name
374384
end
375-
local try_prefix = function(prefix, font_info)
376-
local file_path = prefix .. font_info.Name .. "/" .. font_info.Name .. ".json"
385+
local try_prefix = function(prefix)
386+
local file_path = prefix .. font_name .. "/" .. font_name .. ".json"
377387
return io.open(file_path, "r")
378388
end
379-
local user_file = try_prefix(calc_smufl_directory(true), font_info)
389+
local user_file = try_prefix(calc_smufl_directory(true))
380390
if user_file then
381391
return user_file
382392
end
383-
return try_prefix(calc_smufl_directory(false), font_info)
393+
return try_prefix(calc_smufl_directory(false))
394+
end
395+
396+
function library.get_smufl_metadata_table(font_info_or_name, subkey)
397+
if not client.assert_supports("cjson") then
398+
return
399+
end
400+
local cjson = require("cjson")
401+
local json_file = library.get_smufl_metadata_file(font_info_or_name)
402+
if not json_file then
403+
return nil
404+
end
405+
local contents = json_file:read("*a")
406+
json_file:close()
407+
local json_table = cjson.decode(contents)
408+
if json_table and subkey then
409+
return json_table[subkey]
410+
end
411+
return json_table
384412
end
385413

386414
function library.is_font_smufl_font(font_info)
@@ -445,7 +473,9 @@ package.preload["library.general_library"] = package.preload["library.general_li
445473

446474
function library.get_parent_class(classname)
447475
local class = finale[classname]
448-
if type(class) ~= "table" then return nil end
476+
if type(class) ~= "table" then
477+
return nil
478+
end
449479
if not finenv.IsRGPLua then
450480
local classt = class.__class
451481
if classt and classname ~= "__FCBase" then

dist/accidental_simplify.lua

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ package.preload["library.client"] = package.preload["library.client"] or functio
7777
luaosutils = {
7878
test = finenv.EmbeddedLuaOSUtils,
7979
error = requires_later_plugin_version("the embedded luaosutils library")
80+
},
81+
cjson = {
82+
test = client.get_lua_plugin_version() >= 0.67,
83+
error = requires_plugin_version("0.67", "the embedded cjson library"),
8084
}
8185
}
8286

@@ -460,6 +464,14 @@ package.preload["library.utils"] = package.preload["library.utils"] or function(
460464
end
461465
end)
462466
end
467+
468+
function utils.parse_codepoint(codepoint_string)
469+
return tonumber(codepoint_string:match("U%+(%x+)"), 16)
470+
end
471+
472+
function utils.format_codepoint(codepoint)
473+
return string.format("U+%04X", codepoint)
474+
end
463475
return utils
464476
end
465477
package.preload["library.configuration"] = package.preload["library.configuration"] or function()

dist/articulation_expression_swap.lua

Lines changed: 47 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,14 @@ package.preload["library.utils"] = package.preload["library.utils"] or function(
324324
end
325325
end)
326326
end
327+
328+
function utils.parse_codepoint(codepoint_string)
329+
return tonumber(codepoint_string:match("U%+(%x+)"), 16)
330+
end
331+
332+
function utils.format_codepoint(codepoint)
333+
return string.format("U+%04X", codepoint)
334+
end
327335
return utils
328336
end
329337
package.preload["library.configuration"] = package.preload["library.configuration"] or function()
@@ -542,6 +550,10 @@ package.preload["library.client"] = package.preload["library.client"] or functio
542550
luaosutils = {
543551
test = finenv.EmbeddedLuaOSUtils,
544552
error = requires_later_plugin_version("the embedded luaosutils library")
553+
},
554+
cjson = {
555+
test = client.get_lua_plugin_version() >= 0.67,
556+
error = requires_plugin_version("0.67", "the embedded cjson library"),
545557
}
546558
}
547559

@@ -832,20 +844,44 @@ package.preload["library.general_library"] = package.preload["library.general_li
832844
return font_names
833845
end
834846

835-
function library.get_smufl_metadata_file(font_info)
836-
if not font_info then
837-
font_info = finale.FCFontInfo()
838-
font_info:LoadFontPrefs(finale.FONTPREF_MUSIC)
847+
function library.get_smufl_metadata_file(font_info_or_name)
848+
local font_name
849+
if type(font_info_or_name) == "string" then
850+
font_name = font_info_or_name
851+
else
852+
if not font_info_or_name then
853+
font_info_or_name = finale.FCFontInfo()
854+
font_info_or_name:LoadFontPrefs(finale.FONTPREF_MUSIC)
855+
end
856+
font_name = font_info_or_name.Name
839857
end
840-
local try_prefix = function(prefix, font_info)
841-
local file_path = prefix .. font_info.Name .. "/" .. font_info.Name .. ".json"
858+
local try_prefix = function(prefix)
859+
local file_path = prefix .. font_name .. "/" .. font_name .. ".json"
842860
return io.open(file_path, "r")
843861
end
844-
local user_file = try_prefix(calc_smufl_directory(true), font_info)
862+
local user_file = try_prefix(calc_smufl_directory(true))
845863
if user_file then
846864
return user_file
847865
end
848-
return try_prefix(calc_smufl_directory(false), font_info)
866+
return try_prefix(calc_smufl_directory(false))
867+
end
868+
869+
function library.get_smufl_metadata_table(font_info_or_name, subkey)
870+
if not client.assert_supports("cjson") then
871+
return
872+
end
873+
local cjson = require("cjson")
874+
local json_file = library.get_smufl_metadata_file(font_info_or_name)
875+
if not json_file then
876+
return nil
877+
end
878+
local contents = json_file:read("*a")
879+
json_file:close()
880+
local json_table = cjson.decode(contents)
881+
if json_table and subkey then
882+
return json_table[subkey]
883+
end
884+
return json_table
849885
end
850886

851887
function library.is_font_smufl_font(font_info)
@@ -910,7 +946,9 @@ package.preload["library.general_library"] = package.preload["library.general_li
910946

911947
function library.get_parent_class(classname)
912948
local class = finale[classname]
913-
if type(class) ~= "table" then return nil end
949+
if type(class) ~= "table" then
950+
return nil
951+
end
914952
if not finenv.IsRGPLua then
915953
local classt = class.__class
916954
if classt and classname ~= "__FCBase" then

dist/barline_chooser.lua

Lines changed: 47 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3317,6 +3317,10 @@ package.preload["library.client"] = package.preload["library.client"] or functio
33173317
luaosutils = {
33183318
test = finenv.EmbeddedLuaOSUtils,
33193319
error = requires_later_plugin_version("the embedded luaosutils library")
3320+
},
3321+
cjson = {
3322+
test = client.get_lua_plugin_version() >= 0.67,
3323+
error = requires_plugin_version("0.67", "the embedded cjson library"),
33203324
}
33213325
}
33223326

@@ -3607,20 +3611,44 @@ package.preload["library.general_library"] = package.preload["library.general_li
36073611
return font_names
36083612
end
36093613

3610-
function library.get_smufl_metadata_file(font_info)
3611-
if not font_info then
3612-
font_info = finale.FCFontInfo()
3613-
font_info:LoadFontPrefs(finale.FONTPREF_MUSIC)
3614+
function library.get_smufl_metadata_file(font_info_or_name)
3615+
local font_name
3616+
if type(font_info_or_name) == "string" then
3617+
font_name = font_info_or_name
3618+
else
3619+
if not font_info_or_name then
3620+
font_info_or_name = finale.FCFontInfo()
3621+
font_info_or_name:LoadFontPrefs(finale.FONTPREF_MUSIC)
3622+
end
3623+
font_name = font_info_or_name.Name
36143624
end
3615-
local try_prefix = function(prefix, font_info)
3616-
local file_path = prefix .. font_info.Name .. "/" .. font_info.Name .. ".json"
3625+
local try_prefix = function(prefix)
3626+
local file_path = prefix .. font_name .. "/" .. font_name .. ".json"
36173627
return io.open(file_path, "r")
36183628
end
3619-
local user_file = try_prefix(calc_smufl_directory(true), font_info)
3629+
local user_file = try_prefix(calc_smufl_directory(true))
36203630
if user_file then
36213631
return user_file
36223632
end
3623-
return try_prefix(calc_smufl_directory(false), font_info)
3633+
return try_prefix(calc_smufl_directory(false))
3634+
end
3635+
3636+
function library.get_smufl_metadata_table(font_info_or_name, subkey)
3637+
if not client.assert_supports("cjson") then
3638+
return
3639+
end
3640+
local cjson = require("cjson")
3641+
local json_file = library.get_smufl_metadata_file(font_info_or_name)
3642+
if not json_file then
3643+
return nil
3644+
end
3645+
local contents = json_file:read("*a")
3646+
json_file:close()
3647+
local json_table = cjson.decode(contents)
3648+
if json_table and subkey then
3649+
return json_table[subkey]
3650+
end
3651+
return json_table
36243652
end
36253653

36263654
function library.is_font_smufl_font(font_info)
@@ -3685,7 +3713,9 @@ package.preload["library.general_library"] = package.preload["library.general_li
36853713

36863714
function library.get_parent_class(classname)
36873715
local class = finale[classname]
3688-
if type(class) ~= "table" then return nil end
3716+
if type(class) ~= "table" then
3717+
return nil
3718+
end
36893719
if not finenv.IsRGPLua then
36903720
local classt = class.__class
36913721
if classt and classname ~= "__FCBase" then
@@ -4111,6 +4141,14 @@ package.preload["library.utils"] = package.preload["library.utils"] or function(
41114141
end
41124142
end)
41134143
end
4144+
4145+
function utils.parse_codepoint(codepoint_string)
4146+
return tonumber(codepoint_string:match("U%+(%x+)"), 16)
4147+
end
4148+
4149+
function utils.format_codepoint(codepoint)
4150+
return string.format("U+%04X", codepoint)
4151+
end
41144152
return utils
41154153
end
41164154
package.preload["library.localization"] = package.preload["library.localization"] or function()

dist/baseline_move_reset.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,14 @@ package.preload["library.utils"] = package.preload["library.utils"] or function(
324324
end
325325
end)
326326
end
327+
328+
function utils.parse_codepoint(codepoint_string)
329+
return tonumber(codepoint_string:match("U%+(%x+)"), 16)
330+
end
331+
332+
function utils.format_codepoint(codepoint)
333+
return string.format("U+%04X", codepoint)
334+
end
327335
return utils
328336
end
329337
package.preload["library.configuration"] = package.preload["library.configuration"] or function()

dist/chord_accidental_adjust_down.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,14 @@ package.preload["library.utils"] = package.preload["library.utils"] or function(
324324
end
325325
end)
326326
end
327+
328+
function utils.parse_codepoint(codepoint_string)
329+
return tonumber(codepoint_string:match("U%+(%x+)"), 16)
330+
end
331+
332+
function utils.format_codepoint(codepoint)
333+
return string.format("U+%04X", codepoint)
334+
end
327335
return utils
328336
end
329337
package.preload["library.configuration"] = package.preload["library.configuration"] or function()

dist/chord_accidental_adjust_up.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,14 @@ package.preload["library.utils"] = package.preload["library.utils"] or function(
324324
end
325325
end)
326326
end
327+
328+
function utils.parse_codepoint(codepoint_string)
329+
return tonumber(codepoint_string:match("U%+(%x+)"), 16)
330+
end
331+
332+
function utils.format_codepoint(codepoint)
333+
return string.format("U+%04X", codepoint)
334+
end
327335
return utils
328336
end
329337
package.preload["library.configuration"] = package.preload["library.configuration"] or function()

dist/clef_change.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ package.preload["library.client"] = package.preload["library.client"] or functio
7777
luaosutils = {
7878
test = finenv.EmbeddedLuaOSUtils,
7979
error = requires_later_plugin_version("the embedded luaosutils library")
80+
},
81+
cjson = {
82+
test = client.get_lua_plugin_version() >= 0.67,
83+
error = requires_plugin_version("0.67", "the embedded cjson library"),
8084
}
8185
}
8286

0 commit comments

Comments
 (0)