{"id":45504,"date":"2019-07-03T03:01:36","date_gmt":"2019-07-02T17:01:36","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=45504"},"modified":"2019-07-02T23:15:26","modified_gmt":"2019-07-02T13:15:26","slug":"local-fonts-revisited-recall-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/local-fonts-revisited-recall-tutorial\/","title":{"rendered":"Local Fonts Revisited Recall Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/under_local_font.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Local Fonts Revisited Recall Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/lfa.jpg\" title=\"Local Fonts Revisited Recall Tutorial\"  style=\"float:left;\"   \/><\/a><p class=\"wp-caption-text\">Local Fonts Revisited Recall Tutorial<\/p><\/div>\n<p>Onto yesterday&#8217;s <a title='Local Fonts Revisited Primer Tutorial' href='#lfrpt'>Local Fonts Revisited Primer Tutorial<\/a> Local Fonts web application start, we&#8217;ve progressed today with some &#8220;recall&#8221; work.<\/p>\n<p>In this respect we had to decide a mechanism by which a user could recall their work.   Our decision is to &#8230;<\/p>\n<ul>\n<li>be saving user defined font characters into a long &#8220;canvas&#8221; strip element &#8230; and &#8230;<\/li>\n<li>allow a &#8220;Save&#8221; button be pressed &#8230; to &#8230;<\/li>\n<li>convert that &#8220;canvas&#8221; strip element to data URI and subsequently to a web server image file (via PHP) &#8230; that has a filename whereby &#8230;<\/li>\n<li>on web application rerun if such a Local Fonts web server image file is found (via PHP) &#8230; this triggers &#8230;<\/li>\n<li>a select (dropdown) element appears in the h1 heading element allowing the user to &#8220;recall&#8221; that Local Font work &#8230;in which case &#8230;<\/li>\n<li>a long &#8220;canvas&#8221; strip element appears with these Local Font characters &#8230;  and tomorrow &#8230;<\/li>\n<\/ul>\n<p> &#8230; leaving tomorrow&#8217;s work to &#8220;meld&#8221; that recall data into the natural workflow of that previous work.<\/p>\n<p>It&#8217;s best you view <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/under_local_font.html-GETME\" title=\"under_local_font.html\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/under_local_font.html-GETME\" title=\"under_local_font.html\">under_local_font.html<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/under_local_font.html\" title=\"Click picture\">live run<\/a> link to see what we mean here, getting the [canvasContext].<a target=_blank title='HTML canvas element drawImage() method information from w3schools' href='http:\/\/www.w3schools.com\/tags\/canvas_drawimage.asp'>drawImage<\/a>() functionality to be able to draw multiple images into a single canvas element, the curiosity being that <font color=red>we needed to<\/font> &#8230;<\/p>\n<p><code><br \/>\nfunction athy() {<br \/>\n   var xid='';<br \/>\n   if (lastcid != cid) {<br \/>\n   lastcid=cid;<br \/>\n   <font color=red>compcanv=document.getElementById('compositeimages');<br \/>\n   compcanvc=compcanv.getContext('2d');<\/font><br \/>\n   var isd=docgetclass('athy', 'img');<br \/>\n   for (var jsd=0; jsd&lt;isd.length; jsd++) {<br \/>\n   xid=String.fromCharCode(eval('' + isd[jsd].id.replace('image','')));<br \/>\n   curx=eval(70 * eval('' + origlist.indexOf(xid)));<br \/>\n   compcanvc.drawImage(document.getElementById(isd[jsd].id),0,0,70,70,curx,cury,70,70);<br \/>\n   }<br \/>\n   }<br \/>\n}<br \/>\n<\/code><\/p>\n<p> &#8230; a form of verbosity we were not expecting but required because the canvas would clear in between Local Font character definitions.<\/p>\n<hr>\n<p id='lfrpt'>Previous relevant <a target=_blank title='Local Fonts Revisited Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/local-fonts-revisited-primer-tutorial\/'>Local Fonts Revisited Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/under_local_font.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Local Fonts Revisited Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/localfontagain.jpg\" title=\"Local Fonts Revisited Primer Tutorial\"  style=\"float:left;\"   \/><\/a><p class=\"wp-caption-text\">Local Fonts Revisited Primer Tutorial<\/p><\/div>\n<p>Working off our work on the Textarea Pointing web application of the series of blog postings ending with <a target=_blank href='https:\/\/www.rjmprogramming.com.au\/ITblog\/textarea-pointing-local-font-canvas-overlay-deletes-tutorial\/' title='Textarea Pointing Local Font Canvas Overlay Deletes Tutorial '>Textarea Pointing Local Font Canvas Overlay Deletes Tutorial<\/a> today we&#8217;re starting out on a Local Fonts web application journey.<\/p>\n<p>At this early stage we&#8217;re missing a bit of accountability and recall but we have worked a way to combine &#8230;<\/p>\n<ul>\n<li>proper web font text characters &#8230; with &#8230;<\/li>\n<li>tailored <a target=_blank title='HTML Canvas element information from w3schools' href='http:\/\/www.w3schools.com\/tags\/ref_canvas.asp'>canvas<\/a> drawn &#8220;scribble&#8221; Local Font alternatives &#8230; within a grandchild child <a target=_blank title='HTML iframe element information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_iframe.asp'>iframe<\/a> element &#8230; the in between child <a target=_blank title='HTML iframe element information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_iframe.asp'>iframe<\/a> called via the srcdoc content mode of populating<\/li>\n<\/ul>\n<p>The user can see these characters &#8220;infiltrate&#8221; text strings there on the webpage, one &#8230;<\/p>\n<ol>\n<li>a list of the ascii characters we&#8217;re dealing with using these Local Fonts &#8230; and the other &#8230;<\/li>\n<li>a user controllable HTML div contenteditable=true text string that dynamically changes appropriately as the user defines their Local Font characters<\/li>\n<\/ol>\n<p>Like the idea?  Well, follow the journey in the days to follow today&#8217;s &#8220;proof of concept&#8221; <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/under_local_font.html_GETME\" title=\"under_local_font.html\">under_local_font.html<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/under_local_font.html\" title=\"Click picture\">live run<\/a> link.<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d45498' onclick='var dv=document.getElementById(\"d45498\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/contentediable\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d45498' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d45504' onclick='var dv=document.getElementById(\"d45504\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/drawimage\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d45504' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Onto yesterday&#8217;s Local Fonts Revisited Primer Tutorial Local Fonts web application start, we&#8217;ve progressed today with some &#8220;recall&#8221; work. In this respect we had to decide a mechanism by which a user could recall their work. Our decision is to &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/local-fonts-revisited-recall-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,14,37],"tags":[184,2442,342,354,2518,418,451,576,587,590,652,2995,932,997,1841,2902,2324,1319,1411],"class_list":["post-45504","post","type-post","status-publish","format-standard","hentry","category-elearning","category-event-driven-programming","category-tutorials","tag-canvas","tag-contenteditable","tag-div","tag-dom","tag-drawimage","tag-file","tag-font","tag-html","tag-iframe","tag-image","tag-javascript","tag-local-font","tag-php","tag-programming","tag-scribble","tag-srcdoc","tag-todataurl","tag-tutorial","tag-web-server"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/45504"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=45504"}],"version-history":[{"count":5,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/45504\/revisions"}],"predecessor-version":[{"id":45509,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/45504\/revisions\/45509"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=45504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=45504"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=45504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}