try to maintain a reasonable line width

[?]
Jun 5, 2022, 3:06 AM
AJB4LFRBMIRBEDWJ3OW7GQIMD2BZBVQ62GH4TE2FISWZKSAHRF4QC

Dependencies

  • [2] PESSMQBJ no, make sure to compute line width after screen dimensions
  • [3] R6GUSTBY default font size and line-height
  • [4] W4UVZETR 2 regressions:
  • [5] AD34IX2Z couple more tests
  • [6] ESETRNLB bugfix: printing the first part of a line at the bottom made it seem non-wrapping
  • [7] QCQHLMST always have a filename
  • [8] 2L4DL7PG go through App in a couple more places
  • [9] H22OAXWE couple of TODOs
  • [10] YKRF5V3Z starting to load/save
  • [11] XSLCFVFH .
  • [12] PGZJ6NAT ensure Filename is writable when opened outside a terminal
  • [13] HOSPP2AN crisp font rendering
  • [14] AVQ5MC5D finish uppercasing all globals
  • [15] Z4XRNDTR find text
  • [16] AH744RFR show when we're naming a point
  • [17] IZZVOCLB confirm that we have access to all of the love API
  • [18] GQSGEYSM .
  • [19] OTIBCAUJ love2d scaffold
  • [20] NQWWTGXR switch undo/redo to ctrl- hotkeys
  • [21] AVTNUQYR basic test-enabled framework
  • [22] YTSPVDZH first successful pagedown test, first bug found by test
  • [*] Z4KNS42N to open a file without a terminal, drag it on!
  • [*] BLWAYPKV extract a module

Change contents

  • edit in main.lua at line 95
    [4.2183][2.105:225]()
    -- maximum width available to either text or drawings, in pixels
    Line_width = math.floor(App.screen.width/2/40)*40
  • replacement in main.lua at line 96
    [4.48][3.28:126]()
    Font_height = 20
    love.graphics.setFont(love.graphics.newFont(Font_height))
    Line_height = 26
    [4.48]
    [3.126]
    initialize_font_settings(20)
  • edit in main.lua at line 112
    [4.57]
    [24.6]
    function initialize_font_settings(font_height)
    Font_height = font_height
    love.graphics.setFont(love.graphics.newFont(Font_height))
    Line_height = math.floor(font_height*1.3)
    -- maximum width available to either text or drawings, in pixels
    Em = App.newText(love.graphics.getFont(), 'm')
    -- readable text width is 50-75 chars
    Line_width = math.min(40*App.width(Em), App.screen.width-50)
    end
  • replacement in main.lua at line 284
    [4.4308][4.4308:4402](),[4.4402][3.128:174]()
    Font_height = Font_height+2
    love.graphics.setFont(love.graphics.newFont(Font_height))
    Line_height = math.floor(Font_height*1.3)
    [4.4308]
    [4.4448]
    initialize_font_settings(Font_height+2)
  • replacement in main.lua at line 287
    [4.4499][4.4499:4593]()
    Font_height = Font_height-2
    love.graphics.setFont(love.graphics.newFont(Font_height))
    [4.4499]
    [4.4593]
    initialize_font_settings(Font_height-2)
  • edit in main.lua at line 289
    [4.4615][3.175:221]()
    Line_height = math.floor(Font_height*1.3)
  • replacement in main.lua at line 290
    [4.4690][3.222:243](),[3.243][4.4711:4773](),[4.4711][4.4711:4773]()
    Font_height = 20
    love.graphics.setFont(love.graphics.newFont(Font_height))
    [4.4690]
    [4.4773]
    initialize_font_settings(20)
  • edit in main.lua at line 292
    [4.4795][3.244:265]()
    Line_height = 26
  • replacement in drawing.lua at line 59
    [4.404][4.11:85]()
    name_text = App.newText(love.graphics.getFont(), 'm') -- 1em
    [4.404]
    [4.488]
    name_text = Em