{deck}
version:1
card:0
size:[512,342]
name:"Font Editor"
author:"John Earnest"

{fonts}
deckbuilder:"%%[encoded data, 12424 characters]"
olympiad:"%%[encoded data, 5256 characters]"
olympiad_italic:"%%[encoded data, 5256 characters]"
olympiad_title:"%%[encoded data, 15496 characters]"
segments:"%%FNT0CA4BAQAAAAAAAAAAAAAAAAAAB/6CgoKCgoKCgoKCgv4ABdjY2EgAAAAAAAAAAAAAB/6CgoKCgoKCgoKCgv4AB/6CgoKCgoKCgoKCgv4AB/6CgoKCgoKCgoKCgv4AB/6CgoKCgoKCgoKCgv4AAsDAwEAAAAAAAAAAAAAACH68wMDAgACAwMDAvH4ACH49AwMDAQABAwMDPX4AB/6CgoKCgoKCgoKCgv4AB/6CgoKCgoKCgoKCgv4AAgAAAAAAAAAAAMDAQIAACAAAAAAAPH48AAAAAAAAAgAAAAAAAAAAAADAwAAAB/6CgoKCgoKCgoKCgv4ACH69w8PDgQCBw8PDvX4ACAABAwMDAQABAwMDAQAACH49AwMDPX68wMDAvH4ACH49AwMDPX49AwMDPX4ACACBw8PDvX49AwMDAQAACH68wMDAvH49AwMDPX4ACH68wMDAvH69w8PDvX4ACH49AwMDAQABAwMDAQAACH69w8PDvX69w8PDvX4ACH69w8PDvX49AwMDAQAAAgAAAADAwAAAwMAAAAAAAgAAAADAwAAAwMBAgAAAB/6CgoKCgoKCgoKCgv4AB/6CgoKCgoKCgoKCgv4AB/6CgoKCgoKCgoKCgv4ACH49AwMDPX68wMDAgAAAB/6CgoKCgoKCgoKCgv4ACH69w8PDvX69w8PDgQAAB/6CgoKCgoKCgoKCgv4ACH68wMDAgACAwMDAvH4AB/6CgoKCgoKCgoKCgv4ACH68wMDAvH68wMDAvH4ACH68wMDAvH68wMDAgAAACH68wMDAgACBw8PDvX4ACACBw8PDvX69w8PDgQAACACAwMDAgACAwMDAgAAACAABAwMDAQABAwMDPX4AB/6CgoKCgoKCgoKCgv4ACACAwMDAgACAwMDAvH4AB/6CgoKCgoKCgoKCgv4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home.0"
{widgets}
fontlist:{"type":"grid","size":[150,111],"pos":[351,190],"lines":0,"value":{"name":["body","menu","mono","deckbuilder","olympiad","olympiad_italic","olympiad_title","segments","segments_big"]},"scroll":2,"row":3}
editor:{"type":"canvas","size":[168,224],"pos":[11,26],"script":"home.1","image":"%%IMG2ABgAIAAKDA4ACgwOAAMBBAADDA4AAwEEAAMMDgADAQQAAwwOAAMBBQACDA4AAgEGAAIMDgACAQYAAgwOAAIBBgACDA4AAgEGAAIMDgACAQIAAQEDAAIMDgACAQIAAQEDAAIMDgABAQMAAQEEAAEMDgABAQMAAQEEAAEMDgABAQMAAgEDAAEMDgABAQMAAgEDAAEMDgABAQMAAgEDAAEMDgABAQMAAgEDAAEMDgEKDA4BCgwOAQoMDgEKDA4BBAACAQQMDgEEAAIBBAwOAQQAAgEEDA4BBAACAQQMDgAKDA4ACgwOAAoMDgAKDA4ACgwOAAoMDg==","pattern":0,"scale":7}
scale:{"type":"slider","size":[52,19],"pos":[444,21],"interval":[1,16],"value":7,"style":"compact"}
field1:{"type":"field","size":[39,17],"pos":[392,23],"border":0,"scrollbar":1,"style":"plain","value":"scale"}
height:{"type":"slider","size":[52,19],"pos":[444,48],"script":"home.2","interval":[1,128],"value":32,"style":"compact"}
field2:{"type":"field","size":[39,17],"pos":[392,49],"border":0,"scrollbar":1,"style":"plain","value":"height"}
width:{"type":"slider","size":[52,19],"pos":[444,72],"script":"home.3","interval":[1,128],"value":24,"style":"compact"}
field3:{"type":"field","size":[39,17],"pos":[392,73],"border":0,"scrollbar":1,"style":"plain","value":"width"}
space:{"type":"slider","size":[52,19],"pos":[444,96],"script":"home.4","interval":[0,128],"value":1,"style":"compact"}
field4:{"type":"field","size":[39,17],"pos":[392,97],"border":0,"scrollbar":1,"style":"plain","value":"space"}
charwidth:{"type":"slider","size":[52,19],"pos":[444,156],"script":"home.5","interval":[1,24],"value":9,"style":"compact"}
field5:{"type":"field","size":[51,17],"pos":[392,157],"border":0,"scrollbar":1,"style":"plain","value":"charwidth"}
char:{"type":"slider","size":[52,19],"pos":[444,132],"interval":[32,127],"value":65,"format":"%a","style":"compact"}
field6:{"type":"field","size":[51,17],"pos":[392,133],"border":0,"scrollbar":1,"style":"plain","value":"char"}
button1:{"type":"button","size":[73,22],"pos":[351,307],"script":"home.6","text":"Copy"}
button2:{"type":"button","size":[71,22],"pos":[430,307],"script":"home.7","text":"Delete"}
preview:{"type":"field","size":[316,68],"pos":[11,265],"font":"deckbuilder","scrollbar":1,"style":"plain","value":"!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ \n\nHow razorback jumping-frogs can level six piqued gymnasts.\n\nJackdaws love my black sphinx of quartz.\n"}

