pull font into editor

akkartik
Dec 29, 2023, 7:18 PM
5XA7TKWYAWE3HDBJ477RDOALCTDCOGF73WXYVCSFZCID3KDWEM2QC

Dependencies

  • [2] PP2IIHL6 stop putting button state in a global
  • [3] RRDO6H7H bugfix
  • [4] TYFAGQWS repeat bugfix on source editor
  • [5] UZQ2LGHQ bugfix: preserve window position
  • [6] CWQIPU7U always show line numbers in source editor
  • [7] 5SM6DRHK port inscript's bugfix to source editor
  • [8] UUTUPEOJ extract a function
  • [9] W5WCQNMP bugfix: Windows pushing title bar off screen
  • [10] 2L5MEZV3 experiment: new edit namespace
  • [11] KMSL74GA support selections in the source editor
  • [12] H4R5BHVY no more Text allocations
  • [13] QJISOCHJ some temporary logging to catch a bug
  • [14] EVMVBLXD bugfix: preserve window position
  • [15] UHB4GARJ left/right margin -> left/right coordinates
  • [16] H6QZ7GRR more precise name
  • [17] CNCYMM6A make test initializations a little more obvious
  • [18] OI4FPFIN support drawings in the source editor
  • [19] G54H3YG2 get rid of all bifold text
  • [20] 2CK5QI7W make love event names consistent
  • [21] HCFDBUXH fix stale comment
  • [22] 3TI67SEJ more bugfix
  • [23] ISOFHXB2 App.width can no longer take a Text
  • [24] IX5YTLSV state validation in source editor as well
  • [25] CQYKYJJU remember window positions across restart/ctrl+e
  • [26] B4JEWKWI hide editor cursor while in file navigator
  • [27] 5RDWSYK2 consistently use App names for methods everywhere
  • [28] APYPFFS3 call edit rather than App callbacks in tests
  • [29] AOZX2G5F source: no commandline args
  • [30] LF7BWEG4 group all editor globals
  • [31] KKMFQDR4 editing source code from within the app
  • [32] J3I6DVMB drop an unused arg
  • [33] 2WGHUWE6 self-documenting 0 Test_right_margin
  • [*] 4KC7I3E2 make colors easier to edit

