|
1 | 1 | -- @description Interactive ReaScript (iReaScript) |
2 | 2 | -- @author cfillion |
3 | | --- @version 0.8.4 |
4 | | --- @changelog |
5 | | --- Fix autocompletion after an opening parenthesis |
6 | | --- Fix display glitch when pasting tab characters |
| 3 | +-- @version 0.8.5 |
| 4 | +-- @changelog Fix monospaced font selection on macOS ARM |
7 | 5 | -- @link |
8 | 6 | -- cfillion.ca https://cfillion.ca |
9 | 7 | -- Forum Thread https://forum.cockos.com/showthread.php?t=177324 |
@@ -1637,14 +1635,6 @@ function ireascript.selectAll() |
1637 | 1635 | ireascript.redraw = true |
1638 | 1636 | end |
1639 | 1637 |
|
1640 | | -function ireascript.iswindows() |
1641 | | - return reaper.GetOS():find('Win') ~= nil |
1642 | | -end |
1643 | | - |
1644 | | -function ireascript.ismacos() |
1645 | | - return reaper.GetOS():find('OSX') ~= nil |
1646 | | -end |
1647 | | - |
1648 | 1638 | function ireascript.dup(table) |
1649 | 1639 | local copy = {} |
1650 | 1640 | for k,v in pairs(table) do copy[k] = v end |
@@ -1775,10 +1765,11 @@ function ireascript.initgfx() |
1775 | 1765 | gfx.setcursor(ireascript.IDC_IBEAM) |
1776 | 1766 | gfx.clear = -1 |
1777 | 1767 |
|
1778 | | - if ireascript.iswindows() then |
| 1768 | + local os = reaper.GetOS() |
| 1769 | + if os:find('Win') then |
1779 | 1770 | gfx.setfont(ireascript.FONT_NORMAL, 'Consolas', 16) |
1780 | 1771 | gfx.setfont(ireascript.FONT_BOLD, 'Consolas', 16, string.byte('b')) |
1781 | | - elseif ireascript.ismacos() then |
| 1772 | + elseif os:find('OSX') ~= nil or os:find('macOS') then |
1782 | 1773 | gfx.setfont(ireascript.FONT_NORMAL, 'Menlo', 14) |
1783 | 1774 | gfx.setfont(ireascript.FONT_BOLD, 'Menlo', 14, string.byte('b')) |
1784 | 1775 | else |
|
0 commit comments