{script:home.0}
on currfont do
 deck.fonts[first fontlist.rowvalue]
end

on view do
 fontlist.value:select name:key from deck.fonts
 f:currfont[]
 g:f[char.value-32]
 
 preview.font:f
 width    .value:f.size[0]
 height   .value:f.size[1]
 space    .value:f.space
 charwidth.value:g.size[0]
 charwidth.interval:1,width.value

 p:editor.pattern
 editor.lsize:f.size
 editor.scale:scale.value
 editor.clear[]
 editor.pattern:12
 editor.fill[]
 editor.pattern:1
 editor.paste[g]
 editor.pattern:p
end

on click do
 view[]
end

on change do
 view[]
end
{end}

{script:home.1}
on click pos do
 me.pattern:!me[pos]
end

on drag pos do
 send drag[pos]
 f:currfont[]
 g:me.copy[0,0 charwidth.value,height.value]
 f[char.value-32]:g
 view[]
end

on release pos do
 drag[pos]
end
{end}

{script:home.2}
on change val do
 f:currfont[]
 f.size:f.size[0],val
 view[]
end
{end}

{script:home.3}
on change val do
 f:currfont[]
 f.size:val,f.size[1]
 view[]
end
{end}

{script:home.4}
on change val do
 f:currfont[]
 f.space:val
end
{end}

{script:home.5}
on change val do
 f:currfont[]
 g:f[char.value-32]
 g.size:val,g.size[1]
 f[char.value-32]:g
 view[]
end
{end}

{script:home.6}
on click do
 f:currfont[]
 n:alert["New font name?" "string"]
 if n deck.add[f n] end
 view[]
end
{end}

{script:home.7}
on click do
 n:first fontlist.rowvalue
 if alert[("Are you sure you want to delete '%s'?" format n) "bool" "Delete"]
  deck.remove[currfont[]]
  view[]
 end
end
{end}