Change contents

  • replacement in source_edit.lua at line 28
    [7.152846][7.152846:152968]()
    function edit.initialize_state(top, left, right, font_height, line_height) -- currently always draws to bottom of screen
    [7.152846]
    [7.152968]
    function edit.initialize_state(top, left, right, font, line_height) -- currently always draws to bottom of screen
  • replacement in source_edit.lua at line 88
    [7.19722][7.154804:154835](),[7.154804][7.154804:154835]()
    font_height = font_height,
    [7.19722]
    [7.154835]
    font = font,
    font_height = font:getHeight(),
  • replacement in source_edit.lua at line 109
    [7.155320][7.155320:155349]()
    end -- App.initialize_state
    [7.155320]
    [7.155349]
    end -- edit.initialize_state
  • edit in source_edit.lua at line 161
    [7.155405]
    [7.155405]
    love.graphics.setFont(State.font)
  • replacement in source_edit.lua at line 557
    [7.163992][4.11:77]()
    love.graphics.setFont(love.graphics.newFont(State.font_height))
    [7.163992]
    [7.164065]
    State.font = love.graphics.newFont(State.font_height)
  • replacement in source_edit.lua at line 574
    [7.557][7.164467:164521](),[7.164467][7.164467:164521]()
    14, -- font height assuming default LÖVE font
    [7.557]
    [7.164521]
    love.graphics.getFont(),
  • replacement in source.lua at line 117
    [7.168468][7.168468:168537]()
    love.graphics.setFont(love.graphics.newFont(settings.font_height))
    [7.168468]
    [7.72]
    local font = love.graphics.newFont(settings.font_height)
  • replacement in source.lua at line 129
    [7.169468][6.276:442]()
    Editor_state = edit.initialize_state(Margin_top, Margin_left + Line_number_width*App.width('m'), right, settings.font_height, math.floor(settings.font_height*1.3))
    [7.169468]
    [7.169599]
    Editor_state = edit.initialize_state(Margin_top, Margin_left + Line_number_width*App.width('m'), right, font, math.floor(settings.font_height*1.3))
  • replacement in source.lua at line 155
    [7.170022][7.170022:170082]()
    love.graphics.setFont(love.graphics.newFont(font_height))
    [7.170022]
    [7.13]
    local font = love.graphics.newFont(font_height)
  • replacement in source.lua at line 157
    [7.51][6.443:573]()
    Editor_state = edit.initialize_state(Margin_top, Margin_left + Line_number_width*App.width('m'), App.screen.width-Margin_right)
    [7.51]
    [7.115]
    Editor_state = edit.initialize_state(Margin_top, Margin_left + Line_number_width*App.width('m'), App.screen.width-Margin_right, font, math.floor(font_height*1.3))
  • edit in source.lua at line 159
    [7.151][7.170283:170381](),[7.170283][7.170283:170381]()
    Editor_state.font_height = font_height
    Editor_state.line_height = math.floor(font_height*1.3)
  • replacement in run.lua at line 57
    [7.179375][7.179375:179444]()
    love.graphics.setFont(love.graphics.newFont(Settings.font_height))
    [7.179375]
    [7.1186]
    local font = love.graphics.newFont(Settings.font_height)
  • replacement in run.lua at line 64
    [5.67][7.180008:180163](),[7.88][7.180008:180163](),[7.386][7.180008:180163](),[7.180008][7.180008:180163]()
    Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width-Margin_right, Settings.font_height, math.floor(Settings.font_height*1.3))
    [5.67]
    [7.180163]
    Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width-Margin_right, font, math.floor(Settings.font_height*1.3))
  • replacement in run.lua at line 82
    [7.180370][7.180370:180430]()
    love.graphics.setFont(love.graphics.newFont(font_height))
    [7.180370]
    [7.102]
    local font = love.graphics.newFont(font_height)
  • replacement in run.lua at line 84
    [7.137][7.180533:180726](),[7.1014][7.180533:180726](),[7.180533][7.180533:180726]()
    Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width-Margin_right)
    Editor_state.font_height = font_height
    Editor_state.line_height = math.floor(font_height*1.3)
    [7.137]
    [7.180749]
    Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width-Margin_right, font, math.floor(font_height*1.3))
  • replacement in log_browser.lua at line 9
    [7.192175][7.192175:192369]()
    Log_browser_state = edit.initialize_state(Margin_top, Editor_state.right + Margin_right + Margin_left, (Editor_state.right+Margin_right)*2, Editor_state.font_height, Editor_state.line_height)
    [7.192175]
    [7.192369]
    Log_browser_state = edit.initialize_state(Margin_top, Editor_state.right + Margin_right + Margin_left, (Editor_state.right+Margin_right)*2, Editor_state.font, Editor_state.line_height)
  • replacement in edit.lua at line 26
    [7.596][7.5097:5219]()
    function edit.initialize_state(top, left, right, font_height, line_height) -- currently always draws to bottom of screen
    [7.596]
    [7.94319]
    function edit.initialize_state(top, left, right, font, line_height) -- currently always draws to bottom of screen
  • replacement in edit.lua at line 86
    [7.3321][7.5220:5251]()
    font_height = font_height,
    [7.3321]
    [7.5251]
    font = font,
    font_height = font:getHeight(),
  • replacement in edit.lua at line 107
    [7.98042][7.98042:98071]()
    end -- App.initialize_state
    [7.98042]
    [7.3867]
    end -- edit.initialize_state
  • edit in edit.lua at line 160
    [2.44]
    [35.999]
    love.graphics.setFont(State.font)
  • replacement in edit.lua at line 553
    [7.264][3.26:92]()
    love.graphics.setFont(love.graphics.newFont(State.font_height))
    [7.264]
    [7.337]
    State.font = love.graphics.newFont(State.font_height)
  • replacement in edit.lua at line 570
    [7.1119][7.5645:5699](),[7.5645][7.5645:5699]()
    14, -- font height assuming default LÖVE font
    [7.1119]
    [7.5699]
    love.graphics.getFont(),