42XEN6VO4O37LR3WF5YEZPNRKDQOSPJJ7LB2RM6LJEET2ABUVNZQC
4BX4GJEWW7Z5LA4SJUXADYLAHOYFL4IBOYH4J4DJYRAVKKGGFHGQC
6WDBV52ZFEYAUK6L66LDOKJ5JGHP63VY5R4NDOROZDY6HZJF45KAC
KURLAXXIKHKBL7UDFVIR26BI5FDO3ZFLIQASKVGJRDD3RETTOWNQC
2ZRC7FULL5TSP77QJ4M3MOWPLYHM2MWGCDH6RT5FST6G3L5ZVFXQC
BULPIBEGL7TMK6CVIE7IS7WGAHGOSUJBGJSFQK542MOWGHP2ADQQC
HALS7E5UGKCP3DFY456F7Z3Y6WNGIABOCV2SHT34D5ZAGNCPV5PQC
DHI6IJCNSTHGED67T6H5X6Y636C7PIDGIJD32HBEKLT5WIMRS5MAC
X3F7ECSLGXCH6NBSDIH7LY47I4EG2RR5VFPEMM6ZVDYQIGFID4HQC
--? print('('..s(x)..','..s(y)..') '..frag..'('..s(frag_width)..' vs '..s(State.right)..') '..s(line_index)..' vs '..s(State.screen_top1.line)..'; '..s(pos)..' vs '..s(State.screen_top1.pos)..'; bottom: '..s(State.screen_bottom1.line)..'/'..s(State.screen_bottom1.pos))
--? print('text.draw:', frag, 'at', line_index,pos, 'after', x,y)
if Text.lt1({line=line_index, pos=pos}, State.screen_top1) then
-- render nothing
--? print('skipping', frag)
else
-- render fragment
local frag_width = App.width(frag_text)
if x + frag_width > State.right then
assert(x > State.left) -- no overfull lines