Help with JS please

Posted on
Page
of 2
/ 2
Next
  • I have this idea for a clock but despite that I know several programming languages
    and even contributed to well known books on Action Script long time ago,
    I am stumped with JS and Espruino..

    I actually hesitated a lot to buy the Bangle because of JS.

    I managed to change the font in Anton Clock, but I dont really get any of it
    and I have no clue what is Bangle specific, Espruino specific or JS, or user defined functions.
    Or what all the parameters and keywords mean.

    And it seems too much to learn fir something that otherwise could be finished in an hour or two.

    Maybe someone can help me building this?
    Though I guess its faster to code it yourself than to explain...

    Here is the concept:

    Top: sunrise/ sunset day / night time, 24 h ( moving right to left, indicators at noon and midnight)
    Arrow beneath: current moment ( center)
    Dots benath: upcoming alarms (12 h)

    Big number: hour and minute, ( with the minutes getting bigger while they aproach 59
    and the hour getting smaller respectively. So each hour starts big end ends small,
    with the minutes vice versa. A kind of depth effect)

    Bottom: current day of month in the respective box of the day in the week, starting with Monday.
    Also an icon for the days of, new, half and full moons.

    When the date and moon overlap I want to display a dim large moon bitmap in the background on these days instead if the icon on the bottom.

    so my questions are:

    how do I query, preferably as numbers, not strings:

    day in the week
    day of month
    Julian date

    and scheduled alarms 12 h ahead?

    How do I draw a line, and a box , a circle,
    How do I place a bitmap?

    What is "g." ?

    ?


    1 Attachment

    • grafik clock 3.gif
  • Hi!

    Really cool clock face idea! ūüėÄ

    Much can be figured out with:

    "g." is the Graphics class, can be read about in the hardware reference. There you can also read about the Date class.

  • Thanks.
    I have to admit I am a bit too impatient and lazy.

    One question I, am not sure, to display the numbers in varying sizes I need to embed fonts in all sizes I need ?
    I managed to scale the font up but it seems its pixelated and also seems that I can only scale mutiple integer ratios and cant scake down?
    Numbers only dont seem to occupy too much space, but its a bit tediuos to precalculate the sizes and import each,

  • Hi!
    I'm also new programming bangle.js 2. I'm currently using a modified version of the Run app with different data fields and bigger numbers (I don't show headings names for better legibility). I use vector font like this:
    var fontHeading = "6x8:2"; //scaled bitmap font
    var fontValueSmall = B2 ? "Vector:30" : "Vector:24";
    var fontValueLarge = B2 ? "Vector:50" : "Vector:40";

    ("B2? :" is for choosing different sizes for bangle.js and bangle.js 2.)
    You can arbitrarily change the vector font size, but I believe that are bad for small sizes (that's why I only use vector for the big numbers. In my case I'm going to write a new app with custom bitmap fonts because I only need numbers and a few letters in two different sizes and legibility would be better than vector. For your use case I think vector fonts make more sense.

  • I do reccomend the tutorials for familiarizing yourself with coding for the bangle in a guided step-by-step fashion. I think you'd be hard pressed finding a faster track to getting where you want. They helped me getting started ūüėČūüôā

  • I dont know, I think the simple clock examples are simple enought to learn from.
    It s just that JS has too many functions and properies and stuff ti learn quickly.

    I decided against the vector font for now since it didnt look so smooth.
    Here is what I manged so far, I skipped the idea of dynamic scaling,
    I just use two sizes, a bigger one fir single cypher numbers.

    I havent testet it on tge device yet


    1 Attachment

    • screenshot (10).png
  • for choosing different sizes for bangle.js and bangle.js 2

    I decided to only create it fir the Bangle 2 for now.

    I actually hard coded the screen size, I know its bad style.

  • @ga, looks like your main challenge is switching from environments with theoretically unlimited resources to something that lives on a shoe string budget, almost in evey regard

    display: did you ever do graphics on a 176x176 pixel, 8 colors per pixel display (11KB graphics memory), like bangle.js2? A bit more graphics resource of 240x240 pixel 64K colors? ...no GPU...

    memory: 256KB (64KB) RAM - includes 'OS' (OS is standalone JS - or a JS that includes all OS commands)

    cpu: single core, 64MHz, responsible for just everything that is going on.

    ...and last but not least: execution runs (mainly) on source interpretatively (now there are some faster options for some parts, and compiled, c and assembly can be mixed in).

    It is a mind shift... even when coming for a JS past. Good pre-disposition is having worked with the first - viable for general applications - 8-bit micro processors on the market, where you might have the computing capacity defined by 8-bit CPU with mainy 8 bit registers and a few 16- bit ones for adressing memory, 2-4MHz clocked, 32..64 KB RAM, very simple, frugal OS, and sometimes the screen/character display of 24 lines / 80 characters - monochrome - is memory mapped / part of your RAM. OS and Screen in 10KB, rest free for programs with their data. Storage: 80 or 160KB 8" or 5-1/4" floppy... total 'mass' storage addressability: 60/80..16..1200KB (max not even 'lasting' for a single picture taken with the phone...

    All this said and in mind, it is all just a matter of how smart and targeted/dedicated the implementation is with so much - little - resources.

  • right. My first computer was an Ohio Scuentific Superboard II with I think 2 kB Memory.
    It had a 256 character set that included lines and characters that devided the character into smaller blocks, so I was using these for higher resolution graphics.
    Also did graphics an the Amiga. Used unrolled loops in Flash an bytecode...
    I actually prefer working for things like these, and then do the "impossible" stuff with limited ressources.

    At the moment however my watch face caculates everything each minute instead of calculating the week only once.
    Heres a test how its going to look like, but still a long way to go, maybe 1/3 there


    1 Attachment

    • 20230501_090913.jpg
  • @ga,

    looking good. Very interesting approach to make a watch face more alive and injecting analog aspects into digital representation.

    Regarding calculation intervals: you can actually have multiple events with different timeout times / interval times going, so that the minimum calculations are executed to save power and extend battery life. Same applies for applying changes to the display: update only what is actually required to be updated. Bangle.js2 is already very fast, much faster than Bangle.js. Display size and color depth and how the display driver is communicating with the processor. Using vector fonts is process intensive. May be you can use a bitmap copy process rather than a drawing process, since the number of character you need are very small, and the variation in size is limited (what's the min and max font size for hr and min?). Storage in Flash EEPROM rather than RAM should provide you enough space to do something like that.

    Checkout out this conversation about setFontCustom bitmap format vs vertical_byte:true - GT24L24A2Y fontchip in F07 fitness tracker

  • I use bitmap fonts now and omitted the scaling, maybe will do this for a different more gimicky watch face.
    At the moment there are still a lot if unneccessary characters included though.

    I just good the moon display code working ( I hope, seems to work).
    It only works with a dark background though since the full moon doesnt have an outline and I found it odd to draw an inverted black moon.

    The plan for now is to clean up the code and optimize the screen drawing as you suggested, and release it.
    I ll probably need to redraw all of the screen in the end since the numbers may overlap with other graphics, but the calculation should not be done all the time.

    The other ideas need more time and learning, and I realized that I like a simplistic look better and its also easier to modify when its kept simple.
    The sunlight daytime would also require position and is probably not so easy
    though I wasnt planning to make it very accurate, just a graphic hint.
    I know there is an example, but I have not looked at the code in detail.

    Although onther thought I had is, that a watch that is crammed with info about your upcoming dates may increase stress, maybe its not even a good idea.

    Heres the work in progress code so far in case someone is interested,
    still messy but works I think

    // Clock with date and moon phase based on the "Anton Clock"
    
    Graphics.prototype.setFontmoonphases = function() {
      // Actual height 23 (23 - 1)
      return this.setFontCustom(
        atob('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEACAH/nAH­/nAAACAAAAAAAAAAAAAHwAAH4AAAAAAAAAAGAAAH­4AAHgAAAAAAAAAAAQgAAQhAAQ/AA/4AH8gAGQgAA­QjAAR/AA/4AH4gAEQgAAQgAAA4APg8APwMAY4EAQ­4EB///AQcEAQcMAcP8AeP4AADwAAAAAB4AAD8AAH­OAAECBAECDAGGGAH8cAD44AABgAAHAAAMAAAY+AB­z/ADDDAGCBAECBAADnAAB+AAA8AAAAAAAAAAB8AA­D+ADz/AH+DAGeBAEOBAEPBAELhAH5zADw6ABg+AA­EeAAF/AAHnAAGDAAEBAAABAAAAAAAAAH4AAHwAAA­AAAAAAAP/gA//4B8B8DgAOGAACEAADAAAAAAAAEA­ADGAACDgAOB8B8A//4AP/gAAAAAAAAAH4AA//AB/­/gD//wH//4P//8P//8f//+f//+f//+f//+f//+f/­/+f//+f//+P//8P//8H//4D//wB//gA//AAP8AAA­AAAAAAAAAAAH4AAf+AB//gD//wD//wH//4H//8P/­/8P//8P//8P//8P//8P//8P//8H//4H//4D//wB/­/gA//AAf+AADwAAAABAAAxAAA+AAA8AAAAAAAAAA­AAAABgAABgAABgAABgAABgAABgAAAAAAAAAAACAA­AHAAAHAAACAAAAAAAHAAA8AAHwAA+AADwAAHAAAA­AAAAAAAH4AA//AB//gD//wH//4P//8P//8f//+f/­/+f//+f//+f//+f//+f//+f//+P//8P//8H//4D/­/wB//gA//AAP8AAAAAAAAAAAAAABABADABACABAH­//AH//AAABAAABAAABAAAAAAAAAAAAAHAHAHAHAE­APAEAbAEAzAGBjAHPDAD+DAD8DAAADAAAAAAAAAD­APAHADAGABAEEBAEEBAEGBAGODAH7HAD7+AAh8AA­AAAAA4AAB4AAHYAAMYAAYYABwYADgYAH//AH//AA­AYAAAYAAAAAAAAAAAGAH8PAGEDAGEBAGEBAGEBAG­GDAGGDAGD+AAD8AAAQAAAAAA/4AB/+ADyPAGGDAE­EBAEEBAEGBAGHHAHD+AAB8AAAAAAAAAAAAAHgAAG­ABAGAHAGAeAGB4AGHgAGeAAH4AAHgAAEAAAAAAAB­x8AD7+AH/HAGOBAEEBAEEBAGODAH/HAD7+ABx8AA­AAAAAAAB8GAD+HAHvBAGDBAEBBAEBBAGBDAHjOAD­/8AB/4AAAAAAAAAAICAAcHAAcHAAICAAAAAAAAAA­AAAAABAHAzAHA+AHA8AAAAAAAAAAAAAAGAAAHAAA­NAAANgAAZgAAYwAAwwAAwYAAgYABgIABAMAAAAAA­AAAAAAABAMABgIAAgYAAwQAAQwAAYgAAJgAANgAA­PAAAHAAAGAAAAAAAAAAAAAAHAAAGAAAEAHAED3AE­CHAGGAAH8AAD8AAAwAAAAAAAAAAP8AA4HABgBgCA­AQEAAIMAAMIAAEYAAGQAACQAACQAACQAACQAACQA­ACYAAGIAAEMAAMGAAYDAAwBgBgA8PAAH4AAAAAAA­AAAH4AA//AB//gD//wH//4P//8P//8f//+f//+f/­/+f//+f//+f//+f//+f//+P//8P//8H//4D//wB/­/gA5nAAP8AAAAAAAAAAH4AA//AB//gD//wH//4P/­/8P//8f//+f//+f//+f//+f//+f//+f//+f//+P/­/8P//8F//oCf+QBjxgA4HAAP8AAAAAAAAAAH4AA/­/AB//gD//wH//4P//8P//8f//+f//+f//+f//+f/­/+f//+f//+f//+L//0N//sEf+ICAAQBgBgA4HAAP­8AAAAAAAAAAH4AA//AB//gD//wH//4P//8P//8f/­/+f//+f//+f//+f//+f//+f//+b//2J//kMP8MEA­AICAAQBgBgA4HAAP8AAAAAAAAAAH4AA//AB//gD/­/wH//4P//8P//8f//+f//+f//+f//+f//+f//+X/­/6Y//GIAAEMAAMEAAICAAQBgBgA4HAAP8AAAAAAA­AAAH4AA//AB//gD//wH//4P//8P//8f//+f//+f/­/+f//+f//+X//6QBgCYAAGIAAEMAAMEAAICAAQBg­BgA4HAAP8AAAAAAAAAAH4AA//AB//gD//wH//4P/­/8P//8f//+f//+f//+f//+QAACQAACQAACYAAGIA­AEMAAMEAAICAAQBgBgA4HAAP8AAAAAAAAAAH4AA/­/AB//gD//wH//4P//8P//8f//+f//+fAA+YAAGQA­ACQAACQAACYAAGIAAEMAAMEAAICAAQBgBgA4HAAP­8AAAAAAAAAAH4AA//AB//gD//wH//4P//8P//8f4­H+eAAeYAAGQAACQAACQAACQAACYAAGIAAEMAAMEA­AICAAQBgBgA4HAAP8AAAAAAAAAAH4AA//AB//gD/­/wH//4P//8PgB8eAAeYAAGQAACQAACQAACQAACQA­ACYAAGIAAEMAAMEAAICAAQBgBgA4HAAP8AAAAAAA­AAAH4AA//AB//gD//wH8P4PAA8OAAcYAAGYAAGQA­ACQAACQAACQAACQAACYAAGIAAEMAAMEAAICAAQBg­BgA4HAAP8AAAAAAAAAAH4AA//AB//gD4HwHAA4OA­AcMAAMYAAGYAAGQAACQAACQAACQAACQAACYAAGIA­AEMAAMEAAICAAQBgBgA4HAAP8AAAAAAAAAAH4AA/­/AB4HgDgBwGAAYMAAMIAAEYAAGQAACQAACQAACQA­ACQAACQAACYAAGIAAEMAAMEAAICAAQBgBgA4HAAP­8AAAAAAAAAAP8AA4HABgBgCAAQEAAIMAAMIAAEYA­AGQAACQAACQAACQAACQAACQAACYAAGIAAEMAAMGA­AYDgBwB4HgA//AAH4AAAAAAAAAAP8AA4HABgBgCA­AQEAAIMAAMIAAEYAAGQAACQAACQAACQAACQAACYA­AGYAAGMAAMOAAcHAA4D4HwB//gA//AAH4AAAAAAA­AAAP8AA4HABgBgCAAQEAAIMAAMIAAEYAAGQAACQA­ACQAACQAACQAACYAAGcAAOOAAcPAA8H8P4D//wB/­/gA//AAH4AAAAAAAAAAP8AA4HABgBgCAAQEAAIMA­AMIAAEYAAGQAACQAACQAACQAACYAAGYAAGeAAePg­B8P//8H//4D//wB//gA//AAH4AAAAAAAAAAP8AA4­HABgBgCAAQEAAIMAAMIAAEYAAGQAACQAACQAACQA­ACYAAGeAAef4H+P//8P//8H//4D//wB//gA//AAH­4AAAAAAAAAAP8AA4HABgBgCAAQEAAIMAAMIAAEYA­AGQAACQAACQAACYAAGfgB+f//+f//+P//8P//8H/­/4D//wB//gA//AAH4AAAAAAAAAAP8AA4HABgBgCA­AQEAAIMAAMIAAEYAAGQAACQAACQAACf//+f//+f/­/+f//+P//8P//8H//4D//wB//gA//AAH4AAAAAAA­AAAP8AA4HABgBgCAAQEAAIMAAMIAAEYAAGQH4CX/­/6f//+f//+f//+f//+f//+P//8P//8H//4D//wB/­/gA//AAH4AAAAAAAAAAP8AA4HABgBgCAAQEAAIMA­AMIAAEY//GX//6f//+f//+f//+f//+f//+f//+P/­/8P//8H//4D//wB//gA//AAH4AAAAAAAAAAP8AA4­HABgBgCAAQEAAIMf+MJ//kf//+f//+f//+f//+f/­/+f//+f//+f//+P//8P//8H//4D//wB//gA//AAH­4AAAAAAAAAAP8AA4HABgBgCAAQEf+IN//sL//0f/­/+f//+f//+f//+f//+f//+f//+f//+P//8P//8H/­/4D//wB//gA//AAH4AAAAAAAAAAP8AA4HABjxgCf­+QF//oP//8P//8f//+f//+f//+f//+f//+f//+f/­/+f//+P//8P//8H//4D//wB//gA//AAH4AAAAAAA­AAAH4AA8PAB//gD//wH//4P//8P//8f//+f//+f/­/+f//+f//+f//+f//+f//+P//8P//8H//4D//wB/­/gA//AAP8AAAAAAAAAAAAAD///D///CAADCAADCA­ABAAAAAHAAAB4AAAfAAAD4AAAeAAADAAAAAAAACA­ABCAADCAADD///D///AAAAAAAA'),
        32,
        atob("GAgKDAwUEwQICBgXBggGBxgMDAwMDAwMDA­wHBw4ADgsYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGB­gYGBgIBwg="),
        24|65536
      );
    }
    
    Graphics.prototype.setFontInknutAntiqua2­4 = function() {
      // Actual height 24 (23 - 0)
      return this.setFontCustom(
        atob('AAAAAB4AAD4AAD4AAD4AABwAAAAAAAAAAA­AAAAAPAAD/AA/4AP+AD/gAf4AAeAAAAAAAAAAAAY­AAB/AAD/gAH/wAP/4APH4AcB4AcA4AcA4AcA4AeA­4AfBwAf/wAP/gAH/AAD+AAA4AAAAAAAAAAIAYAcA­YAcA4Af/4Af/4Af/4Af/4AcAYAYAYAAAQAAAAACA­IAGAYAOA4AeB4AcD4AcH4AcP4Aef4Af94Af54APx­4APh4ADH4AAH8AAAAAAAAACAAAGAAYOAAYeAA4cC­AwcHBwefBwf/ngP//gPz/AHj+ACB8AAAwAAAAAAA­wAABwAAHwAAPwAAfwAA8wABwwADgwAPBwAP//wf/­/wf//wf//gAAwAAAwAAAwAAAAAAHAGD/AOH/AMHv­gMHngcHnwYHn44Hj/wHj/wfh/gfw/AAAeAAAAAAA­AAAAAAAB8AAP/AAf/gA//wB//4D8D4HwB4HsA4PO­A4ePA4cPh44H/w4H/gAD/AAB+AAAYAAAAAAAAA/g­AAfgAAeAAYeAB4eAHweAfAeB8AeHwAePAAe8AAf4­AAfgAAeAAAYAAAAAAAAAAAAAeADg/APx/gP7/gf/­/w/+Dw4+Bw4fBw4fBw8fhw//zwf3/gfj/gPD/AAB­+AAAYAAAAAAAAAA+AAD/AAH/gYH/wYP/w4OD5wcA­5wcAzgeAPgfAfAP/+AP/8AH/4AD/wAB/AAAAAAAA­AAAAAAHB4APj4APj4APj4APBwAAAAAAAAA'),
        46,
        atob("CAkTDBANEQ8SEBISCA=="),
        24|65536
      );
    };
    
    Graphics.prototype.setFontInknutAntiqua6­6 = function() {
      // Actual height 66 (65 - 0)
      return this.setFontCustom(
        atob('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAD8AAAAAAAAAH/AAAAAAAAAP/AAAAAAAAAf/g­AAAAAAAAf/gAAAAAAAA//wAAAAAAAA//wAAAAAAA­A//wAAAAAAAB//gAAAAAAAA//gAAAAAAAA//gAAA­AAAAA//AAAAAAAAAf+AAAAAAAAAP8AAAAAAAAAH4­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAA­fAAAAAAAAAH/AAAAAAAAB//AAAAAAAAf//AAAAAA­AH///AAAAAAB///8AAAAAA////AAAAAAP///wAAA­AAD///8AAAAAA////AAAAAAP///wAAAAAD///8AA­AAAA////AAAAAAf///gAAAAAH///4AAAAAAf//+A­AAAAAAf//gAAAAAAAf/4AAAAAAAAf+AAAAAAAAAf­gAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAB4AAAAAAAAAf/gAAAAAAAB/­/8AAAAAAAH//+AAAAAAAP///gAAAAAAf///wAAAA­AA////4AAAAAB////8AAAAAD////8AAAAAH////+­AAAAAP/////AAAAAP/////AAAAAf/////AAAAAf+­AH//gAAAA/wAA//gAAAA/gAAf/gAAAB/AAAH/gAA­AB/AAAD/wAAAD/AAAB/wAAAD+AAAB/wAAAD+AAAB­/wAAAD+AAAA/wAAAD+AAAA/wAAAD/AAAA/gAAAH/­AAAA/gAAAH/AAAA/gAAAD/gAAA/gAAAD/gAAB/AA­AAD/wAAB/AAAAD/8AAD/AAAAD//AAH+AAAAD//4A­/+AAAAB/////8AAAAB/////8AAAAA/////4AAAAA­/////wAAAAAf////gAAAAAP////gAAAAAP////AA­AAAAH///+AAAAAAB///4AAAAAAA///wAAAAAAAP/­/AAAAAAAAD/8AAAAAAAAAPAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAIAAAAAAAAAA4AAAAHgAAAD4A­AAAPgAAAD8AAAAfgAAAD8AAAAfgAAAD8AAAA/gAA­AD8AAAB/gAAAD+AAAD/gAAAD//////gAAAD/////­/gAAAD//////gAAAD//////gAAAD//////gAAAD/­/////gAAAD//////gAAAD//////gAAAD//////gA­AAD//////gAAAD//////gAAAD/gAAA/gAAAD/AAA­AfgAAAD+AAAAfgAAAD+AAAAfgAAAD8AAAAPgAAAD­4AAAAPgAAADwAAAAOAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAB4AAAHgAAAAD8AAAPgAAA­AD8AAAfgAAAAH4AAA/gAAAAP4AAB/gAAAAfwAAD/­gAAAA/wAAD/gAAAA/wAAH/gAAAB/gAAP/gAAAD/g­AAf/gAAAD/gAA//gAAAD/AAB//gAAAD/AAB//gAA­AD/AAD//gAAAD/AAH//gAAAD/AAP//gAAAD/gAf/­/gAAAD/gB///gAAAD/wD///gAAAD/8P/f/gAAAD/­//+f/gAAAD///+f/gAAAD///8f/gAAAB///4f/gA­AAB///wf/gAAAB///gf/gAAAA///Af/gAAAA//+A­f/gAAAAf/8Af/gAAAAf/4Af/gAAAAP/wAf/gAAAA­H/AA//gAAAAB8AH//gAAAAAAAP//wAAAAAAAP//w­AAAAAAAP//wAAAAAAAP//wAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAA­ADwAAAAAAcAAH4AAAAAAfAAH4AAAAAA/AAPwAAAA­AA/AAfwAAAAAA/AA/gAAAAAB+AB/gAAAAAB+AB/A­AAAAAD+AD/AAAAAAD8AH/AAAAAAH8AH+AAAAAAH4­AH+AAHgAAP4AH+AAPwAAP4AH/AAfwAAfwAH/AA/4­AAfwAH/gD/4AA/gAH/4P/8AB/gAH////+AD/AAD/­////AH/AAD/////wf+AAD///////+AAB///v///8­AAB///P///8AAA//+H///4AAA//8H///wAAAf/4D­///wAAAP/wB///gAAAP/gB///AAAAD+AA//+AAAA­A4AAf/8AAAAAAAAP/wAAAAAAAAH/AAAAAAAAAAwA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AA8AAAAAAAAAB8AAAAAAAAAH8AAAAAAAAAP8AAAA­AAAAAf8AAAAAAAAA/8AAAAAAAAB/8AAAAAAAAH/8­AAAAAAAAP/8AAAAAAAAf/8AAAAAAAA//8AAAAAAA­B/38AAAAAAAH/n8AAAAAAAP/H8AAAAAAAf+H8AAA­AAAA/4H8AAAAAAD/wH8AAAAAAH/gH8AAAAAAP/AH­8AAAAAAf8AH8AAAAAA/4AH8AAAAAD/wAH8AAAAAH­/gAH8AAAAAP/AAH8AAAAAf8AAH8AAAAA////////­8AA////////4AB////////4AB////////4AB////­////wAD////////wAD////////wAD////////gAH­////////gAH////////AAH////////AAAAAAAH8A­AAAAAAAAH8AAAAAAAAAH8AAAAAAAAAH8AAAAAAAA­AH8AAAAAAAAAH8AAAAAAAAAH8AAAAAAAAAH8AAAA­AAAAAH4AAAAAAAAAHAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAH4AAA­APgAAAH4AAAH/gAAAH4AAD//wAAAPwAB///wAAAP­wAf///wAAAPwA////4AAAfgA////4AAAfgA//D/8­AAAfgA//D/8AAA/AA//D/8AAA/AA//B/+AAB/AA/­/B/+AAB+AA//A//AAD+AA//A//AAD+AA//A//gAH­8AA//Af/wAP8AA//Af/wAP4AA//AP/4A/4AA//AP­/+D/wAA//AH////wAA//AH////gAA//AD////gAA­//AD////AAA//AB///+AAB//AB///+AAP//AA///­8AAf//gAf//4AAf//gAP//wAAf//gAH//gAAf//g­AD//AAAAAAAAB/8AAAAAAAAAPgAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAP/8AAAAAAAB///gA­AAAAAP///4AAAAAA////+AAAAAB/////AAAAAH//­///gAAAAP/////wAAAAf/////4AAAA//////8AAA­B//////8AAAD//////+AAAH//////+AAAP//4B//­/AAAf/+AAH//AAA//wAAB//AAB//AAAAf/AAD/+A­AAAP/gAD/4AAAAH/gAH/wMAAAD/gAP/geAAAD/gA­P+B+AAAB/gAf8B/AAAB/gA/4B/gAAB/AA/wB/gAA­B/AB/wB/wAAB/AB/gB/4AAD/AD/AB/+AAD+AH+AA­//gAP+AH8AA//8A/8AP8AA/////8AP4AAf////4A­fwAAf////4AfgAAP////wAfgAAH////gAPAAAH//­//AACAAAD///+AAAAAAB///8AAAAAAA///4AAAAA­AAf//wAAAAAAAH//AAAAAAAAB/8AAAAAAAAAGAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/­/4AAAAAAAH//4AAAAAAAD//8AAAAAAAD//8AAAAA­AAD//wAAAAAAAD//AAAAAACAD/8AAAAAAPAD/8AA­AAAA/AD/8AAAAAD/gD/8AAAAAP/gD/8AAAAA//AD­/8AAAAD/8AD/8AAAAP/wAD/8AAAAf/AAD/8AAAB/­8AAD/8AAAH/wAAD/8AAAf/AAAD/8AAB/+AAAD/8A­AH/4AAAD/8AAf/gAAAD/8AB/+AAAAD/8AD/4AAAA­D/8AP/gAAAAD/8A/+AAAAAD/8D/4AAAAAD/8P/gA­AAAAD/8//AAAAAAD///8AAAAAAD///wAAAAAAD//­/AAAAAAAD//8AAAAAAAD//wAAAAAAAD//AAAAAAA­AD/8AAAAAAAAD/wAAAAAAAAD/gAAAAAAAAD+AAAA­AAAAABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAA/AAAAAAAAAD/w­AAAAAAAAH/8AAAAAAAAf/+AAAAf4AA///AAAB/+A­B///gAAD//AB///wAAH//gD///4AAf//wH///4AA­f//4P///8AA///8P///8AB///+f///+AD///+///­/+AD/////gD/+AH////+AA//AP////8AAP/AP+D/­/4AAH/AP4A//wAAD/AfwAf/4AAD/AfwAP/8AAB/g­fgAH/8AAB/gfgAD/+AAA/g/gAD/+AAA/g/wAB//A­AA/gfwAA//gAA/gf4AA//wAA/gf8AD//wAB/Af/A­P//4AB/Af/////8AD/Af//////AH+AP///z//gf+­AP///j////8AH///B////4AH//+B////4AD//8A/­///wAB//4Af///gAA//wAf///AAAf/AAP///AAAP­8AAH//+AAAAgAAD//4AAAAAAAB//wAAAAAAAAf/g­AAAAAAAAP+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf+AAA­AAAAAD//gAAAAAAAH//4AAAAAAAf//8AAAAAAA//­/+AAAAAAB////AAAAAAD////gAAMAAH////gAAfA­AP////wAA/gAP////4AA/AAf////4AB/AAf////8­AD+AA/+A//8AD+AA/wAH/8AH8AB/gAB/+AP8AB/A­AAf+Af4AD/AAAP+Af4AD+AAAH+A/wAD+AAAH+B/w­AD+AAAD+D/gAD+AAAB+H/AAD/AAAB4P/AAH/AAAA­wf+AAD/gAAAA/8AAD/wAAAD/8AAD/4AAAH/4AAD/­8AAAf/wAAD//AAD//gAAD//8Af//gAAB///////A­AAB//////+AAAA//////8AAAA//////4AAAAf///­//wAAAAP/////gAAAAH/////AAAAAD////8AAAAA­B////4AAAAAAf///gAAAAAAH//+AAAAAAAB//wAA­AAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAB8AAB8AAAAAD/AAH+AAAAAP/gAP/­AAAAAP/gAf/gAAAAf/wAf/gAAAA//wA//wAAAA//­wA//wAAAA//wA//wAAAA//wA//gAAAA//gA//gAA­AA//gA//gAAAA//AA//AAAAAf/AAf+AAAAAP+AAP­8AAAAAH4AAH4AAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAA=='),
        46,
        atob("FhczISslMCkyKzMyFg=="),
        66|65536
      );
    };
    
    Graphics.prototype.setFontInknutAntiqua8­8 = function() {
      // Actual height 88 (87 - 0)
      return this.setFontCustom(
        atob('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD4AAAAAA­AAAAAAA/4AAAAAAAAAAAAH/wAAAAAAAAAAAA//gA­AAAAAAAAAAH//AAAAAAAAAAAA//+AAAAAAAAAAAD­//4AAAAAAAAAAAf//gAAAAAAAAAAB//+AAAAAAAA­AAAH//4AAAAAAAAAAAf//gAAAAAAAAAAB//+AAAA­AAAAAAAH//4AAAAAAAAAAAf//AAAAAAAAAAAB//8­AAAAAAAAAAAH//gAAAAAAAAAAAP/8AAAAAAAAAAA­Af/gAAAAAAAAAAAA/8AAAAAAAAAAAAB/gAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAPAAAAAAAAAAAAAP8AAAAAAAAAAAAP/w­AAAAAAAAAAAf//AAAAAAAAAAAf//8AAAAAAAAAAf­///wAAAAAAAAAf////AAAAAAAAAf////wAAAAAAA­Af////wAAAAAAAAf////gAAAAAAAAf////gAAAAA­AAAf////gAAAAAAAA/////gAAAAAAAA/////gAAA­AAAAA/////gAAAAAAAA/////gAAAAAAAA/////gA­AAAAAAA/////gAAAAAAAA/////gAAAAAAAA/////­gAAAAAAAA/////gAAAAAAAAP////gAAAAAAAAA//­//AAAAAAAAAAD///AAAAAAAAAAAH//AAAAAAAAAA­AAf/AAAAAAAAAAAAB/AAAAAAAAAAAAAHAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8AAAAAAAAA­AAAB//wAAAAAAAAAAAf//wAAAAAAAAAAH///wAAA­AAAAAAB////wAAAAAAAAAP////gAAAAAAAAB////­/gAAAAAAAAP/////AAAAAAAAB/////+AAAAAAAAP­/////4AAAAAAAB//////wAAAAAAAP//////gAAAA­AAB///////AAAAAAAP//////8AAAAAAA///////4­AAAAAAH///////gAAAAAAf//////+AAAAAAD//AB­///8AAAAAAf/gAAf//wAAAAAB/8AAAf//AAAAAAH­/gAAAf/+AAAAAA/8AAAAf/4AAAAAD/gAAAA//gAA­AAAf+AAAAD/+AAAAAB/wAAAAH/4AAAAAH/AAAAAP­/gAAAAAf8AAAAA/+AAAAAD/wAAAAD/4AAAAAP/AA­AAAH/gAAAAA/8AAAAAf+AAAAAD/wAAAAB/4AAAAA­P/AAAAAH/gAAAAA/+AAAAAf+AAAAAD/4AAAAB/wA­AAAAP/gAAAAH/AAAAAA//AAAAAf8AAAAAD/+AAAA­D/gAAAAAP/8AAAAP+AAAAAA//4AAAB/4AAAAAD//­wAAAP/AAAAAAH//wAAB/8AAAAAAf//4AAf/gAAAA­AB////A//+AAAAAAD///////wAAAAAAP///////A­AAAAAAf//////4AAAAAAB///////AAAAAAAD////­//8AAAAAAAP//////gAAAAAAAf/////8AAAAAAAA­//////gAAAAAAAB/////8AAAAAAAAD/////gAAAA­AAAAH////8AAAAAAAAAP////gAAAAAAAAAP///4A­AAAAAAAAAf//+AAAAAAAAAAAf//gAAAAAAAAAAAH­/4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAYAAAAAAAAAAAAAHgAAAAAB8AAAA­AB+AAAAAAPwAAAAAP8AAAAAB/AAAAAA/wAAAAAP8­AAAAAD/AAAAAA/wAAAAAP8AAAAAH/AAAAAA/4AAA­AA/8AAAAAD/gAAAAH/wAAAAAP+AAAAA//AAAAAA/­///////8AAAAAD////////wAAAAAP////////AAA­AAA////////8AAAAAD////////wAAAAAP///////­/AAAAAA////////8AAAAAD////////wAAAAAP///­/////AAAAAA////////8AAAAAD////////wAAAAA­P////////AAAAAA////////8AAAAAD////////wA­AAAAP////////AAAAAA//AAAAAf8AAAAAD/4AAAA­A/wAAAAAP/gAAAAD/AAAAAA/8AAAAAP8AAAAAD/g­AAAAA/wAAAAAP8AAAAAB/AAAAAA/gAAAAAH8AAAA­AD+AAAAAAfwAAAAAHwAAAAAA8AAAAAAAAAAAAADA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAABgAAAAB8AAAAAAAPgAAAAPwAAAAAAB/AAAAB­/AAAAAAAP8AAAAP8AAAAAAB/wAAAB/wAAAAAAP+A­AAAH/AAAAAAA/4AAAA/8AAAAAAH/AAAAH/wAAAAA­A/8AAAA//AAAAAAH/gAAAH/8AAAAAA/+AAAAf/wA­AAAAD/4AAAD//AAAAAAf/AAAAf/8AAAAAB/8AAAD­//wAAAAAP/wAAAf//AAAAAA/+AAAD//8AAAAAD/4­AAAf//wAAAAAP/gAAB///AAAAAA/+AAAP//8AAAA­AD/4AAB///wAAAAAP/gAAP///AAAAAA//AAB///8­AAAAAD/8AAP///wAAAAAP/wAB////AAAAAA//gAf­///8AAAAAD//AD/9//wAAAAAP/+A//n//AAAAAA/­////8f/8AAAAAD/////h//wAAAAAH////+H//AAA­AAAf////wf/8AAAAAB////+B//wAAAAAH////wH/­/AAAAAAP///+Af/8AAAAAA////wB//wAAAAAD///­+AH//AAAAAAH///wAf/8AAAAAAf//+AB//wAAAAA­A///wAH//AAAAAAB//+AAf/8AAAAAAD//wAB//wA­AAAAAP/8AAH//AAAAAAAP/gAB//8AAAAAAAf4AA/­//wAAAAAAAAAAP///gAAAAAAAAAB///+AAAAAAAA­AAH///4AAAAAAAAAAP///gAAAAAAAAAA////AAAA­AAAAAAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAIAAAAAAAAAAAAAB4AAAAAAAADgAAA­P4AAAAAAAAP4AAA/gAAAAAAAA/gAAH+AAAAAAAAH­+AAA/wAAAAAAAAf4AAH/AAAAAAAAB/AAA/4AAAAA­AAAP8AAD/gAAAAAAAA/wAAf8AAAAAAAAH+AAD/wA­AAAAAAAf4AAf+AAAAAAAAB/gAD/4AAAAAAAAP8AA­P/gAAAAAAAA/wAA/+AAAAAAAAH/AAD/wAAAAAAAA­f4AAP/AAAHwAAAD/gAB/8AAA/gAAAP8AAD/4AAH+­AAAB/wAAP/gAA/8AAAH/AAA/+AAH/4AAA/4AAD/8­AA//gAAH/gAAP/4AP//AAAf8AAA//8H//+AAD/wA­AD//////8AAf+AAAP//////4AD/4AAAf//////wA­//AAAB///////9//8AAAH//////////gAAAP///8­/////+AAAA////j/////wAAAD///+H/////AAAAH­///wf////4AAAAf//+A/////AAAAA///wD////4A­AAAB//+AH////gAAAAD//wAf///8AAAAAH/+AA//­//gAAAAAP/gAB///8AAAAAAf8AAD///gAAAAAAOA­AAP//8AAAAAAAAAAAf//AAAAAAAAAAAAf/wAAAAA­AAAAAAA/8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAfAAAAAAAAA­AAAAH8AAAAAAAAAAAAA/wAAAAAAAAAAAAH/AAAAA­AAAAAAAA/8AAAAAAAAAAAAH/wAAAAAAAAAAAB//A­AAAAAAAAAAAP/8AAAAAAAAAAAB//wAAAAAAAAAAA­P//AAAAAAAAAAAB//8AAAAAAAAAAAf//wAAAAAAA­AAAD///AAAAAAAAAAAf//8AAAAAAAAAAD/9/wAAA­AAAAAAA//n/AAAAAAAAAAH/8f8AAAAAAAAAA//h/­wAAAAAAAAAH/4H/AAAAAAAAAA//Af8AAAAAAAAAP­/4B/wAAAAAAAAB//AH/AAAAAAAAAP/4Af8AAAAAA­AAB/+AB/wAAAAAAAAP/wAH/AAAAAAAAD/+AAf8AA­AAAAAAf/wAB/wAAAAAAAD/8AAH/AAAAAAAAf/gAA­f8AAAAAAAD/8AAB/wAAAAAAA//gAAH/AAAAAAAH/­8AAAf8AAAAAAA//AAAB/wAAAAAAH//////////+A­AAf//////////4AAB///////////gAAP////////­//8AAA///////////wAAD///////////AAAf////­//////4AAB///////////gAAP//////////+AAA/­//////////wAAD///////////AAAf//////////8­AAB///////////gAAH//////////+AAA////////­///wAAAAAAAAAH/AAAAAAAAAAAAAf8AAAAAAAAAA­AAB/wAAAAAAAAAAAAH/AAAAAAAAAAAAAf8AAAAAA­AAAAAAB/wAAAAAAAAAAAAH/AAAAAAAAAAAAAf8AA­AAAAAAAAAAB/wAAAAAAAAAAAAH/AAAAAAAAAAAAA­f8AAAAAAAAAAAAB+AAAAAAAAAAAAAHgAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AADwAAAAAAAAAAAAAfwAAAAAAfAAAAAB/gAAAAA/­+AAAAAH8AAAAB//4AAAAA/wAAAD///gAAAAD/AAA­H////AAAAAP4AAP////8AAAAB/gAD/////wAAAAH­+AAP/////gAAAA/wAA/////+AAAAD/AAD//g//4A­AAAP8AAP/+D//wAAAB/gAA//4H//AAAAH+AAD//g­f/+AAAA/4AAP/+B//4AAAD/AAA//4D//wAAAP8AA­D//gP//AAAB/wAAP/+A//+AAAH+AAA//4B//4AAA­/4AAD//gH//wAAH/AAAP/+AP//AAAf8AAA//4A//­+AAD/wAAD//gD//8AAf+AAAP/+AH//4AD/4AAA//­4Af//wAf/AAAD//gA///gH/8AAAP/+AD//////gA­AA//4AH/////+AAAD//gAf/////wAAAP/+AA////­//AAAA//4AD/////4AAAD//gAH/////AAAAP/+AA­f////8AAAD//4AA/////gAAA///gAB////8AAAf/­//AAH////gAAD///8AAP///+AAAP///wAAf///wA­AAf///AAA///+AAAB///+AAB///gAAAH///4AAD/­/8AAAAAAAAAAAD//AAAAAAAAAAAAB/gAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAB//8AAAAAAAAAAB///+AAAAAAAAAAf///­+AAAAAAAAAP////+AAAAAAAAD/////+AAAAAAAAf­/////8AAAAAAAH//////8AAAAAAA///////4AAAA­AAP///////wAAAAAB////////gAAAAAP///////+­AAAAAB////////8AAAAAP////////4AAAAB/////­////gAAAAP/////////AAAAB/////////8AAAAP/­//8Af///wAAAB///4AAD///gAAAP//8AAAB//+AA­AB///AAAAB//4AAAH//wAAAAD//wAAA//8AAAAAD­//AAAH//gAAAAAH/8AAA//4AAAAAAP/wAAD//AGA­AAAA//AAAf/4B4AAAAB/8AAD/+APwAAAAH/wAAP/­wD/AAAAAf/AAB/+AP+AAAAA/8AAP/wA/8AAAAD/g­AA/+AD/wAAAAP+AAH/4AP/gAAAA/4AAf/AA//AAA­AH/gAD/4AD/+AAAAf8AAf/AAP/8AAAB/wAB/4AAf­/8AAAP/AAP/AAB//8AAB/4AA/8AAH//8AAf/gAH/­gAAP///gf/8AAf8AAA///////wAD/gAAD//////+­AAP+AAAH//////4AB/wAAAf//////AAH+AAAA///­///4AA/4AAAB//////AAA/AAAAH/////8AAA4AAA­AP/////gAAAAAAAAf////8AAAAAAAAA/////gAAA­AAAAAB////8AAAAAAAAAD////AAAAAAAAAAH///4­AAAAAAAAAAH//+AAAAAAAAAAAH//gAAAAAAAAAAA­H/4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB///8A­AAAAAAAAAH///4AAAAAAAAAAP///gAAAAAAAAAA/­//+AAAAAAAAAAD///8AAAAAAAAAAP///gAAAAAAA­AAA///wAAAAAAAAAAB//8AAAAAAAAGAAH//AAAAA­AAAB8AAf/8AAAAAAAAPwAB//wAAAAAAAD/gAH//A­AAAAAAA/+AAf/8AAAAAAAP/8AB//wAAAAAAD//gA­H//AAAAAAA//4AAf/8AAAAAAP/+AAB//wAAAAAD/­/gAAH//AAAAAAf/8AAAf/8AAAAAH//AAAB//wAAA­AB//wAAAH//AAAAAf/8AAAAf/8AAAAH//AAAAB//­wAAAB//wAAAAH//AAAAf/8AAAAAf/8AAAD//AAAA­AB//wAAA//4AAAAAH//AAAP/+AAAAAAf/8AAD//g­AAAAAB//wAA//4AAAAAAH//AAP/+AAAAAAAf/8AD­//gAAAAAAB//wA//4AAAAAAAH//AH/+AAAAAAAAf­/8B//wAAAAAAAB//wf/8AAAAAAAAH//H//AAAAAA­AAAf/9//wAAAAAAAAB////8AAAAAAAAAH////AAA­AAAAAAAf///wAAAAAAAAAB///8AAAAAAAAAAH///­gAAAAAAAAAAf//4AAAAAAAAAAB//+AAAAAAAAAAA­H//gAAAAAAAAAAAf/4AAAAAAAAAAAB/+AAAAAAAA­AAAAH/gAAAAAAAAAAAAf4AAAAAAAAAAAAB/AAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAB/AAAAAAAAAAAAA//gAAAAAAAAA­AAH//gAAAAAAAAAAA///AAAAAACAAAAP//+AAAAA­D/wAAB///8AAAAA//wAAP///4AAAAH//wAA////w­AAAA///gAH////gAAAH///AA/////AAAA///+AH/­///8AAAH///8A/////4AAA////4D/////gAAH///­/wf/////AAA/////D/////8AAH////+f/////4AA­f////9//v///gAD///////AA//+AAf//////wAA/­/8AB//////+AAA//wAP//////wAAB//AA/+A///+­AAAD/8AH/wA///wAAAH/4Af8AB///AAAAP/gB/wA­B//+AAAA/+AP+AAD//4AAAB/4A/4AAP//wAAAH/g­D/gAAf//AAAAP+AP+AAA//+AAAA/4A/4AAB//8AA­AD/gD/gAAH//wAAAP+AP+AAAP//gAAA/4A/8AAAf­//AAAD/gD/wAAB//8AAAP+AP/wAAf//4AAA/4A//­gAH///wAAH/AD//gB////gAAf8AH////////AAD/­wAf///////+AAf+AB/////3//+AH/4AD////+P//­+B//AAP////w//////8AA////+B//////gAB////­wH/////+AAD///+AP/////wAAP///wAf////+AAA­f//+AB/////wAAA///wAD/////AAAB//+AAH////­4AAAD//gAAP////AAAAH/8AAA////4AAAAD/AAAB­////AAAAAAAAAAD///4AAAAAAAAAAD//+AAAAAAA­AAAAH//wAAAAAAAAAAAP/8AAAAAAAAAAAAP/AAAA­AAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/8AAAAAA­AAAAAA//+AAAAAAAAAAAP//8AAAAAAAAAAD///8A­AAAAAAAAAf///4AAAAAAAAAH////wAAAAAAAAA//­///gAAAAAAAAH/////AAAAAAAAA/////+AAAAYAA­AH/////8AAAD4AAA//////wAAAfwAAD//////gAA­B/gAAf//////AAAP+AAD//////8AAB/wAAP/////­/4AAH/AAB///////gAA/4AAH/+Af//+AAH/gAA//­AAH//8AAf8AAD/wAAD//wAD/wAAf+AAAD//AAf+A­AB/wAAAH/+AD/4AAH/AAAAP/4Af/AAA/8AAAAf/g­B/4AAD/gAAAA/+AP/gAAP+AAAAB/4B/8AAA/4AAA­AD/gP/wAAH/gAAAAP+B/+AAAf/AAAAAf4P/4AAB/­8AAAAB+B//AAAH/wAAAADgP/4AAAf/gAAAAMB//g­AAB/+AAAAAAP/8AAAH/8AAAAAD//gAAAf/4AAAAA­f/+AAAB//wAAAAH//wAAAD//wAAAB//+AAAAP//w­AAAf//wAAAA///4AAP//+AAAAB////Af///4AAAA­H/////////AAAAAf////////4AAAAA/////////A­AAAAD////////4AAAAAH////////AAAAAAP/////­//4AAAAAA////////AAAAAAB///////4AAAAAAD/­/////+AAAAAAAH//////wAAAAAAAP/////+AAAAA­AAAP/////gAAAAAAAAf////4AAAAAAAAAf///+AA­AAAAAAAAP///AAAAAAAAAAAH//AAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAH+AAAD/AAAAAAAA/8AAAf+AAAAAA­AH/4AAD/8AAAAAAA//wAAf/4AAAAAAH//gAD//wA­AAAAA//+AAf//AAAAAAD//4AB//8AAAAAAf//gAP­//wAAAAAB//+AA///AAAAAAH//4AD//8AAAAAAf/­/gAP//wAAAAAB//+AA///AAAAAAH//4AD//8AAAA­AAf//AAP//gAAAAAB//8AA//+AAAAAAD//gAB//w­AAAAAAH/8AAD/+AAAAAAAf/gAAP/wAAAAAAAf8AA­AP+AAAAAAAAfAAAAPgAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AA'),
        46,
        atob("HR9FLTkxQDdDOkNDHQ=="),
        88|65536
      );
    };
    
    { // must be inside our own scope here so that when we are unloaded everything disappears
      // we also define functions using 'let fn = function() {..}' for the same reason. function decls are global
    let drawTimeout;
    
    // Actually draw the watch face
    let draw = function() {
      var x = g.getWidth() / 2;
      var y = g.getHeight() / 2;
      g.reset().clearRect(Bangle.appRect); // clear whole background (w/o widgets)
    
      var date = new Date();
      var hour = date.getHours(); // Hour 
      if (hour > 12) {
        hour = hour % 12;
      }
      digit2 = hour % 10;
      digit1 = hour - digit2;
      if (digit1 > 0 ){ // draw hours
      g.setColor(g.theme.fg);
       g.setFontAlign(1, 0).setFont("InknutAntiqua66",1).drawStri­ng(hour, x-12, y);
      }
      else {
      g.setColor(g.theme.fg);
      g.setFontAlign(1, 0).setFont("InknutAntiqua88",1).drawStri­ng(hour, x-15, y);  
      }
    
      var minute = date.getMinutes(); //   minute
      digit2 = minute % 10;
      digit1 = Math.floor(minute / 10);
      minute = digit1.toString() + digit2.toString();
      g.setColor(g.blendColor(g.theme.bg,g.the­me.fg,0.5));
      g.setFontAlign(-1, 0).setFont("InknutAntiqua66",1).drawStri­ng(minute, x-12, y);
      // Show date and day of week
      var weekday = Math.abs(date.getDay() -1 % 7);
      var dateStr = date.getDate() ;
    
    g.setColor(g.theme.fg);
    g.fillRect(0, 175-15, 175, 175);
     for (var d=0; d< 7; d++){ 
       pos = d * 25;
         if (d < 5 ){
           g.setColor(g.theme.bg);
           g.fillRect(pos, 175-15, pos+22, 175);
         }else{                   g.setColor(g.blendColor(g.theme.bg,g.the­me.fg,0.25));
           g.fillRect(pos, 175-15, pos+22, 175);
         }
        
    
       g.setColor(g.theme.fg);
           g.setFontAlign(0, 0).setFont("InknutAntiqua24", 1).drawString(dateStr,  weekday*(176/7)+11, g.getHeight() - 15);
    
    var temp; 
    var mphaseq=-1; // moonphase 0-3
    var qday = -1; // day in week quater moon
    var moonssince; // full moons since full moon
    var lundaymo; // lunation day monda
    var tms = date.getTime()  //
    var weekdayms = weekday * 86400000 ;//seconds since monday
    var startd = tms - weekdayms; // monday
    var perc;// percent of cycle
      tms = startd - 1683308000000 ;//may5th 1734h 2023;
     moonssince = tms /2551442823.5;//div ms in a lunar month
    perc = moonssince - Math.floor(moonssince); 
        lundaymo = perc * 29.530588235;
        mphaseq =Math.round((lundaymo)/ 7.38264705875);
       
        qday = Math.round( 7.38264705875 - (lundaymo- (mphaseq* 7.38264705875))) % 7; // next quater phase day
      mphaseq = (mphaseq+1) % 4; // set to next quater phase
       
       
           g.setColor(0,0,0); // black moon bg
       var yoffset = (qday == weekday )*24;
    g.setFontAlign(0, 0).setFont("moonphases", 1).drawString(String.fromCharCode(48), qday*(176/7)+11, g.getHeight() - 26- yoffset);
        g.setColor(1,1,1); // moonshape
       g.setFontAlign(0, 0).setFont("moonphases", 1).drawString(String.fromCharCode(65+mph­aseq*26/4), qday*(176/7)+11, g.getHeight() - 26- yoffset);
    
     }
      // queue next draw
      if (drawTimeout) clearTimeout(drawTimeout);
      drawTimeout = setTimeout(function() {
        drawTimeout = undefined;
        draw();
      }, 60000 - (Date.now() % 60000));
    };
    
    // Show launcher when middle button pressed
    Bangle.setUI({
      mode : "clock",
      remove : function() {
        // Called to unload all of the clock app
        if (drawTimeout) clearTimeout(drawTimeout);
        drawTimeout = undefined;
        delete Graphics.prototype.setFontAnton;
      }});
    // Load widgets
    Bangle.loadWidgets();
    draw();
    setTimeout(Bangle.drawWidgets,0);
    }
    

    does not take the locale into account or DST, and full moon is all white.

  • I cleaned up the code and seperated it into 3 timers.
    One bateery status, one for calendar and one for clock.

    But I ran into a problem I cant solve
    Hour and minute are polled each minute, but only the minutes are written to screen
    if hour didnt change.

    However, the minutes on screen are only updated one additional time then
    it stops, and I dont see why
    Is from line 163 onwards, if someone could have a look at it.

    // Clock with date day and moon based on the "Anton Clock"
    
    //require("Font4x4").add(Graphics);
    
    
    Graphics.prototype.setFontmoonphases = function() {
      // Actual height 23 (23 - 1)
      return this.setFontCustom(
        atob('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEACAH/nAH­/nAAACAAAAAAAAAAAAAHwAAH4AAAAAAAAAAGAAAH­4AAHgAAAAAAAAAAAQgAAQhAAQ/AA/4AH8gAGQgAA­QjAAR/AA/4AH4gAEQgAAQgAAA4APg8APwMAY4EAQ­4EB///AQcEAQcMAcP8AeP4AADwAAAAAB4AAD8AAH­OAAECBAECDAGGGAH8cAD44AABgAAHAAAMAAAY+AB­z/ADDDAGCBAECBAADnAAB+AAA8AAAAAAAAAAB8AA­D+ADz/AH+DAGeBAEOBAEPBAELhAH5zADw6ABg+AA­EeAAF/AAHnAAGDAAEBAAABAAAAAAAAAH4AAHwAAA­AAAAAAAP/gA//4B8B8DgAOGAACEAADAAAAAAAAEA­ADGAACDgAOB8B8A//4AP/gAAAAAAAAAH4AA//AB/­/gD//wH//4P//8P//8f//+f//+f//+f//+f//+f/­/+f//+f//+P//8P//8H//4D//wB//gA//AAP8AAA­AAAAAAAAAAAH4AAf+AB//gD//wD//wH//4H//8P/­/8P//8P//8P//8P//8P//8P//8H//4H//4D//wB/­/gA//AAf+AADwAAAABAAAxAAA+AAA8AAAAAAAAAA­AAAABgAABgAABgAABgAABgAABgAAAAAAAAAAACAA­AHAAAHAAACAAAAAAAHAAA8AAHwAA+AADwAAHAAAA­AAAAAAAH4AA//AB//gD//wH//4P//8P//8f//+f/­/+f//+f//+f//+f//+f//+f//+P//8P//8H//4D/­/wB//gA//AAP8AAAAAAAAAAAAAABABADABACABAH­//AH//AAABAAABAAABAAAAAAAAAAAAAHAHAHAHAE­APAEAbAEAzAGBjAHPDAD+DAD8DAAADAAAAAAAAAD­APAHADAGABAEEBAEEBAEGBAGODAH7HAD7+AAh8AA­AAAAA4AAB4AAHYAAMYAAYYABwYADgYAH//AH//AA­AYAAAYAAAAAAAAAAAGAH8PAGEDAGEBAGEBAGEBAG­GDAGGDAGD+AAD8AAAQAAAAAA/4AB/+ADyPAGGDAE­EBAEEBAEGBAGHHAHD+AAB8AAAAAAAAAAAAAHgAAG­ABAGAHAGAeAGB4AGHgAGeAAH4AAHgAAEAAAAAAAB­x8AD7+AH/HAGOBAEEBAEEBAGODAH/HAD7+ABx8AA­AAAAAAAB8GAD+HAHvBAGDBAEBBAEBBAGBDAHjOAD­/8AB/4AAAAAAAAAAICAAcHAAcHAAICAAAAAAAAAA­AAAAABAHAzAHA+AHA8AAAAAAAAAAAAAAGAAAHAAA­NAAANgAAZgAAYwAAwwAAwYAAgYABgIABAMAAAAAA­AAAAAAABAMABgIAAgYAAwQAAQwAAYgAAJgAANgAA­PAAAHAAAGAAAAAAAAAAAAAAHAAAGAAAEAHAED3AE­CHAGGAAH8AAD8AAAwAAAAAAAAAAP8AA4HABgBgCA­AQEAAIMAAMIAAEYAAGQAACQAACQAACQAACQAACQA­ACYAAGIAAEMAAMGAAYDAAwBgBgA8PAAH4AAAAAAA­AAAH4AA//AB//gD//wH//4P//8P//8f//+f//+f/­/+f//+f//+f//+f//+f//+P//8P//8H//4D//wB/­/gA5nAAP8AAAAAAAAAAH4AA//AB//gD//wH//4P/­/8P//8f//+f//+f//+f//+f//+f//+f//+f//+P/­/8P//8F//oCf+QBjxgA4HAAP8AAAAAAAAAAH4AA/­/AB//gD//wH//4P//8P//8f//+f//+f//+f//+f/­/+f//+f//+f//+L//0N//sEf+ICAAQBgBgA4HAAP­8AAAAAAAAAAH4AA//AB//gD//wH//4P//8P//8f/­/+f//+f//+f//+f//+f//+f//+b//2J//kMP8MEA­AICAAQBgBgA4HAAP8AAAAAAAAAAH4AA//AB//gD/­/wH//4P//8P//8f//+f//+f//+f//+f//+f//+X/­/6Y//GIAAEMAAMEAAICAAQBgBgA4HAAP8AAAAAAA­AAAH4AA//AB//gD//wH//4P//8P//8f//+f//+f/­/+f//+f//+X//6QBgCYAAGIAAEMAAMEAAICAAQBg­BgA4HAAP8AAAAAAAAAAH4AA//AB//gD//wH//4P/­/8P//8f//+f//+f//+f//+QAACQAACQAACYAAGIA­AEMAAMEAAICAAQBgBgA4HAAP8AAAAAAAAAAH4AA/­/AB//gD//wH//4P//8P//8f//+f//+fAA+YAAGQA­ACQAACQAACYAAGIAAEMAAMEAAICAAQBgBgA4HAAP­8AAAAAAAAAAH4AA//AB//gD//wH//4P//8P//8f4­H+eAAeYAAGQAACQAACQAACQAACYAAGIAAEMAAMEA­AICAAQBgBgA4HAAP8AAAAAAAAAAH4AA//AB//gD/­/wH//4P//8PgB8eAAeYAAGQAACQAACQAACQAACQA­ACYAAGIAAEMAAMEAAICAAQBgBgA4HAAP8AAAAAAA­AAAH4AA//AB//gD//wH8P4PAA8OAAcYAAGYAAGQA­ACQAACQAACQAACQAACYAAGIAAEMAAMEAAICAAQBg­BgA4HAAP8AAAAAAAAAAH4AA//AB//gD4HwHAA4OA­AcMAAMYAAGYAAGQAACQAACQAACQAACQAACYAAGIA­AEMAAMEAAICAAQBgBgA4HAAP8AAAAAAAAAAH4AA/­/AB4HgDgBwGAAYMAAMIAAEYAAGQAACQAACQAACQA­ACQAACQAACYAAGIAAEMAAMEAAICAAQBgBgA4HAAP­8AAAAAAAAAAP8AA4HABgBgCAAQEAAIMAAMIAAEYA­AGQAACQAACQAACQAACQAACQAACYAAGIAAEMAAMGA­AYDgBwB4HgA//AAH4AAAAAAAAAAP8AA4HABgBgCA­AQEAAIMAAMIAAEYAAGQAACQAACQAACQAACQAACYA­AGYAAGMAAMOAAcHAA4D4HwB//gA//AAH4AAAAAAA­AAAP8AA4HABgBgCAAQEAAIMAAMIAAEYAAGQAACQA­ACQAACQAACQAACYAAGcAAOOAAcPAA8H8P4D//wB/­/gA//AAH4AAAAAAAAAAP8AA4HABgBgCAAQEAAIMA­AMIAAEYAAGQAACQAACQAACQAACYAAGYAAGeAAePg­B8P//8H//4D//wB//gA//AAH4AAAAAAAAAAP8AA4­HABgBgCAAQEAAIMAAMIAAEYAAGQAACQAACQAACQA­ACYAAGeAAef4H+P//8P//8H//4D//wB//gA//AAH­4AAAAAAAAAAP8AA4HABgBgCAAQEAAIMAAMIAAEYA­AGQAACQAACQAACYAAGfgB+f//+f//+P//8P//8H/­/4D//wB//gA//AAH4AAAAAAAAAAP8AA4HABgBgCA­AQEAAIMAAMIAAEYAAGQAACQAACQAACf//+f//+f/­/+f//+P//8P//8H//4D//wB//gA//AAH4AAAAAAA­AAAP8AA4HABgBgCAAQEAAIMAAMIAAEYAAGQH4CX/­/6f//+f//+f//+f//+f//+P//8P//8H//4D//wB/­/gA//AAH4AAAAAAAAAAP8AA4HABgBgCAAQEAAIMA­AMIAAEY//GX//6f//+f//+f//+f//+f//+f//+P/­/8P//8H//4D//wB//gA//AAH4AAAAAAAAAAP8AA4­HABgBgCAAQEAAIMf+MJ//kf//+f//+f//+f//+f/­/+f//+f//+f//+P//8P//8H//4D//wB//gA//AAH­4AAAAAAAAAAP8AA4HABgBgCAAQEf+IN//sL//0f/­/+f//+f//+f//+f//+f//+f//+f//+P//8P//8H/­/4D//wB//gA//AAH4AAAAAAAAAAP8AA4HABjxgCf­+QF//oP//8P//8f//+f//+f//+f//+f//+f//+f/­/+f//+P//8P//8H//4D//wB//gA//AAH4AAAAAAA­AAAH4AA8PAB//gD//wH//4P//8P//8f//+f//+f/­/+f//+f//+f//+f//+f//+P//8P//8H//4D//wB/­/gA//AAP8AAAAAAAAAAAAAD///D///CAADCAADCA­ABAAAAAHAAAB4AAAfAAAD4AAAeAAADAAAAAAAACA­ABCAADCAADD///D///AAAAAAAA'),
        32,
        atob("GAgKDAwUEwQICBgXBggGBxgMDAwMDAwMDA­wHBw4ADgsYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGB­gYGBgIBwg="),
        24|65536
      );
    }
    
    Graphics.prototype.setFontInknutAntiqua2­4 = function() {
      // Actual height 24 (23 - 0)
      return this.setFontCustom(
        atob('AAAAAB4AAD4AAD4AAD4AABwAAAAAAAAAAA­AAAAAPAAD/AA/4AP+AD/gAf4AAeAAAAAAAAAAAAY­AAB/AAD/gAH/wAP/4APH4AcB4AcA4AcA4AcA4AeA­4AfBwAf/wAP/gAH/AAD+AAA4AAAAAAAAAAIAYAcA­YAcA4Af/4Af/4Af/4Af/4AcAYAYAYAAAQAAAAACA­IAGAYAOA4AeB4AcD4AcH4AcP4Aef4Af94Af54APx­4APh4ADH4AAH8AAAAAAAAACAAAGAAYOAAYeAA4cC­AwcHBwefBwf/ngP//gPz/AHj+ACB8AAAwAAAAAAA­wAABwAAHwAAPwAAfwAA8wABwwADgwAPBwAP//wf/­/wf//wf//gAAwAAAwAAAwAAAAAAHAGD/AOH/AMHv­gMHngcHnwYHn44Hj/wHj/wfh/gfw/AAAeAAAAAAA­AAAAAAAB8AAP/AAf/gA//wB//4D8D4HwB4HsA4PO­A4ePA4cPh44H/w4H/gAD/AAB+AAAYAAAAAAAAA/g­AAfgAAeAAYeAB4eAHweAfAeB8AeHwAePAAe8AAf4­AAfgAAeAAAYAAAAAAAAAAAAAeADg/APx/gP7/gf/­/w/+Dw4+Bw4fBw4fBw8fhw//zwf3/gfj/gPD/AAB­+AAAYAAAAAAAAAA+AAD/AAH/gYH/wYP/w4OD5wcA­5wcAzgeAPgfAfAP/+AP/8AH/4AD/wAB/AAAAAAAA­AAAAAAHB4APj4APj4APj4APBwAAAAAAAAA'),
        46,
        atob("CAkTDBANEQ8SEBISCA=="),
        24|65536
      );
    };
    
    Graphics.prototype.setFontInknutAntiqua6­6 = function() {
      // Actual height 66 (65 - 0)
      return this.setFontCustom(
        atob('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAD8AAAAAAAAAH/AAAAAAAAAP/AAAAAAAAAf/g­AAAAAAAAf/gAAAAAAAA//wAAAAAAAA//wAAAAAAA­A//wAAAAAAAB//gAAAAAAAA//gAAAAAAAA//gAAA­AAAAA//AAAAAAAAAf+AAAAAAAAAP8AAAAAAAAAH4­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAA­fAAAAAAAAAH/AAAAAAAAB//AAAAAAAAf//AAAAAA­AH///AAAAAAB///8AAAAAA////AAAAAAP///wAAA­AAD///8AAAAAA////AAAAAAP///wAAAAAD///8AA­AAAA////AAAAAAf///gAAAAAH///4AAAAAAf//+A­AAAAAAf//gAAAAAAAf/4AAAAAAAAf+AAAAAAAAAf­gAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAB4AAAAAAAAAf/gAAAAAAAB/­/8AAAAAAAH//+AAAAAAAP///gAAAAAAf///wAAAA­AA////4AAAAAB////8AAAAAD////8AAAAAH////+­AAAAAP/////AAAAAP/////AAAAAf/////AAAAAf+­AH//gAAAA/wAA//gAAAA/gAAf/gAAAB/AAAH/gAA­AB/AAAD/wAAAD/AAAB/wAAAD+AAAB/wAAAD+AAAB­/wAAAD+AAAA/wAAAD+AAAA/wAAAD/AAAA/gAAAH/­AAAA/gAAAH/AAAA/gAAAD/gAAA/gAAAD/gAAB/AA­AAD/wAAB/AAAAD/8AAD/AAAAD//AAH+AAAAD//4A­/+AAAAB/////8AAAAB/////8AAAAA/////4AAAAA­/////wAAAAAf////gAAAAAP////gAAAAAP////AA­AAAAH///+AAAAAAB///4AAAAAAA///wAAAAAAAP/­/AAAAAAAAD/8AAAAAAAAAPAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAIAAAAAAAAAA4AAAAHgAAAD4A­AAAPgAAAD8AAAAfgAAAD8AAAAfgAAAD8AAAA/gAA­AD8AAAB/gAAAD+AAAD/gAAAD//////gAAAD/////­/gAAAD//////gAAAD//////gAAAD//////gAAAD/­/////gAAAD//////gAAAD//////gAAAD//////gA­AAD//////gAAAD//////gAAAD/gAAA/gAAAD/AAA­AfgAAAD+AAAAfgAAAD+AAAAfgAAAD8AAAAPgAAAD­4AAAAPgAAADwAAAAOAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAB4AAAHgAAAAD8AAAPgAAA­AD8AAAfgAAAAH4AAA/gAAAAP4AAB/gAAAAfwAAD/­gAAAA/wAAD/gAAAA/wAAH/gAAAB/gAAP/gAAAD/g­AAf/gAAAD/gAA//gAAAD/AAB//gAAAD/AAB//gAA­AD/AAD//gAAAD/AAH//gAAAD/AAP//gAAAD/gAf/­/gAAAD/gB///gAAAD/wD///gAAAD/8P/f/gAAAD/­//+f/gAAAD///+f/gAAAD///8f/gAAAB///4f/gA­AAB///wf/gAAAB///gf/gAAAA///Af/gAAAA//+A­f/gAAAAf/8Af/gAAAAf/4Af/gAAAAP/wAf/gAAAA­H/AA//gAAAAB8AH//gAAAAAAAP//wAAAAAAAP//w­AAAAAAAP//wAAAAAAAP//wAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAA­ADwAAAAAAcAAH4AAAAAAfAAH4AAAAAA/AAPwAAAA­AA/AAfwAAAAAA/AA/gAAAAAB+AB/gAAAAAB+AB/A­AAAAAD+AD/AAAAAAD8AH/AAAAAAH8AH+AAAAAAH4­AH+AAHgAAP4AH+AAPwAAP4AH/AAfwAAfwAH/AA/4­AAfwAH/gD/4AA/gAH/4P/8AB/gAH////+AD/AAD/­////AH/AAD/////wf+AAD///////+AAB///v///8­AAB///P///8AAA//+H///4AAA//8H///wAAAf/4D­///wAAAP/wB///gAAAP/gB///AAAAD+AA//+AAAA­A4AAf/8AAAAAAAAP/wAAAAAAAAH/AAAAAAAAAAwA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AA8AAAAAAAAAB8AAAAAAAAAH8AAAAAAAAAP8AAAA­AAAAAf8AAAAAAAAA/8AAAAAAAAB/8AAAAAAAAH/8­AAAAAAAAP/8AAAAAAAAf/8AAAAAAAA//8AAAAAAA­B/38AAAAAAAH/n8AAAAAAAP/H8AAAAAAAf+H8AAA­AAAA/4H8AAAAAAD/wH8AAAAAAH/gH8AAAAAAP/AH­8AAAAAAf8AH8AAAAAA/4AH8AAAAAD/wAH8AAAAAH­/gAH8AAAAAP/AAH8AAAAAf8AAH8AAAAA////////­8AA////////4AB////////4AB////////4AB////­////wAD////////wAD////////wAD////////gAH­////////gAH////////AAH////////AAAAAAAH8A­AAAAAAAAH8AAAAAAAAAH8AAAAAAAAAH8AAAAAAAA­AH8AAAAAAAAAH8AAAAAAAAAH8AAAAAAAAAH8AAAA­AAAAAH4AAAAAAAAAHAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAH4AAA­APgAAAH4AAAH/gAAAH4AAD//wAAAPwAB///wAAAP­wAf///wAAAPwA////4AAAfgA////4AAAfgA//D/8­AAAfgA//D/8AAA/AA//D/8AAA/AA//B/+AAB/AA/­/B/+AAB+AA//A//AAD+AA//A//AAD+AA//A//gAH­8AA//Af/wAP8AA//Af/wAP4AA//AP/4A/4AA//AP­/+D/wAA//AH////wAA//AH////gAA//AD////gAA­//AD////AAA//AB///+AAB//AB///+AAP//AA///­8AAf//gAf//4AAf//gAP//wAAf//gAH//gAAf//g­AD//AAAAAAAAB/8AAAAAAAAAPgAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAP/8AAAAAAAB///gA­AAAAAP///4AAAAAA////+AAAAAB/////AAAAAH//­///gAAAAP/////wAAAAf/////4AAAA//////8AAA­B//////8AAAD//////+AAAH//////+AAAP//4B//­/AAAf/+AAH//AAA//wAAB//AAB//AAAAf/AAD/+A­AAAP/gAD/4AAAAH/gAH/wMAAAD/gAP/geAAAD/gA­P+B+AAAB/gAf8B/AAAB/gA/4B/gAAB/AA/wB/gAA­B/AB/wB/wAAB/AB/gB/4AAD/AD/AB/+AAD+AH+AA­//gAP+AH8AA//8A/8AP8AA/////8AP4AAf////4A­fwAAf////4AfgAAP////wAfgAAH////gAPAAAH//­//AACAAAD///+AAAAAAB///8AAAAAAA///4AAAAA­AAf//wAAAAAAAH//AAAAAAAAB/8AAAAAAAAAGAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/­/4AAAAAAAH//4AAAAAAAD//8AAAAAAAD//8AAAAA­AAD//wAAAAAAAD//AAAAAACAD/8AAAAAAPAD/8AA­AAAA/AD/8AAAAAD/gD/8AAAAAP/gD/8AAAAA//AD­/8AAAAD/8AD/8AAAAP/wAD/8AAAAf/AAD/8AAAB/­8AAD/8AAAH/wAAD/8AAAf/AAAD/8AAB/+AAAD/8A­AH/4AAAD/8AAf/gAAAD/8AB/+AAAAD/8AD/4AAAA­D/8AP/gAAAAD/8A/+AAAAAD/8D/4AAAAAD/8P/gA­AAAAD/8//AAAAAAD///8AAAAAAD///wAAAAAAD//­/AAAAAAAD//8AAAAAAAD//wAAAAAAAD//AAAAAAA­AD/8AAAAAAAAD/wAAAAAAAAD/gAAAAAAAAD+AAAA­AAAAABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAA/AAAAAAAAAD/w­AAAAAAAAH/8AAAAAAAAf/+AAAAf4AA///AAAB/+A­B///gAAD//AB///wAAH//gD///4AAf//wH///4AA­f//4P///8AA///8P///8AB///+f///+AD///+///­/+AD/////gD/+AH////+AA//AP////8AAP/AP+D/­/4AAH/AP4A//wAAD/AfwAf/4AAD/AfwAP/8AAB/g­fgAH/8AAB/gfgAD/+AAA/g/gAD/+AAA/g/wAB//A­AA/gfwAA//gAA/gf4AA//wAA/gf8AD//wAB/Af/A­P//4AB/Af/////8AD/Af//////AH+AP///z//gf+­AP///j////8AH///B////4AH//+B////4AD//8A/­///wAB//4Af///gAA//wAf///AAAf/AAP///AAAP­8AAH//+AAAAgAAD//4AAAAAAAB//wAAAAAAAAf/g­AAAAAAAAP+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf+AAA­AAAAAD//gAAAAAAAH//4AAAAAAAf//8AAAAAAA//­/+AAAAAAB////AAAAAAD////gAAMAAH////gAAfA­AP////wAA/gAP////4AA/AAf////4AB/AAf////8­AD+AA/+A//8AD+AA/wAH/8AH8AB/gAB/+AP8AB/A­AAf+Af4AD/AAAP+Af4AD+AAAH+A/wAD+AAAH+B/w­AD+AAAD+D/gAD+AAAB+H/AAD/AAAB4P/AAH/AAAA­wf+AAD/gAAAA/8AAD/wAAAD/8AAD/4AAAH/4AAD/­8AAAf/wAAD//AAD//gAAD//8Af//gAAB///////A­AAB//////+AAAA//////8AAAA//////4AAAAf///­//wAAAAP/////gAAAAH/////AAAAAD////8AAAAA­B////4AAAAAAf///gAAAAAAH//+AAAAAAAB//wAA­AAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAB8AAB8AAAAAD/AAH+AAAAAP/gAP/­AAAAAP/gAf/gAAAAf/wAf/gAAAA//wA//wAAAA//­wA//wAAAA//wA//wAAAA//wA//gAAAA//gA//gAA­AA//gA//gAAAA//AA//AAAAAf/AAf+AAAAAP+AAP­8AAAAAH4AAH4AAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAA=='),
        46,
        atob("FhczISslMCkyKzMyFg=="),
        66|65536
      );
    };
    
    Graphics.prototype.setFontInknutAntiqua8­8 = function() {
      // Actual height 88 (87 - 0)
      return this.setFontCustom(
        atob('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD4AAAAAA­AAAAAAA/4AAAAAAAAAAAAH/wAAAAAAAAAAAA//gA­AAAAAAAAAAH//AAAAAAAAAAAA//+AAAAAAAAAAAD­//4AAAAAAAAAAAf//gAAAAAAAAAAB//+AAAAAAAA­AAAH//4AAAAAAAAAAAf//gAAAAAAAAAAB//+AAAA­AAAAAAAH//4AAAAAAAAAAAf//AAAAAAAAAAAB//8­AAAAAAAAAAAH//gAAAAAAAAAAAP/8AAAAAAAAAAA­Af/gAAAAAAAAAAAA/8AAAAAAAAAAAAB/gAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAPAAAAAAAAAAAAAP8AAAAAAAAAAAAP/w­AAAAAAAAAAAf//AAAAAAAAAAAf//8AAAAAAAAAAf­///wAAAAAAAAAf////AAAAAAAAAf////wAAAAAAA­Af////wAAAAAAAAf////gAAAAAAAAf////gAAAAA­AAAf////gAAAAAAAA/////gAAAAAAAA/////gAAA­AAAAA/////gAAAAAAAA/////gAAAAAAAA/////gA­AAAAAAA/////gAAAAAAAA/////gAAAAAAAA/////­gAAAAAAAA/////gAAAAAAAAP////gAAAAAAAAA//­//AAAAAAAAAAD///AAAAAAAAAAAH//AAAAAAAAAA­AAf/AAAAAAAAAAAAB/AAAAAAAAAAAAAHAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8AAAAAAAAA­AAAB//wAAAAAAAAAAAf//wAAAAAAAAAAH///wAAA­AAAAAAB////wAAAAAAAAAP////gAAAAAAAAB////­/gAAAAAAAAP/////AAAAAAAAB/////+AAAAAAAAP­/////4AAAAAAAB//////wAAAAAAAP//////gAAAA­AAB///////AAAAAAAP//////8AAAAAAA///////4­AAAAAAH///////gAAAAAAf//////+AAAAAAD//AB­///8AAAAAAf/gAAf//wAAAAAB/8AAAf//AAAAAAH­/gAAAf/+AAAAAA/8AAAAf/4AAAAAD/gAAAA//gAA­AAAf+AAAAD/+AAAAAB/wAAAAH/4AAAAAH/AAAAAP­/gAAAAAf8AAAAA/+AAAAAD/wAAAAD/4AAAAAP/AA­AAAH/gAAAAA/8AAAAAf+AAAAAD/wAAAAB/4AAAAA­P/AAAAAH/gAAAAA/+AAAAAf+AAAAAD/4AAAAB/wA­AAAAP/gAAAAH/AAAAAA//AAAAAf8AAAAAD/+AAAA­D/gAAAAAP/8AAAAP+AAAAAA//4AAAB/4AAAAAD//­wAAAP/AAAAAAH//wAAB/8AAAAAAf//4AAf/gAAAA­AB////A//+AAAAAAD///////wAAAAAAP///////A­AAAAAAf//////4AAAAAAB///////AAAAAAAD////­//8AAAAAAAP//////gAAAAAAAf/////8AAAAAAAA­//////gAAAAAAAB/////8AAAAAAAAD/////gAAAA­AAAAH////8AAAAAAAAAP////gAAAAAAAAAP///4A­AAAAAAAAAf//+AAAAAAAAAAAf//gAAAAAAAAAAAH­/4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAYAAAAAAAAAAAAAHgAAAAAB8AAAA­AB+AAAAAAPwAAAAAP8AAAAAB/AAAAAA/wAAAAAP8­AAAAAD/AAAAAA/wAAAAAP8AAAAAH/AAAAAA/4AAA­AA/8AAAAAD/gAAAAH/wAAAAAP+AAAAA//AAAAAA/­///////8AAAAAD////////wAAAAAP////////AAA­AAA////////8AAAAAD////////wAAAAAP///////­/AAAAAA////////8AAAAAD////////wAAAAAP///­/////AAAAAA////////8AAAAAD////////wAAAAA­P////////AAAAAA////////8AAAAAD////////wA­AAAAP////////AAAAAA//AAAAAf8AAAAAD/4AAAA­A/wAAAAAP/gAAAAD/AAAAAA/8AAAAAP8AAAAAD/g­AAAAA/wAAAAAP8AAAAAB/AAAAAA/gAAAAAH8AAAA­AD+AAAAAAfwAAAAAHwAAAAAA8AAAAAAAAAAAAADA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAABgAAAAB8AAAAAAAPgAAAAPwAAAAAAB/AAAAB­/AAAAAAAP8AAAAP8AAAAAAB/wAAAB/wAAAAAAP+A­AAAH/AAAAAAA/4AAAA/8AAAAAAH/AAAAH/wAAAAA­A/8AAAA//AAAAAAH/gAAAH/8AAAAAA/+AAAAf/wA­AAAAD/4AAAD//AAAAAAf/AAAAf/8AAAAAB/8AAAD­//wAAAAAP/wAAAf//AAAAAA/+AAAD//8AAAAAD/4­AAAf//wAAAAAP/gAAB///AAAAAA/+AAAP//8AAAA­AD/4AAB///wAAAAAP/gAAP///AAAAAA//AAB///8­AAAAAD/8AAP///wAAAAAP/wAB////AAAAAA//gAf­///8AAAAAD//AD/9//wAAAAAP/+A//n//AAAAAA/­////8f/8AAAAAD/////h//wAAAAAH////+H//AAA­AAAf////wf/8AAAAAB////+B//wAAAAAH////wH/­/AAAAAAP///+Af/8AAAAAA////wB//wAAAAAD///­+AH//AAAAAAH///wAf/8AAAAAAf//+AB//wAAAAA­A///wAH//AAAAAAB//+AAf/8AAAAAAD//wAB//wA­AAAAAP/8AAH//AAAAAAAP/gAB//8AAAAAAAf4AA/­//wAAAAAAAAAAP///gAAAAAAAAAB///+AAAAAAAA­AAH///4AAAAAAAAAAP///gAAAAAAAAAA////AAAA­AAAAAAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAIAAAAAAAAAAAAAB4AAAAAAAADgAAA­P4AAAAAAAAP4AAA/gAAAAAAAA/gAAH+AAAAAAAAH­+AAA/wAAAAAAAAf4AAH/AAAAAAAAB/AAA/4AAAAA­AAAP8AAD/gAAAAAAAA/wAAf8AAAAAAAAH+AAD/wA­AAAAAAAf4AAf+AAAAAAAAB/gAD/4AAAAAAAAP8AA­P/gAAAAAAAA/wAA/+AAAAAAAAH/AAD/wAAAAAAAA­f4AAP/AAAHwAAAD/gAB/8AAA/gAAAP8AAD/4AAH+­AAAB/wAAP/gAA/8AAAH/AAA/+AAH/4AAA/4AAD/8­AA//gAAH/gAAP/4AP//AAAf8AAA//8H//+AAD/wA­AD//////8AAf+AAAP//////4AD/4AAAf//////wA­//AAAB///////9//8AAAH//////////gAAAP///8­/////+AAAA////j/////wAAAD///+H/////AAAAH­///wf////4AAAAf//+A/////AAAAA///wD////4A­AAAB//+AH////gAAAAD//wAf///8AAAAAH/+AA//­//gAAAAAP/gAB///8AAAAAAf8AAD///gAAAAAAOA­AAP//8AAAAAAAAAAAf//AAAAAAAAAAAAf/wAAAAA­AAAAAAA/8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAfAAAAAAAAA­AAAAH8AAAAAAAAAAAAA/wAAAAAAAAAAAAH/AAAAA­AAAAAAAA/8AAAAAAAAAAAAH/wAAAAAAAAAAAB//A­AAAAAAAAAAAP/8AAAAAAAAAAAB//wAAAAAAAAAAA­P//AAAAAAAAAAAB//8AAAAAAAAAAAf//wAAAAAAA­AAAD///AAAAAAAAAAAf//8AAAAAAAAAAD/9/wAAA­AAAAAAA//n/AAAAAAAAAAH/8f8AAAAAAAAAA//h/­wAAAAAAAAAH/4H/AAAAAAAAAA//Af8AAAAAAAAAP­/4B/wAAAAAAAAB//AH/AAAAAAAAAP/4Af8AAAAAA­AAB/+AB/wAAAAAAAAP/wAH/AAAAAAAAD/+AAf8AA­AAAAAAf/wAB/wAAAAAAAD/8AAH/AAAAAAAAf/gAA­f8AAAAAAAD/8AAB/wAAAAAAA//gAAH/AAAAAAAH/­8AAAf8AAAAAAA//AAAB/wAAAAAAH//////////+A­AAf//////////4AAB///////////gAAP////////­//8AAA///////////wAAD///////////AAAf////­//////4AAB///////////gAAP//////////+AAA/­//////////wAAD///////////AAAf//////////8­AAB///////////gAAH//////////+AAA////////­///wAAAAAAAAAH/AAAAAAAAAAAAAf8AAAAAAAAAA­AAB/wAAAAAAAAAAAAH/AAAAAAAAAAAAAf8AAAAAA­AAAAAAB/wAAAAAAAAAAAAH/AAAAAAAAAAAAAf8AA­AAAAAAAAAAB/wAAAAAAAAAAAAH/AAAAAAAAAAAAA­f8AAAAAAAAAAAAB+AAAAAAAAAAAAAHgAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AADwAAAAAAAAAAAAAfwAAAAAAfAAAAAB/gAAAAA/­+AAAAAH8AAAAB//4AAAAA/wAAAD///gAAAAD/AAA­H////AAAAAP4AAP////8AAAAB/gAD/////wAAAAH­+AAP/////gAAAA/wAA/////+AAAAD/AAD//g//4A­AAAP8AAP/+D//wAAAB/gAA//4H//AAAAH+AAD//g­f/+AAAA/4AAP/+B//4AAAD/AAA//4D//wAAAP8AA­D//gP//AAAB/wAAP/+A//+AAAH+AAA//4B//4AAA­/4AAD//gH//wAAH/AAAP/+AP//AAAf8AAA//4A//­+AAD/wAAD//gD//8AAf+AAAP/+AH//4AD/4AAA//­4Af//wAf/AAAD//gA///gH/8AAAP/+AD//////gA­AA//4AH/////+AAAD//gAf/////wAAAP/+AA////­//AAAA//4AD/////4AAAD//gAH/////AAAAP/+AA­f////8AAAD//4AA/////gAAA///gAB////8AAAf/­//AAH////gAAD///8AAP///+AAAP///wAAf///wA­AAf///AAA///+AAAB///+AAB///gAAAH///4AAD/­/8AAAAAAAAAAAD//AAAAAAAAAAAAB/gAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAB//8AAAAAAAAAAB///+AAAAAAAAAAf///­+AAAAAAAAAP////+AAAAAAAAD/////+AAAAAAAAf­/////8AAAAAAAH//////8AAAAAAA///////4AAAA­AAP///////wAAAAAB////////gAAAAAP///////+­AAAAAB////////8AAAAAP////////4AAAAB/////­////gAAAAP/////////AAAAB/////////8AAAAP/­//8Af///wAAAB///4AAD///gAAAP//8AAAB//+AA­AB///AAAAB//4AAAH//wAAAAD//wAAA//8AAAAAD­//AAAH//gAAAAAH/8AAA//4AAAAAAP/wAAD//AGA­AAAA//AAAf/4B4AAAAB/8AAD/+APwAAAAH/wAAP/­wD/AAAAAf/AAB/+AP+AAAAA/8AAP/wA/8AAAAD/g­AA/+AD/wAAAAP+AAH/4AP/gAAAA/4AAf/AA//AAA­AH/gAD/4AD/+AAAAf8AAf/AAP/8AAAB/wAB/4AAf­/8AAAP/AAP/AAB//8AAB/4AA/8AAH//8AAf/gAH/­gAAP///gf/8AAf8AAA///////wAD/gAAD//////+­AAP+AAAH//////4AB/wAAAf//////AAH+AAAA///­///4AA/4AAAB//////AAA/AAAAH/////8AAA4AAA­AP/////gAAAAAAAAf////8AAAAAAAAA/////gAAA­AAAAAB////8AAAAAAAAAD////AAAAAAAAAAH///4­AAAAAAAAAAH//+AAAAAAAAAAAH//gAAAAAAAAAAA­H/4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB///8A­AAAAAAAAAH///4AAAAAAAAAAP///gAAAAAAAAAA/­//+AAAAAAAAAAD///8AAAAAAAAAAP///gAAAAAAA­AAA///wAAAAAAAAAAB//8AAAAAAAAGAAH//AAAAA­AAAB8AAf/8AAAAAAAAPwAB//wAAAAAAAD/gAH//A­AAAAAAA/+AAf/8AAAAAAAP/8AB//wAAAAAAD//gA­H//AAAAAAA//4AAf/8AAAAAAP/+AAB//wAAAAAD/­/gAAH//AAAAAAf/8AAAf/8AAAAAH//AAAB//wAAA­AB//wAAAH//AAAAAf/8AAAAf/8AAAAH//AAAAB//­wAAAB//wAAAAH//AAAAf/8AAAAAf/8AAAD//AAAA­AB//wAAA//4AAAAAH//AAAP/+AAAAAAf/8AAD//g­AAAAAB//wAA//4AAAAAAH//AAP/+AAAAAAAf/8AD­//gAAAAAAB//wA//4AAAAAAAH//AH/+AAAAAAAAf­/8B//wAAAAAAAB//wf/8AAAAAAAAH//H//AAAAAA­AAAf/9//wAAAAAAAAB////8AAAAAAAAAH////AAA­AAAAAAAf///wAAAAAAAAAB///8AAAAAAAAAAH///­gAAAAAAAAAAf//4AAAAAAAAAAB//+AAAAAAAAAAA­H//gAAAAAAAAAAAf/4AAAAAAAAAAAB/+AAAAAAAA­AAAAH/gAAAAAAAAAAAAf4AAAAAAAAAAAAB/AAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAB/AAAAAAAAAAAAA//gAAAAAAAAA­AAH//gAAAAAAAAAAA///AAAAAACAAAAP//+AAAAA­D/wAAB///8AAAAA//wAAP///4AAAAH//wAA////w­AAAA///gAH////gAAAH///AA/////AAAA///+AH/­///8AAAH///8A/////4AAA////4D/////gAAH///­/wf/////AAA/////D/////8AAH////+f/////4AA­f////9//v///gAD///////AA//+AAf//////wAA/­/8AB//////+AAA//wAP//////wAAB//AA/+A///+­AAAD/8AH/wA///wAAAH/4Af8AB///AAAAP/gB/wA­B//+AAAA/+AP+AAD//4AAAB/4A/4AAP//wAAAH/g­D/gAAf//AAAAP+AP+AAA//+AAAA/4A/4AAB//8AA­AD/gD/gAAH//wAAAP+AP+AAAP//gAAA/4A/8AAAf­//AAAD/gD/wAAB//8AAAP+AP/wAAf//4AAA/4A//­gAH///wAAH/AD//gB////gAAf8AH////////AAD/­wAf///////+AAf+AB/////3//+AH/4AD////+P//­+B//AAP////w//////8AA////+B//////gAB////­wH/////+AAD///+AP/////wAAP///wAf////+AAA­f//+AB/////wAAA///wAD/////AAAB//+AAH////­4AAAD//gAAP////AAAAH/8AAA////4AAAAD/AAAB­////AAAAAAAAAAD///4AAAAAAAAAAD//+AAAAAAA­AAAAH//wAAAAAAAAAAAP/8AAAAAAAAAAAAP/AAAA­AAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/8AAAAAA­AAAAAA//+AAAAAAAAAAAP//8AAAAAAAAAAD///8A­AAAAAAAAAf///4AAAAAAAAAH////wAAAAAAAAA//­///gAAAAAAAAH/////AAAAAAAAA/////+AAAAYAA­AH/////8AAAD4AAA//////wAAAfwAAD//////gAA­B/gAAf//////AAAP+AAD//////8AAB/wAAP/////­/4AAH/AAB///////gAA/4AAH/+Af//+AAH/gAA//­AAH//8AAf8AAD/wAAD//wAD/wAAf+AAAD//AAf+A­AB/wAAAH/+AD/4AAH/AAAAP/4Af/AAA/8AAAAf/g­B/4AAD/gAAAA/+AP/gAAP+AAAAB/4B/8AAA/4AAA­AD/gP/wAAH/gAAAAP+B/+AAAf/AAAAAf4P/4AAB/­8AAAAB+B//AAAH/wAAAADgP/4AAAf/gAAAAMB//g­AAB/+AAAAAAP/8AAAH/8AAAAAD//gAAAf/4AAAAA­f/+AAAB//wAAAAH//wAAAD//wAAAB//+AAAAP//w­AAAf//wAAAA///4AAP//+AAAAB////Af///4AAAA­H/////////AAAAAf////////4AAAAA/////////A­AAAAD////////4AAAAAH////////AAAAAAP/////­//4AAAAAA////////AAAAAAB///////4AAAAAAD/­/////+AAAAAAAH//////wAAAAAAAP/////+AAAAA­AAAP/////gAAAAAAAAf////4AAAAAAAAAf///+AA­AAAAAAAAP///AAAAAAAAAAAH//AAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAH+AAAD/AAAAAAAA/8AAAf+AAAAAA­AH/4AAD/8AAAAAAA//wAAf/4AAAAAAH//gAD//wA­AAAAA//+AAf//AAAAAAD//4AB//8AAAAAAf//gAP­//wAAAAAB//+AA///AAAAAAH//4AD//8AAAAAAf/­/gAP//wAAAAAB//+AA///AAAAAAH//4AD//8AAAA­AAf//AAP//gAAAAAB//8AA//+AAAAAAD//gAB//w­AAAAAAH/8AAD/+AAAAAAAf/gAAP/wAAAAAAAf8AA­AP+AAAAAAAAfAAAAPgAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AA'),
        46,
        atob("HR9FLTkxQDdDOkNDHQ=="),
        88|65536
      );
    };
    
    { // must be inside our own scope here so that when we are unloaded everything disappears
      // we also define functions using 'let fn = function() {..}' for the same reason. function decls are global
      
    let drawStatusTimeout;
      
    let drawStatus = function(){
      
    g.clearRect(0,20,175,20);
    g.setColor(g.theme.fg); // draw battery 
    g.drawLine(0,2,E.getBattery()*1.75,2);
      // draw line for 24 h clock
      var x = g.getWidth() / 2;
      var y = g.getHeight() / 2;
      var ix;
      var shade;
      var w ;
      var date = new Date();
      for ( ix = 0; ix < 176; ix++){
        shade = 2*Math.PI * ((date.getHours()-6)/24);
        shade = Math.sin(2*Math.PI* ix/176 + shade );
        if ( shade > 0 ){
        shade = 1-Math.sqrt(1-(shade * 0.5 + 0.5));
        }else{
        shade = Math.sqrt((shade * 0.5 + 0.5));
        }
        //shade = 1- shade ;
     g.setColor(shade,shade,shade);
     g.setPixel(ix,18);
      }
    g.setColor(g.theme.fg); // draw dots at noon / midnight
    ix = x-(((date.getHours())%12)/24)*176;
    g.drawLine(ix,16,ix+2,18);
    g.drawLine(ix+2,18,ix, 20);
    g.drawLine(ix,20,ix-2,18);
    g.drawLine(ix-2,18,ix,16);
      
    ix = ix + 176/2;
    g.drawLine(ix,16,ix+2,18);
    g.drawLine(ix+2,18,ix, 20);
    g.drawLine(ix,20,ix-2,18);
    g.drawLine(ix-2,18,ix,16);
      
      
    };//------------------<< status
      
      
      
    let drawWeekTimeout;
      
    let drawWeek = function() {
      //  date and day of week, moonphase, next quater moon
      var date = new Date();
      var weekday = Math.abs(date.getDay() -1 % 7);
      var dateStr = date.getDate() ;
      
      g.reset().clearRect(0,175-36,175,175-36)­;
      g.setColor(g.theme.fg);
      g.fillRect(0, 175-15, 175, 175);
      var pos;
      var d;
     for ( d=0; d< 7; d++){ 
        pos = d * 25;
         if (d < 5 ){
           g.setColor(g.theme.bg);
           g.fillRect(pos, 175-15, pos+22, 175);
         }else{                           g.setColor(g.blendColor(g.theme.bg,g.the­me.fg,0.25));
           g.fillRect(pos, 175-15, pos+22, 175);
         }
        
     }
    g.setColor(g.theme.fg);
    g.setFontAlign(0, 0).setFont("InknutAntiqua24", 1).drawString(dateStr,  weekday*(176/7)+11, g.getHeight() - 15);
    
    var mphaseq=-1; // moonphase 0-3
    var qday = -1; // day in week quater moon
    var moonssince; // full moons since full moon
    var lundaymo; // lunation day monda
    var tms = date.getTime();//
    var weekdayms = weekday * 86400000 ;//seconds since monday
    var startd = tms - weekdayms; // monday
    var perc;// percent of cycle
    tms = startd - 1683308000000 ;//may5th 1734h 2023;
    moonssince = tms /2551442823.5;//div ms in a lunar month
    perc = moonssince - Math.floor(moonssince); 
    lundaymo = perc * 29.530588235;
    mphaseq =Math.round((lundaymo)/ 7.38264705875);
       
    qday = Math.round( 7.38264705875 - (lundaymo- (mphaseq* 7.38264705875))) % 7; // next quater phase day
    mphaseq = (mphaseq+1) % 4; // set to next quater phase
      
    
    g.setColor(0,0,0); // black moon bg
    var yoffset = (qday == weekday )*24;
    g.setFontAlign(0, 0).setFont("moonphases", 1).drawString(String.fromCharCode(48), qday*(176/7)+11, g.getHeight() - 22- yoffset);
    g.setColor(1,1,1); // moonshape
       //g.setFontAlign(0, 0).setFont("moonphases", 1).drawString(String.fromCharCode(65+mph­aseq*26/4), qday*(176/7)+11, g.getHeight() - 26- yoffset); // next moon or :
    g.setFontAlign(0, 0).setFont("moonphases", 1).drawString(String.fromCharCode(65+per­c*26), qday*(176/7)+11, g.getHeight() - 22- yoffset);
    
    
    };//-------------------<< week
      
    let drawTimeout;
    
    //  draw  clock
    let draw = function() {
      var x = g.getWidth() / 2;
      var y = g.getHeight() / 2;
      var xoffset =0;
      var minute;
      var hour;
      var hour_old;
      var date;
      var digit1;
      var digit2;
      
      g.reset().clearRect(0,25,175,175-36); // clear area
    
      date = new Date();
      hour_old = hour;
      hour = date.getHours(); // hour 
      if (hour_old != hour){ // only draw if hour has changed
      if (hour > 12) {
        hour = hour % 12;
      }
      digit2 = hour % 10;
      digit1 = hour - digit2;
      if (digit1 > 0 ){ // draw hours, one or two digits
      xoffset = -10;
      g.setColor(g.theme.fg);
       g.setFontAlign(1, 0).setFont("InknutAntiqua66",1).drawStri­ng(hour, x+xoffset, y);
      }
      else {
        xoffset = -15;
      g.setColor(g.theme.fg);
      g.setFontAlign(1, 0).setFont("InknutAntiqua88",1).drawStri­ng(hour, x+xoffset, y);  
      }
      }
       minute = date.getMinutes(); //   minutes
      digit2 = minute % 10;
      digit1 = Math.floor(minute / 10);
      minute = digit1.toString() + digit2.toString();
      
        g.setColor(g.blendColor(g.theme.bg,g.the­me.fg,0.5));
      g.setFontAlign(-1, 0).setFont("InknutAntiqua66",1).drawStri­ng(minute, x+xoffset , y);
     
    };//-----------------------<< clock  
      
            // queue next drawStatus
      if (drawStatusTimeout) clearTimeout(drawStatusTimeout);
      drawStatusTimeout = setTimeout(function() {
        drawStatusTimeout = undefined;
        drawStatus();
        //draw();
        //drawWeek();    
      }, 30*60000 - (Date.now() % 30*60000));
    
          // queue next drawWeek
      if (drawWeekTimeout) clearTimeout(drawWeekTimeout);
      drawWeekTimeout = setTimeout(function() {
        drawWeekTimeout = undefined;
        draw();
        drawWeek();
      }, 180*60000 - (Date.now() % 180*60000)); 
      
          // queue next draw
      if (drawTimeout) clearTimeout(drawTimeout);
      drawTimeout = setTimeout(function() {
        drawTimeout = undefined;
        draw();
      }, 60000 - (Date.now() % 60000));
      
    //-------------------<< 
      
    
    
    // Show launcher when middle button pressed
    Bangle.setUI({
      mode : "clock",
      remove : function() {
        // Called to unload all of the clock app
        if (drawStatusTimeout) clearTimeout(drawStatusTimeout);
        drawStatusTimeout = undefined;
        if (drawTimeout) clearTimeout(drawTimeout);
        drawTimeout = undefined;
        if (drawWeekTimeout) clearTimeout(drawWeekTimeout);
        drawWeekTimeout = undefined;
        //delete Graphics.prototype.setFontAnton;
        delete Graphics.prototype.setFontmoonphases;
        delete Graphics.prototype.setFontInknutAntiqua2­4;
        delete Graphics.prototype.setFontInknutAntiqua6­6d;
        delete Graphics.prototype.setFontInknutAntiqua8­8;
        
        
      }});
    // Load widgets
    //Bangle.loadWidgets();
    g.reset().clearRect(0,0,g.getWidth(),g.g­etHeight());
    draw();
    drawWeek();
    drawStatus();
    //
    //setTimeout(Bangle.drawWidgets,0);
    }
    
  • Hi - I just tried this and it looks neat.

    One thing I can see is you call drawTimeout = setTimeout(function() { once at startup, which will ask it to redraw when the minute changes.

    But after that you don't call it again. I think you really need to copy:

      drawTimeout = setTimeout(function() {
        drawTimeout = undefined;
        draw();
      }, 60000 - (Date.now() % 60000));
    

    and paste it into the end of the draw() function and you'll probably be ok then?

  • Thanks, it works now.
    I still get the widets to draw though, although I ve commented it out.
    May because I had started another clock in the meantime and the clock isnt properly installed as clock yet.

    Will take me a while to finish it, it seems I maybe have to recreate the Moon icons since the license of the font is a bit fuzzy and I cant reach its author.

    In case someone wants to try heres the code

    // Clock with date day and moon based on the "Anton Clock"
    
    //require("Font4x4").add(Graphics);
    
    
    Graphics.prototype.setFontmoonphases = function() {
      // Actual height 23 (23 - 1)
      return this.setFontCustom(
        atob('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEACAH/nAH­/nAAACAAAAAAAAAAAAAHwAAH4AAAAAAAAAAGAAAH­4AAHgAAAAAAAAAAAQgAAQhAAQ/AA/4AH8gAGQgAA­QjAAR/AA/4AH4gAEQgAAQgAAA4APg8APwMAY4EAQ­4EB///AQcEAQcMAcP8AeP4AADwAAAAAB4AAD8AAH­OAAECBAECDAGGGAH8cAD44AABgAAHAAAMAAAY+AB­z/ADDDAGCBAECBAADnAAB+AAA8AAAAAAAAAAB8AA­D+ADz/AH+DAGeBAEOBAEPBAELhAH5zADw6ABg+AA­EeAAF/AAHnAAGDAAEBAAABAAAAAAAAAH4AAHwAAA­AAAAAAAP/gA//4B8B8DgAOGAACEAADAAAAAAAAEA­ADGAACDgAOB8B8A//4AP/gAAAAAAAAAH4AA//AB/­/gD//wH//4P//8P//8f//+f//+f//+f//+f//+f/­/+f//+f//+P//8P//8H//4D//wB//gA//AAP8AAA­AAAAAAAAAAAH4AAf+AB//gD//wD//wH//4H//8P/­/8P//8P//8P//8P//8P//8P//8H//4H//4D//wB/­/gA//AAf+AADwAAAABAAAxAAA+AAA8AAAAAAAAAA­AAAABgAABgAABgAABgAABgAABgAAAAAAAAAAACAA­AHAAAHAAACAAAAAAAHAAA8AAHwAA+AADwAAHAAAA­AAAAAAAH4AA//AB//gD//wH//4P//8P//8f//+f/­/+f//+f//+f//+f//+f//+f//+P//8P//8H//4D/­/wB//gA//AAP8AAAAAAAAAAAAAABABADABACABAH­//AH//AAABAAABAAABAAAAAAAAAAAAAHAHAHAHAE­APAEAbAEAzAGBjAHPDAD+DAD8DAAADAAAAAAAAAD­APAHADAGABAEEBAEEBAEGBAGODAH7HAD7+AAh8AA­AAAAA4AAB4AAHYAAMYAAYYABwYADgYAH//AH//AA­AYAAAYAAAAAAAAAAAGAH8PAGEDAGEBAGEBAGEBAG­GDAGGDAGD+AAD8AAAQAAAAAA/4AB/+ADyPAGGDAE­EBAEEBAEGBAGHHAHD+AAB8AAAAAAAAAAAAAHgAAG­ABAGAHAGAeAGB4AGHgAGeAAH4AAHgAAEAAAAAAAB­x8AD7+AH/HAGOBAEEBAEEBAGODAH/HAD7+ABx8AA­AAAAAAAB8GAD+HAHvBAGDBAEBBAEBBAGBDAHjOAD­/8AB/4AAAAAAAAAAICAAcHAAcHAAICAAAAAAAAAA­AAAAABAHAzAHA+AHA8AAAAAAAAAAAAAAGAAAHAAA­NAAANgAAZgAAYwAAwwAAwYAAgYABgIABAMAAAAAA­AAAAAAABAMABgIAAgYAAwQAAQwAAYgAAJgAANgAA­PAAAHAAAGAAAAAAAAAAAAAAHAAAGAAAEAHAED3AE­CHAGGAAH8AAD8AAAwAAAAAAAAAAP8AA4HABgBgCA­AQEAAIMAAMIAAEYAAGQAACQAACQAACQAACQAACQA­ACYAAGIAAEMAAMGAAYDAAwBgBgA8PAAH4AAAAAAA­AAAH4AA//AB//gD//wH//4P//8P//8f//+f//+f/­/+f//+f//+f//+f//+f//+P//8P//8H//4D//wB/­/gA5nAAP8AAAAAAAAAAH4AA//AB//gD//wH//4P/­/8P//8f//+f//+f//+f//+f//+f//+f//+f//+P/­/8P//8F//oCf+QBjxgA4HAAP8AAAAAAAAAAH4AA/­/AB//gD//wH//4P//8P//8f//+f//+f//+f//+f/­/+f//+f//+f//+L//0N//sEf+ICAAQBgBgA4HAAP­8AAAAAAAAAAH4AA//AB//gD//wH//4P//8P//8f/­/+f//+f//+f//+f//+f//+f//+b//2J//kMP8MEA­AICAAQBgBgA4HAAP8AAAAAAAAAAH4AA//AB//gD/­/wH//4P//8P//8f//+f//+f//+f//+f//+f//+X/­/6Y//GIAAEMAAMEAAICAAQBgBgA4HAAP8AAAAAAA­AAAH4AA//AB//gD//wH//4P//8P//8f//+f//+f/­/+f//+f//+X//6QBgCYAAGIAAEMAAMEAAICAAQBg­BgA4HAAP8AAAAAAAAAAH4AA//AB//gD//wH//4P/­/8P//8f//+f//+f//+f//+QAACQAACQAACYAAGIA­AEMAAMEAAICAAQBgBgA4HAAP8AAAAAAAAAAH4AA/­/AB//gD//wH//4P//8P//8f//+f//+fAA+YAAGQA­ACQAACQAACYAAGIAAEMAAMEAAICAAQBgBgA4HAAP­8AAAAAAAAAAH4AA//AB//gD//wH//4P//8P//8f4­H+eAAeYAAGQAACQAACQAACQAACYAAGIAAEMAAMEA­AICAAQBgBgA4HAAP8AAAAAAAAAAH4AA//AB//gD/­/wH//4P//8PgB8eAAeYAAGQAACQAACQAACQAACQA­ACYAAGIAAEMAAMEAAICAAQBgBgA4HAAP8AAAAAAA­AAAH4AA//AB//gD//wH8P4PAA8OAAcYAAGYAAGQA­ACQAACQAACQAACQAACYAAGIAAEMAAMEAAICAAQBg­BgA4HAAP8AAAAAAAAAAH4AA//AB//gD4HwHAA4OA­AcMAAMYAAGYAAGQAACQAACQAACQAACQAACYAAGIA­AEMAAMEAAICAAQBgBgA4HAAP8AAAAAAAAAAH4AA/­/AB4HgDgBwGAAYMAAMIAAEYAAGQAACQAACQAACQA­ACQAACQAACYAAGIAAEMAAMEAAICAAQBgBgA4HAAP­8AAAAAAAAAAP8AA4HABgBgCAAQEAAIMAAMIAAEYA­AGQAACQAACQAACQAACQAACQAACYAAGIAAEMAAMGA­AYDgBwB4HgA//AAH4AAAAAAAAAAP8AA4HABgBgCA­AQEAAIMAAMIAAEYAAGQAACQAACQAACQAACQAACYA­AGYAAGMAAMOAAcHAA4D4HwB//gA//AAH4AAAAAAA­AAAP8AA4HABgBgCAAQEAAIMAAMIAAEYAAGQAACQA­ACQAACQAACQAACYAAGcAAOOAAcPAA8H8P4D//wB/­/gA//AAH4AAAAAAAAAAP8AA4HABgBgCAAQEAAIMA­AMIAAEYAAGQAACQAACQAACQAACYAAGYAAGeAAePg­B8P//8H//4D//wB//gA//AAH4AAAAAAAAAAP8AA4­HABgBgCAAQEAAIMAAMIAAEYAAGQAACQAACQAACQA­ACYAAGeAAef4H+P//8P//8H//4D//wB//gA//AAH­4AAAAAAAAAAP8AA4HABgBgCAAQEAAIMAAMIAAEYA­AGQAACQAACQAACYAAGfgB+f//+f//+P//8P//8H/­/4D//wB//gA//AAH4AAAAAAAAAAP8AA4HABgBgCA­AQEAAIMAAMIAAEYAAGQAACQAACQAACf//+f//+f/­/+f//+P//8P//8H//4D//wB//gA//AAH4AAAAAAA­AAAP8AA4HABgBgCAAQEAAIMAAMIAAEYAAGQH4CX/­/6f//+f//+f//+f//+f//+P//8P//8H//4D//wB/­/gA//AAH4AAAAAAAAAAP8AA4HABgBgCAAQEAAIMA­AMIAAEY//GX//6f//+f//+f//+f//+f//+f//+P/­/8P//8H//4D//wB//gA//AAH4AAAAAAAAAAP8AA4­HABgBgCAAQEAAIMf+MJ//kf//+f//+f//+f//+f/­/+f//+f//+f//+P//8P//8H//4D//wB//gA//AAH­4AAAAAAAAAAP8AA4HABgBgCAAQEf+IN//sL//0f/­/+f//+f//+f//+f//+f//+f//+f//+P//8P//8H/­/4D//wB//gA//AAH4AAAAAAAAAAP8AA4HABjxgCf­+QF//oP//8P//8f//+f//+f//+f//+f//+f//+f/­/+f//+P//8P//8H//4D//wB//gA//AAH4AAAAAAA­AAAH4AA8PAB//gD//wH//4P//8P//8f//+f//+f/­/+f//+f//+f//+f//+f//+P//8P//8H//4D//wB/­/gA//AAP8AAAAAAAAAAAAAD///D///CAADCAADCA­ABAAAAAHAAAB4AAAfAAAD4AAAeAAADAAAAAAAACA­ABCAADCAADD///D///AAAAAAAA'),
        32,
        atob("GAgKDAwUEwQICBgXBggGBxgMDAwMDAwMDA­wHBw4ADgsYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGB­gYGBgIBwg="),
        24|65536
      );
    }
    
    Graphics.prototype.setFontInknutAntiqua2­4 = function() {
      // Actual height 24 (23 - 0)
      return this.setFontCustom(
        atob('AAAAAB4AAD4AAD4AAD4AABwAAAAAAAAAAA­AAAAAPAAD/AA/4AP+AD/gAf4AAeAAAAAAAAAAAAY­AAB/AAD/gAH/wAP/4APH4AcB4AcA4AcA4AcA4AeA­4AfBwAf/wAP/gAH/AAD+AAA4AAAAAAAAAAIAYAcA­YAcA4Af/4Af/4Af/4Af/4AcAYAYAYAAAQAAAAACA­IAGAYAOA4AeB4AcD4AcH4AcP4Aef4Af94Af54APx­4APh4ADH4AAH8AAAAAAAAACAAAGAAYOAAYeAA4cC­AwcHBwefBwf/ngP//gPz/AHj+ACB8AAAwAAAAAAA­wAABwAAHwAAPwAAfwAA8wABwwADgwAPBwAP//wf/­/wf//wf//gAAwAAAwAAAwAAAAAAHAGD/AOH/AMHv­gMHngcHnwYHn44Hj/wHj/wfh/gfw/AAAeAAAAAAA­AAAAAAAB8AAP/AAf/gA//wB//4D8D4HwB4HsA4PO­A4ePA4cPh44H/w4H/gAD/AAB+AAAYAAAAAAAAA/g­AAfgAAeAAYeAB4eAHweAfAeB8AeHwAePAAe8AAf4­AAfgAAeAAAYAAAAAAAAAAAAAeADg/APx/gP7/gf/­/w/+Dw4+Bw4fBw4fBw8fhw//zwf3/gfj/gPD/AAB­+AAAYAAAAAAAAAA+AAD/AAH/gYH/wYP/w4OD5wcA­5wcAzgeAPgfAfAP/+AP/8AH/4AD/wAB/AAAAAAAA­AAAAAAHB4APj4APj4APj4APBwAAAAAAAAA'),
        46,
        atob("CAkTDBANEQ8SEBISCA=="),
        24|65536
      );
    };
    
    Graphics.prototype.setFontInknutAntiqua6­6 = function() {
      // Actual height 66 (65 - 0)
      return this.setFontCustom(
        atob('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAD8AAAAAAAAAH/AAAAAAAAAP/AAAAAAAAAf/g­AAAAAAAAf/gAAAAAAAA//wAAAAAAAA//wAAAAAAA­A//wAAAAAAAB//gAAAAAAAA//gAAAAAAAA//gAAA­AAAAA//AAAAAAAAAf+AAAAAAAAAP8AAAAAAAAAH4­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAA­fAAAAAAAAAH/AAAAAAAAB//AAAAAAAAf//AAAAAA­AH///AAAAAAB///8AAAAAA////AAAAAAP///wAAA­AAD///8AAAAAA////AAAAAAP///wAAAAAD///8AA­AAAA////AAAAAAf///gAAAAAH///4AAAAAAf//+A­AAAAAAf//gAAAAAAAf/4AAAAAAAAf+AAAAAAAAAf­gAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAB4AAAAAAAAAf/gAAAAAAAB/­/8AAAAAAAH//+AAAAAAAP///gAAAAAAf///wAAAA­AA////4AAAAAB////8AAAAAD////8AAAAAH////+­AAAAAP/////AAAAAP/////AAAAAf/////AAAAAf+­AH//gAAAA/wAA//gAAAA/gAAf/gAAAB/AAAH/gAA­AB/AAAD/wAAAD/AAAB/wAAAD+AAAB/wAAAD+AAAB­/wAAAD+AAAA/wAAAD+AAAA/wAAAD/AAAA/gAAAH/­AAAA/gAAAH/AAAA/gAAAD/gAAA/gAAAD/gAAB/AA­AAD/wAAB/AAAAD/8AAD/AAAAD//AAH+AAAAD//4A­/+AAAAB/////8AAAAB/////8AAAAA/////4AAAAA­/////wAAAAAf////gAAAAAP////gAAAAAP////AA­AAAAH///+AAAAAAB///4AAAAAAA///wAAAAAAAP/­/AAAAAAAAD/8AAAAAAAAAPAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAIAAAAAAAAAA4AAAAHgAAAD4A­AAAPgAAAD8AAAAfgAAAD8AAAAfgAAAD8AAAA/gAA­AD8AAAB/gAAAD+AAAD/gAAAD//////gAAAD/////­/gAAAD//////gAAAD//////gAAAD//////gAAAD/­/////gAAAD//////gAAAD//////gAAAD//////gA­AAD//////gAAAD//////gAAAD/gAAA/gAAAD/AAA­AfgAAAD+AAAAfgAAAD+AAAAfgAAAD8AAAAPgAAAD­4AAAAPgAAADwAAAAOAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAB4AAAHgAAAAD8AAAPgAAA­AD8AAAfgAAAAH4AAA/gAAAAP4AAB/gAAAAfwAAD/­gAAAA/wAAD/gAAAA/wAAH/gAAAB/gAAP/gAAAD/g­AAf/gAAAD/gAA//gAAAD/AAB//gAAAD/AAB//gAA­AD/AAD//gAAAD/AAH//gAAAD/AAP//gAAAD/gAf/­/gAAAD/gB///gAAAD/wD///gAAAD/8P/f/gAAAD/­//+f/gAAAD///+f/gAAAD///8f/gAAAB///4f/gA­AAB///wf/gAAAB///gf/gAAAA///Af/gAAAA//+A­f/gAAAAf/8Af/gAAAAf/4Af/gAAAAP/wAf/gAAAA­H/AA//gAAAAB8AH//gAAAAAAAP//wAAAAAAAP//w­AAAAAAAP//wAAAAAAAP//wAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAA­ADwAAAAAAcAAH4AAAAAAfAAH4AAAAAA/AAPwAAAA­AA/AAfwAAAAAA/AA/gAAAAAB+AB/gAAAAAB+AB/A­AAAAAD+AD/AAAAAAD8AH/AAAAAAH8AH+AAAAAAH4­AH+AAHgAAP4AH+AAPwAAP4AH/AAfwAAfwAH/AA/4­AAfwAH/gD/4AA/gAH/4P/8AB/gAH////+AD/AAD/­////AH/AAD/////wf+AAD///////+AAB///v///8­AAB///P///8AAA//+H///4AAA//8H///wAAAf/4D­///wAAAP/wB///gAAAP/gB///AAAAD+AA//+AAAA­A4AAf/8AAAAAAAAP/wAAAAAAAAH/AAAAAAAAAAwA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AA8AAAAAAAAAB8AAAAAAAAAH8AAAAAAAAAP8AAAA­AAAAAf8AAAAAAAAA/8AAAAAAAAB/8AAAAAAAAH/8­AAAAAAAAP/8AAAAAAAAf/8AAAAAAAA//8AAAAAAA­B/38AAAAAAAH/n8AAAAAAAP/H8AAAAAAAf+H8AAA­AAAA/4H8AAAAAAD/wH8AAAAAAH/gH8AAAAAAP/AH­8AAAAAAf8AH8AAAAAA/4AH8AAAAAD/wAH8AAAAAH­/gAH8AAAAAP/AAH8AAAAAf8AAH8AAAAA////////­8AA////////4AB////////4AB////////4AB////­////wAD////////wAD////////wAD////////gAH­////////gAH////////AAH////////AAAAAAAH8A­AAAAAAAAH8AAAAAAAAAH8AAAAAAAAAH8AAAAAAAA­AH8AAAAAAAAAH8AAAAAAAAAH8AAAAAAAAAH8AAAA­AAAAAH4AAAAAAAAAHAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAH4AAA­APgAAAH4AAAH/gAAAH4AAD//wAAAPwAB///wAAAP­wAf///wAAAPwA////4AAAfgA////4AAAfgA//D/8­AAAfgA//D/8AAA/AA//D/8AAA/AA//B/+AAB/AA/­/B/+AAB+AA//A//AAD+AA//A//AAD+AA//A//gAH­8AA//Af/wAP8AA//Af/wAP4AA//AP/4A/4AA//AP­/+D/wAA//AH////wAA//AH////gAA//AD////gAA­//AD////AAA//AB///+AAB//AB///+AAP//AA///­8AAf//gAf//4AAf//gAP//wAAf//gAH//gAAf//g­AD//AAAAAAAAB/8AAAAAAAAAPgAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAP/8AAAAAAAB///gA­AAAAAP///4AAAAAA////+AAAAAB/////AAAAAH//­///gAAAAP/////wAAAAf/////4AAAA//////8AAA­B//////8AAAD//////+AAAH//////+AAAP//4B//­/AAAf/+AAH//AAA//wAAB//AAB//AAAAf/AAD/+A­AAAP/gAD/4AAAAH/gAH/wMAAAD/gAP/geAAAD/gA­P+B+AAAB/gAf8B/AAAB/gA/4B/gAAB/AA/wB/gAA­B/AB/wB/wAAB/AB/gB/4AAD/AD/AB/+AAD+AH+AA­//gAP+AH8AA//8A/8AP8AA/////8AP4AAf////4A­fwAAf////4AfgAAP////wAfgAAH////gAPAAAH//­//AACAAAD///+AAAAAAB///8AAAAAAA///4AAAAA­AAf//wAAAAAAAH//AAAAAAAAB/8AAAAAAAAAGAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/­/4AAAAAAAH//4AAAAAAAD//8AAAAAAAD//8AAAAA­AAD//wAAAAAAAD//AAAAAACAD/8AAAAAAPAD/8AA­AAAA/AD/8AAAAAD/gD/8AAAAAP/gD/8AAAAA//AD­/8AAAAD/8AD/8AAAAP/wAD/8AAAAf/AAD/8AAAB/­8AAD/8AAAH/wAAD/8AAAf/AAAD/8AAB/+AAAD/8A­AH/4AAAD/8AAf/gAAAD/8AB/+AAAAD/8AD/4AAAA­D/8AP/gAAAAD/8A/+AAAAAD/8D/4AAAAAD/8P/gA­AAAAD/8//AAAAAAD///8AAAAAAD///wAAAAAAD//­/AAAAAAAD//8AAAAAAAD//wAAAAAAAD//AAAAAAA­AD/8AAAAAAAAD/wAAAAAAAAD/gAAAAAAAAD+AAAA­AAAAABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAA/AAAAAAAAAD/w­AAAAAAAAH/8AAAAAAAAf/+AAAAf4AA///AAAB/+A­B///gAAD//AB///wAAH//gD///4AAf//wH///4AA­f//4P///8AA///8P///8AB///+f///+AD///+///­/+AD/////gD/+AH////+AA//AP////8AAP/AP+D/­/4AAH/AP4A//wAAD/AfwAf/4AAD/AfwAP/8AAB/g­fgAH/8AAB/gfgAD/+AAA/g/gAD/+AAA/g/wAB//A­AA/gfwAA//gAA/gf4AA//wAA/gf8AD//wAB/Af/A­P//4AB/Af/////8AD/Af//////AH+AP///z//gf+­AP///j////8AH///B////4AH//+B////4AD//8A/­///wAB//4Af///gAA//wAf///AAAf/AAP///AAAP­8AAH//+AAAAgAAD//4AAAAAAAB//wAAAAAAAAf/g­AAAAAAAAP+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf+AAA­AAAAAD//gAAAAAAAH//4AAAAAAAf//8AAAAAAA//­/+AAAAAAB////AAAAAAD////gAAMAAH////gAAfA­AP////wAA/gAP////4AA/AAf////4AB/AAf////8­AD+AA/+A//8AD+AA/wAH/8AH8AB/gAB/+AP8AB/A­AAf+Af4AD/AAAP+Af4AD+AAAH+A/wAD+AAAH+B/w­AD+AAAD+D/gAD+AAAB+H/AAD/AAAB4P/AAH/AAAA­wf+AAD/gAAAA/8AAD/wAAAD/8AAD/4AAAH/4AAD/­8AAAf/wAAD//AAD//gAAD//8Af//gAAB///////A­AAB//////+AAAA//////8AAAA//////4AAAAf///­//wAAAAP/////gAAAAH/////AAAAAD////8AAAAA­B////4AAAAAAf///gAAAAAAH//+AAAAAAAB//wAA­AAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAB8AAB8AAAAAD/AAH+AAAAAP/gAP/­AAAAAP/gAf/gAAAAf/wAf/gAAAA//wA//wAAAA//­wA//wAAAA//wA//wAAAA//wA//gAAAA//gA//gAA­AA//gA//gAAAA//AA//AAAAAf/AAf+AAAAAP+AAP­8AAAAAH4AAH4AAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAA=='),
        46,
        atob("FhczISslMCkyKzMyFg=="),
        66|65536
      );
    };
    
    Graphics.prototype.setFontInknutAntiqua8­8 = function() {
      // Actual height 88 (87 - 0)
      return this.setFontCustom(
        atob('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD4AAAAAA­AAAAAAA/4AAAAAAAAAAAAH/wAAAAAAAAAAAA//gA­AAAAAAAAAAH//AAAAAAAAAAAA//+AAAAAAAAAAAD­//4AAAAAAAAAAAf//gAAAAAAAAAAB//+AAAAAAAA­AAAH//4AAAAAAAAAAAf//gAAAAAAAAAAB//+AAAA­AAAAAAAH//4AAAAAAAAAAAf//AAAAAAAAAAAB//8­AAAAAAAAAAAH//gAAAAAAAAAAAP/8AAAAAAAAAAA­Af/gAAAAAAAAAAAA/8AAAAAAAAAAAAB/gAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAPAAAAAAAAAAAAAP8AAAAAAAAAAAAP/w­AAAAAAAAAAAf//AAAAAAAAAAAf//8AAAAAAAAAAf­///wAAAAAAAAAf////AAAAAAAAAf////wAAAAAAA­Af////wAAAAAAAAf////gAAAAAAAAf////gAAAAA­AAAf////gAAAAAAAA/////gAAAAAAAA/////gAAA­AAAAA/////gAAAAAAAA/////gAAAAAAAA/////gA­AAAAAAA/////gAAAAAAAA/////gAAAAAAAA/////­gAAAAAAAA/////gAAAAAAAAP////gAAAAAAAAA//­//AAAAAAAAAAD///AAAAAAAAAAAH//AAAAAAAAAA­AAf/AAAAAAAAAAAAB/AAAAAAAAAAAAAHAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8AAAAAAAAA­AAAB//wAAAAAAAAAAAf//wAAAAAAAAAAH///wAAA­AAAAAAB////wAAAAAAAAAP////gAAAAAAAAB////­/gAAAAAAAAP/////AAAAAAAAB/////+AAAAAAAAP­/////4AAAAAAAB//////wAAAAAAAP//////gAAAA­AAB///////AAAAAAAP//////8AAAAAAA///////4­AAAAAAH///////gAAAAAAf//////+AAAAAAD//AB­///8AAAAAAf/gAAf//wAAAAAB/8AAAf//AAAAAAH­/gAAAf/+AAAAAA/8AAAAf/4AAAAAD/gAAAA//gAA­AAAf+AAAAD/+AAAAAB/wAAAAH/4AAAAAH/AAAAAP­/gAAAAAf8AAAAA/+AAAAAD/wAAAAD/4AAAAAP/AA­AAAH/gAAAAA/8AAAAAf+AAAAAD/wAAAAB/4AAAAA­P/AAAAAH/gAAAAA/+AAAAAf+AAAAAD/4AAAAB/wA­AAAAP/gAAAAH/AAAAAA//AAAAAf8AAAAAD/+AAAA­D/gAAAAAP/8AAAAP+AAAAAA//4AAAB/4AAAAAD//­wAAAP/AAAAAAH//wAAB/8AAAAAAf//4AAf/gAAAA­AB////A//+AAAAAAD///////wAAAAAAP///////A­AAAAAAf//////4AAAAAAB///////AAAAAAAD////­//8AAAAAAAP//////gAAAAAAAf/////8AAAAAAAA­//////gAAAAAAAB/////8AAAAAAAAD/////gAAAA­AAAAH////8AAAAAAAAAP////gAAAAAAAAAP///4A­AAAAAAAAAf//+AAAAAAAAAAAf//gAAAAAAAAAAAH­/4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAYAAAAAAAAAAAAAHgAAAAAB8AAAA­AB+AAAAAAPwAAAAAP8AAAAAB/AAAAAA/wAAAAAP8­AAAAAD/AAAAAA/wAAAAAP8AAAAAH/AAAAAA/4AAA­AA/8AAAAAD/gAAAAH/wAAAAAP+AAAAA//AAAAAA/­///////8AAAAAD////////wAAAAAP////////AAA­AAA////////8AAAAAD////////wAAAAAP///////­/AAAAAA////////8AAAAAD////////wAAAAAP///­/////AAAAAA////////8AAAAAD////////wAAAAA­P////////AAAAAA////////8AAAAAD////////wA­AAAAP////////AAAAAA//AAAAAf8AAAAAD/4AAAA­A/wAAAAAP/gAAAAD/AAAAAA/8AAAAAP8AAAAAD/g­AAAAA/wAAAAAP8AAAAAB/AAAAAA/gAAAAAH8AAAA­AD+AAAAAAfwAAAAAHwAAAAAA8AAAAAAAAAAAAADA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAABgAAAAB8AAAAAAAPgAAAAPwAAAAAAB/AAAAB­/AAAAAAAP8AAAAP8AAAAAAB/wAAAB/wAAAAAAP+A­AAAH/AAAAAAA/4AAAA/8AAAAAAH/AAAAH/wAAAAA­A/8AAAA//AAAAAAH/gAAAH/8AAAAAA/+AAAAf/wA­AAAAD/4AAAD//AAAAAAf/AAAAf/8AAAAAB/8AAAD­//wAAAAAP/wAAAf//AAAAAA/+AAAD//8AAAAAD/4­AAAf//wAAAAAP/gAAB///AAAAAA/+AAAP//8AAAA­AD/4AAB///wAAAAAP/gAAP///AAAAAA//AAB///8­AAAAAD/8AAP///wAAAAAP/wAB////AAAAAA//gAf­///8AAAAAD//AD/9//wAAAAAP/+A//n//AAAAAA/­////8f/8AAAAAD/////h//wAAAAAH////+H//AAA­AAAf////wf/8AAAAAB////+B//wAAAAAH////wH/­/AAAAAAP///+Af/8AAAAAA////wB//wAAAAAD///­+AH//AAAAAAH///wAf/8AAAAAAf//+AB//wAAAAA­A///wAH//AAAAAAB//+AAf/8AAAAAAD//wAB//wA­AAAAAP/8AAH//AAAAAAAP/gAB//8AAAAAAAf4AA/­//wAAAAAAAAAAP///gAAAAAAAAAB///+AAAAAAAA­AAH///4AAAAAAAAAAP///gAAAAAAAAAA////AAAA­AAAAAAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAIAAAAAAAAAAAAAB4AAAAAAAADgAAA­P4AAAAAAAAP4AAA/gAAAAAAAA/gAAH+AAAAAAAAH­+AAA/wAAAAAAAAf4AAH/AAAAAAAAB/AAA/4AAAAA­AAAP8AAD/gAAAAAAAA/wAAf8AAAAAAAAH+AAD/wA­AAAAAAAf4AAf+AAAAAAAAB/gAD/4AAAAAAAAP8AA­P/gAAAAAAAA/wAA/+AAAAAAAAH/AAD/wAAAAAAAA­f4AAP/AAAHwAAAD/gAB/8AAA/gAAAP8AAD/4AAH+­AAAB/wAAP/gAA/8AAAH/AAA/+AAH/4AAA/4AAD/8­AA//gAAH/gAAP/4AP//AAAf8AAA//8H//+AAD/wA­AD//////8AAf+AAAP//////4AD/4AAAf//////wA­//AAAB///////9//8AAAH//////////gAAAP///8­/////+AAAA////j/////wAAAD///+H/////AAAAH­///wf////4AAAAf//+A/////AAAAA///wD////4A­AAAB//+AH////gAAAAD//wAf///8AAAAAH/+AA//­//gAAAAAP/gAB///8AAAAAAf8AAD///gAAAAAAOA­AAP//8AAAAAAAAAAAf//AAAAAAAAAAAAf/wAAAAA­AAAAAAA/8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAfAAAAAAAAA­AAAAH8AAAAAAAAAAAAA/wAAAAAAAAAAAAH/AAAAA­AAAAAAAA/8AAAAAAAAAAAAH/wAAAAAAAAAAAB//A­AAAAAAAAAAAP/8AAAAAAAAAAAB//wAAAAAAAAAAA­P//AAAAAAAAAAAB//8AAAAAAAAAAAf//wAAAAAAA­AAAD///AAAAAAAAAAAf//8AAAAAAAAAAD/9/wAAA­AAAAAAA//n/AAAAAAAAAAH/8f8AAAAAAAAAA//h/­wAAAAAAAAAH/4H/AAAAAAAAAA//Af8AAAAAAAAAP­/4B/wAAAAAAAAB//AH/AAAAAAAAAP/4Af8AAAAAA­AAB/+AB/wAAAAAAAAP/wAH/AAAAAAAAD/+AAf8AA­AAAAAAf/wAB/wAAAAAAAD/8AAH/AAAAAAAAf/gAA­f8AAAAAAAD/8AAB/wAAAAAAA//gAAH/AAAAAAAH/­8AAAf8AAAAAAA//AAAB/wAAAAAAH//////////+A­AAf//////////4AAB///////////gAAP////////­//8AAA///////////wAAD///////////AAAf////­//////4AAB///////////gAAP//////////+AAA/­//////////wAAD///////////AAAf//////////8­AAB///////////gAAH//////////+AAA////////­///wAAAAAAAAAH/AAAAAAAAAAAAAf8AAAAAAAAAA­AAB/wAAAAAAAAAAAAH/AAAAAAAAAAAAAf8AAAAAA­AAAAAAB/wAAAAAAAAAAAAH/AAAAAAAAAAAAAf8AA­AAAAAAAAAAB/wAAAAAAAAAAAAH/AAAAAAAAAAAAA­f8AAAAAAAAAAAAB+AAAAAAAAAAAAAHgAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AADwAAAAAAAAAAAAAfwAAAAAAfAAAAAB/gAAAAA/­+AAAAAH8AAAAB//4AAAAA/wAAAD///gAAAAD/AAA­H////AAAAAP4AAP////8AAAAB/gAD/////wAAAAH­+AAP/////gAAAA/wAA/////+AAAAD/AAD//g//4A­AAAP8AAP/+D//wAAAB/gAA//4H//AAAAH+AAD//g­f/+AAAA/4AAP/+B//4AAAD/AAA//4D//wAAAP8AA­D//gP//AAAB/wAAP/+A//+AAAH+AAA//4B//4AAA­/4AAD//gH//wAAH/AAAP/+AP//AAAf8AAA//4A//­+AAD/wAAD//gD//8AAf+AAAP/+AH//4AD/4AAA//­4Af//wAf/AAAD//gA///gH/8AAAP/+AD//////gA­AA//4AH/////+AAAD//gAf/////wAAAP/+AA////­//AAAA//4AD/////4AAAD//gAH/////AAAAP/+AA­f////8AAAD//4AA/////gAAA///gAB////8AAAf/­//AAH////gAAD///8AAP///+AAAP///wAAf///wA­AAf///AAA///+AAAB///+AAB///gAAAH///4AAD/­/8AAAAAAAAAAAD//AAAAAAAAAAAAB/gAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAB//8AAAAAAAAAAB///+AAAAAAAAAAf///­+AAAAAAAAAP////+AAAAAAAAD/////+AAAAAAAAf­/////8AAAAAAAH//////8AAAAAAA///////4AAAA­AAP///////wAAAAAB////////gAAAAAP///////+­AAAAAB////////8AAAAAP////////4AAAAB/////­////gAAAAP/////////AAAAB/////////8AAAAP/­//8Af///wAAAB///4AAD///gAAAP//8AAAB//+AA­AB///AAAAB//4AAAH//wAAAAD//wAAA//8AAAAAD­//AAAH//gAAAAAH/8AAA//4AAAAAAP/wAAD//AGA­AAAA//AAAf/4B4AAAAB/8AAD/+APwAAAAH/wAAP/­wD/AAAAAf/AAB/+AP+AAAAA/8AAP/wA/8AAAAD/g­AA/+AD/wAAAAP+AAH/4AP/gAAAA/4AAf/AA//AAA­AH/gAD/4AD/+AAAAf8AAf/AAP/8AAAB/wAB/4AAf­/8AAAP/AAP/AAB//8AAB/4AA/8AAH//8AAf/gAH/­gAAP///gf/8AAf8AAA///////wAD/gAAD//////+­AAP+AAAH//////4AB/wAAAf//////AAH+AAAA///­///4AA/4AAAB//////AAA/AAAAH/////8AAA4AAA­AP/////gAAAAAAAAf////8AAAAAAAAA/////gAAA­AAAAAB////8AAAAAAAAAD////AAAAAAAAAAH///4­AAAAAAAAAAH//+AAAAAAAAAAAH//gAAAAAAAAAAA­H/4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB///8A­AAAAAAAAAH///4AAAAAAAAAAP///gAAAAAAAAAA/­//+AAAAAAAAAAD///8AAAAAAAAAAP///gAAAAAAA­AAA///wAAAAAAAAAAB//8AAAAAAAAGAAH//AAAAA­AAAB8AAf/8AAAAAAAAPwAB//wAAAAAAAD/gAH//A­AAAAAAA/+AAf/8AAAAAAAP/8AB//wAAAAAAD//gA­H//AAAAAAA//4AAf/8AAAAAAP/+AAB//wAAAAAD/­/gAAH//AAAAAAf/8AAAf/8AAAAAH//AAAB//wAAA­AB//wAAAH//AAAAAf/8AAAAf/8AAAAH//AAAAB//­wAAAB//wAAAAH//AAAAf/8AAAAAf/8AAAD//AAAA­AB//wAAA//4AAAAAH//AAAP/+AAAAAAf/8AAD//g­AAAAAB//wAA//4AAAAAAH//AAP/+AAAAAAAf/8AD­//gAAAAAAB//wA//4AAAAAAAH//AH/+AAAAAAAAf­/8B//wAAAAAAAB//wf/8AAAAAAAAH//H//AAAAAA­AAAf/9//wAAAAAAAAB////8AAAAAAAAAH////AAA­AAAAAAAf///wAAAAAAAAAB///8AAAAAAAAAAH///­gAAAAAAAAAAf//4AAAAAAAAAAB//+AAAAAAAAAAA­H//gAAAAAAAAAAAf/4AAAAAAAAAAAB/+AAAAAAAA­AAAAH/gAAAAAAAAAAAAf4AAAAAAAAAAAAB/AAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAB/AAAAAAAAAAAAA//gAAAAAAAAA­AAH//gAAAAAAAAAAA///AAAAAACAAAAP//+AAAAA­D/wAAB///8AAAAA//wAAP///4AAAAH//wAA////w­AAAA///gAH////gAAAH///AA/////AAAA///+AH/­///8AAAH///8A/////4AAA////4D/////gAAH///­/wf/////AAA/////D/////8AAH////+f/////4AA­f////9//v///gAD///////AA//+AAf//////wAA/­/8AB//////+AAA//wAP//////wAAB//AA/+A///+­AAAD/8AH/wA///wAAAH/4Af8AB///AAAAP/gB/wA­B//+AAAA/+AP+AAD//4AAAB/4A/4AAP//wAAAH/g­D/gAAf//AAAAP+AP+AAA//+AAAA/4A/4AAB//8AA­AD/gD/gAAH//wAAAP+AP+AAAP//gAAA/4A/8AAAf­//AAAD/gD/wAAB//8AAAP+AP/wAAf//4AAA/4A//­gAH///wAAH/AD//gB////gAAf8AH////////AAD/­wAf///////+AAf+AB/////3//+AH/4AD////+P//­+B//AAP////w//////8AA////+B//////gAB////­wH/////+AAD///+AP/////wAAP///wAf////+AAA­f//+AB/////wAAA///wAD/////AAAB//+AAH////­4AAAD//gAAP////AAAAH/8AAA////4AAAAD/AAAB­////AAAAAAAAAAD///4AAAAAAAAAAD//+AAAAAAA­AAAAH//wAAAAAAAAAAAP/8AAAAAAAAAAAAP/AAAA­AAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/8AAAAAA­AAAAAA//+AAAAAAAAAAAP//8AAAAAAAAAAD///8A­AAAAAAAAAf///4AAAAAAAAAH////wAAAAAAAAA//­///gAAAAAAAAH/////AAAAAAAAA/////+AAAAYAA­AH/////8AAAD4AAA//////wAAAfwAAD//////gAA­B/gAAf//////AAAP+AAD//////8AAB/wAAP/////­/4AAH/AAB///////gAA/4AAH/+Af//+AAH/gAA//­AAH//8AAf8AAD/wAAD//wAD/wAAf+AAAD//AAf+A­AB/wAAAH/+AD/4AAH/AAAAP/4Af/AAA/8AAAAf/g­B/4AAD/gAAAA/+AP/gAAP+AAAAB/4B/8AAA/4AAA­AD/gP/wAAH/gAAAAP+B/+AAAf/AAAAAf4P/4AAB/­8AAAAB+B//AAAH/wAAAADgP/4AAAf/gAAAAMB//g­AAB/+AAAAAAP/8AAAH/8AAAAAD//gAAAf/4AAAAA­f/+AAAB//wAAAAH//wAAAD//wAAAB//+AAAAP//w­AAAf//wAAAA///4AAP//+AAAAB////Af///4AAAA­H/////////AAAAAf////////4AAAAA/////////A­AAAAD////////4AAAAAH////////AAAAAAP/////­//4AAAAAA////////AAAAAAB///////4AAAAAAD/­/////+AAAAAAAH//////wAAAAAAAP/////+AAAAA­AAAP/////gAAAAAAAAf////4AAAAAAAAAf///+AA­AAAAAAAAP///AAAAAAAAAAAH//AAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAH+AAAD/AAAAAAAA/8AAAf+AAAAAA­AH/4AAD/8AAAAAAA//wAAf/4AAAAAAH//gAD//wA­AAAAA//+AAf//AAAAAAD//4AB//8AAAAAAf//gAP­//wAAAAAB//+AA///AAAAAAH//4AD//8AAAAAAf/­/gAP//wAAAAAB//+AA///AAAAAAH//4AD//8AAAA­AAf//AAP//gAAAAAB//8AA//+AAAAAAD//gAB//w­AAAAAAH/8AAD/+AAAAAAAf/gAAP/wAAAAAAAf8AA­AP+AAAAAAAAfAAAAPgAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AA'),
        46,
        atob("HR9FLTkxQDdDOkNDHQ=="),
        88|65536
      );
    };
    
    { // must be inside our own scope here so that when we are unloaded everything disappears
      // we also define functions using 'let fn = function() {..}' for the same reason. function decls are global
      
    let drawStatusTimeout;
      
    let drawStatus = function(){ // battery and 24h line clock, remove if ou want  to display wigets instead
      
    g.clearRect(0,20,175,20);
    g.setColor(g.theme.fg); // draw battery 
    g.drawLine(0,2,E.getBattery()*1.75,2);
      // draw line for 24 h clock
      var x = g.getWidth() / 2;
      var y = g.getHeight() / 2;
      var ix;
      var shade;
      var w ;
      var date = new Date();
      for ( ix = 0; ix < 176; ix++){
        shade = 2*Math.PI * ((date.getHours()-6)/24);
        shade = Math.sin(2*Math.PI* ix/176 + shade );
        if ( shade > 0 ){
        shade = 1-Math.sqrt(1-(shade * 0.5 + 0.5));
        }else{
        shade = Math.sqrt((shade * 0.5 + 0.5));
        }
        //shade = 1- shade ;
     g.setColor(shade,shade,shade);
     g.setPixel(ix,18);
      }
    g.setColor(g.theme.fg); // draw dots at noon / midnight
    ix = x-(((date.getHours())%12)/24)*176;
    g.drawLine(ix,16,ix+2,18);
    g.drawLine(ix+2,18,ix, 20);
    g.drawLine(ix,20,ix-2,18);
    g.drawLine(ix-2,18,ix,16);
      
    ix = ix + 176/2;
    g.drawLine(ix,16,ix+2,18);
    g.drawLine(ix+2,18,ix, 20);
    g.drawLine(ix,20,ix-2,18);
    g.drawLine(ix-2,18,ix,16);
    
    // queue next drawStatus
      if (drawStatusTimeout) clearTimeout(drawStatusTimeout);
      drawStatusTimeout = setTimeout(function() {
        drawStatusTimeout = undefined;
        drawStatus();
        //draw();
        //drawWeek();    
      }, 30*60000 - (Date.now() % 30*60000));
      
    };//------------------<< status
      
      
      
    let drawWeekTimeout;
      
    let drawWeek = function() {
      //  date and day of week, moonphase, next quater moon
      var date = new Date();
      var weekday = Math.abs(date.getDay() -1 % 7);
      var dateStr = date.getDate() ;
      
      g.reset().clearRect(0,175-36,175,175-36)­;
      g.setColor(g.theme.fg);
      g.fillRect(0, 175-15, 175, 175);
      var pos;
      var d;
     for ( d=0; d< 7; d++){ 
        pos = d * 25;
         if (d < 5 ){
           g.setColor(g.theme.bg);
           g.fillRect(pos, 175-15, pos+22, 175);
         }else{                                 g.setColor(g.blendColor(g.theme.bg,g.the­me.fg,0.25));
           g.fillRect(pos, 175-15, pos+22, 175);
         }
        
     }
    g.setColor(g.theme.fg);
    g.setFontAlign(0, 0).setFont("InknutAntiqua24", 1).drawString(dateStr,  weekday*(176/7)+11, g.getHeight() - 15);
    
    var mphaseq=-1; // moonphase 0-3
    var qday = -1; // day in week quater moon
    var moonssince; // full moons since full moon
    var lundaymo; // lunation day monda
    var tms = date.getTime();//
    var weekdayms = weekday * 86400000 ;//seconds since monday
    var startd = tms - weekdayms; // monday
    var perc;// percent of cycle
    tms = startd - 1683308000000 ;//may5th 1734h 2023;
    moonssince = tms /2551442823.5;//div ms in a lunar month
    perc = moonssince - Math.floor(moonssince); 
    lundaymo = perc * 29.530588235;
    mphaseq =Math.round((lundaymo)/ 7.38264705875);
       
    qday = Math.round( 7.38264705875 - (lundaymo- (mphaseq* 7.38264705875))) % 7; // next quater phase day
    mphaseq = (mphaseq+1) % 4; // set to next quater phase
      
    
    g.setColor(0,0,0); // black moon bg
    var yoffset = (qday == weekday )*24;
    g.setFontAlign(0, 0).setFont("moonphases", 1).drawString(String.fromCharCode(48), qday*(176/7)+11, g.getHeight() - 22- yoffset);
    g.setColor(1,1,1); // moonshape
       //g.setFontAlign(0, 0).setFont("moonphases", 1).drawString(String.fromCharCode(65+mph­aseq*26/4), qday*(176/7)+11, g.getHeight() - 26- yoffset); // next moon or :
    g.setFontAlign(0, 0).setFont("moonphases", 1).drawString(String.fromCharCode(65+per­c*26), qday*(176/7)+11, g.getHeight() - 22- yoffset);
    
    // queue next drawWeek
      if (drawWeekTimeout) clearTimeout(drawWeekTimeout);
      drawWeekTimeout = setTimeout(function() {
        drawWeekTimeout = undefined;
        draw();
        drawWeek();
      }, 180*60000 - (Date.now() % 180*60000)); 
    
    };//-------------------<< week
      
    let drawTimeout;
    
    //  draw  clock
    let draw = function() {
      var x = g.getWidth() / 2;
      var y = g.getHeight() / 2;
      var xoffset =0;
      var minute;
      var hour;
      var hour_old;
      var date;
      var digit1;
      var digit2;
      
      g.reset().clearRect(0,25,175,175-36); // clear area
    
      date = new Date();
      hour_old = hour;
      hour = date.getHours(); // hour 
      if (hour_old != hour){ // only draw if hour has changed
      if (hour > 12) {
        hour = hour % 12;
      }
      digit2 = hour % 10;
      digit1 = hour - digit2;
      if (digit1 > 0 ){ // draw hours, one or two digits
      xoffset = -10;
      g.setColor(g.theme.fg);
       g.setFontAlign(1, 0).setFont("InknutAntiqua66",1).drawStri­ng(hour, x+xoffset, y);
      }
      else {
        xoffset = -15;
      g.setColor(g.theme.fg);
      g.setFontAlign(1, 0).setFont("InknutAntiqua88",1).drawStri­ng(hour, x+xoffset, y);  
      }
      }
       minute = date.getMinutes(); //   minutes
      digit2 = minute % 10;
      digit1 = Math.floor(minute / 10);
      minute = digit1.toString() + digit2.toString();
      
        g.setColor(g.blendColor(g.theme.bg,g.the­me.fg,0.5));
      g.setFontAlign(-1, 0).setFont("InknutAntiqua66",1).drawStri­ng(minute, x+xoffset , y);
      
    // queue next draw
      if (drawTimeout) clearTimeout(drawTimeout);
      drawTimeout = setTimeout(function() {
        drawTimeout = undefined;
        draw();
      }, 60000 - (Date.now() % 60000));
     
    };//-----------------------<< clock  
      
    
    // Show launcher when middle button pressed
    Bangle.setUI({
      mode : "clock",
      remove : function() {
        // Called to unload all of the clock app
        if (drawStatusTimeout) clearTimeout(drawStatusTimeout);
        drawStatusTimeout = undefined;
        if (drawTimeout) clearTimeout(drawTimeout);
        drawTimeout = undefined;
        if (drawWeekTimeout) clearTimeout(drawWeekTimeout);
        drawWeekTimeout = undefined;
        delete Graphics.prototype.setFontmoonphases;
        delete Graphics.prototype.setFontInknutAntiqua2­4;
        delete Graphics.prototype.setFontInknutAntiqua6­6d;
        delete Graphics.prototype.setFontInknutAntiqua8­8;
        
        
      }});
    //Load widgets
    //Bangle.loadWidgets();
    g.reset().clearRect(0,0,g.getWidth(),g.g­etHeight());
    draw();
    drawWeek();
    drawStatus(); // remove if ou want wigets to draw instead
    //
    //setTimeout(Bangle.drawWidgets,0);
    }
    

    Top line is battery, line below is just a 24 h clock mockup for the sunshine time.
    Also its not using the locale yet so you have to adjust time if its not GMT.

    You can delete these things and uncomment the part to for the widgets.
    I probably have to make two versions for this.


    1 Attachment

    • 20230502_145958.jpg
  • Nice... piece of art!

    Do you have something that shows the second or half second on certain events, like tapping the screen? For example a growing circle segment starting at 0 seconds, grow up to current second, and then tick for a few more seconds, and then fade away?

  • Its the font that gives a special mood I think.
    A drawback is that it really depends on tge dark theme.

    Nice idea about the sceonds, and no, I havent thought much about seconds yet,
    and now that the screen is updated asynchronically it seems less easy to implement,
    or maybe it could be done with the overlay?
    I havent looked into this yet. Or it needs to be restricted to a smaller area
    so the week doesnt have to be redrawn.

    But probably I will make a different more animated clock with the original
    idea of scaling numbers and vector font anyway.

    Do we need seconds? The other day I was thinking that you can always switch to a
    specialized stop watch or timer if you need them and that they really
    were invented because mechanical clocks needed them to work.

    On the other hand I like the idea of the watch waking up and getting more vivid
    and more slow when it rests.
    Also a contrast between the slow 24h line and moving seconds would be nice.

    I think I ll just have to finish and release a version and then see.

  • Great elaboration... Actually, it could be around the moon... (taking the moon a bit more out of and up from the day stripe, make the day a bit narrower provides the extra pixels for a moon 'lander' to orbit w/ a trace the moon). I understand and agree that the redraw should not be complicated when wanting to remove an element. What I do to remove an element, I have it on a plain background and redraw it with the background color.

    I know that the moon is already pretty small because it has to fit into the day space. Have a 'second pulsing' is just another thing alive when really wanted to see it... it is less for the timing but more for the show and 'feel' a rhythm.

    I did some fancy thing with the 'stopping and jumping/restarting second hand when starting a new minute, like all Swiss Federal Railway clocks do - see Swiss Federal Railway Clock modeled w/ Circular Gauges.

    PS: All kinds of walks of life get involved and conversation titles look a-like: New to Bangle.js and Espruino. Need help with graphics.

  • Right now I am fighting with the Guithub process.
    Most of all I dont understand the part with renaming the png app.js.
    But if I ommit it or use png instead it produces an error
    Also get an error "App has no 'supports' field or its not an array"

  • I think that's a typo in the tutorial. It should be named app-icon.js for the 48x48 pixel icon image that gets stored directly on the bangle watch when it is uploaded from the app loader.

    I'm not sure about the other error.

  • You want your main code to go in app.js and it sounds like you were putting the base64 image data in there instead, so maybe that's where your errors are coming from.

  • thanks. I have this sorted, but still get the error " has no supports field or is no array"

    I also get a warning that app ownweather is also listed as data file for weather.
    Now, I have not listed anything as weather data.
    what I think is that the metadata is maybe incomplete.

  • I also get a warning that app ownweather is also listed as data file for weather.
    Now, I have not listed anything as weather data.

    When the tests are run all apps are checked for errors and warnings, and that warning has been present for some time. It's almost certainly not anything you've done now. :)

    but still get the error " has no supports field or is no array" [...] what I think is that the metadata is maybe incomplete.

    Yes that is probably the problem. If you look at metadata.json in the example app you'll probably work out what's needed. (Specifically line 8 )

    The comprehensive (I believe) list of possible metadata entries is in the BangleApps-repo README.

  • Thanks. I added some more data, didnt use all the options though.

    Its now in my App Loader copy if any feels inclined to check it and give some feedback.
    http://ainegil.github.io/BangleApps/

    Its called "APolynaths Clock" cause thats what it looks like to me

  • I tried it out. My only thought would be to make the full screen version a settings option.
    To implement sunrise and sunset take a look at the code in the sunrise / sunset clock_info app.

    https://raw.githubusercontent.com/esprui­no/BangleApps/master/apps/clkinfosunrise­/clkinfo.js

    (function() {
      // get today's sunlight times for lat/lon
      var sunrise, sunset, date;
      var SunCalc = require("suncalc"); // from modules folder
      const locale = require("locale");
    
      function calculate() {
        var location = require("Storage").readJSON("mylocation.­json",1)||{};
        location.lat = location.lat||51.5072;
        location.lon = location.lon||0.1276; // London
        date = new Date(Date.now());
        var times = SunCalc.getTimes(date, location.lat, location.lon);
        sunrise = times.sunrise;
        sunset = times.sunset;
        /* do we want to re-calculate this every day? Or we just assume
        that 'show' will get called once a day? */
      }
    
  • Thanks much for the example, how to poll this clock info would have been one if ny next questions.
    However there are also some other severe bugs that need to be fixed first:

    1. The screen is not cleared and redrawn properly
      Todo: put everything back in one draw function again
      This is also necessary since some elements overlap occasionally.

    2. day in week is wrong, right niw it shows the date on Tuesday while its actually Sunday.

    3. Probably related: Date of Moon phase change is wrong, and jumping around.
      At the moment the Moon is placed on Sunday while next half Moon should be on Friday

    I think there is a Clock Info module for Moon phase too, and it makes sense to use this instead of an extra calculation since someone interested in this might want install this module anyways and then its also not recalculated too often.

    I dont have much time this week, if someone feels like fixing one if these issues before I find tje time just drop a line here so we dont work on the same thing simulatanousky.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Help with JS please

Posted by Avatar for ga @ga

Actions