and that will give me two different fonts, one large and one small. Let's call those my RAW fonts.
If I also include this:
#define GLCD_OLED_FONT
then I can still get two different sized fonts, but the OLED font is different than the RAW font. Once I use it I'm unable to use the other two RAW fonts. It seems like an either/or decision.
What I'm wondering is if I can use both the RAW font and the OLED font, and switch back and forth between them somehow. Is that possible?
Thanks
Last edit: George Alvarez 2017-12-23
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Stan, actually, that's what I did at the very beginning. It was my maiden effort for GCB... they look very 7 segment-ish, so now I'm shooting for a more polished look.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In case you're interested, this is a slightly modified version. I'm doing a music thing, so I got rid of the sharp and flat accents to the letters, haven't tried this version yet, but you should get the idea.
I might add rounded corners next.
;-----positionvariablesfor7segmentfontDimColPos1,ColPos2,ColPos3,ColPos4,MidPos1,WhichChar,TopLeft,CharWidth,Between,SharpWidth,SharpAdd,v_sharp,v_flat,n_charasByteColPos1=0ColPos2=0ColPos3=0ColPos4=4MidPos1=4WhichChar=0TopLeft=1CharWidth=10Between=5SubLtr(v_seg);Eachlineisasegmentlike7segmentLCD;inorder:;A;FB;G;EC;D;justincludethesegmentsyouwanttolightup;example:GoSubLtr("AFED")willgiveyouaCn_char=v_ctr-1ColPos1=TopLeft+n_char*(CharWidth+Between)MidPos1=TopLeft+6+n_char*(CharWidth+Between)ColPos2=ColPos1+CharWidth'GLCDCLS'GLCDPRINT 0,0,n_char'GLCDPRINT 30,0,ColPos1'Wait 5 s'GLCDCLSForv_inot=1to7IfInstr(v_seg,"A")>0thenLine(ColPos1,0,ColPos2,0)'AIfInstr(v_seg,"B")>0thenLine(ColPos2,0,ColPos2,10)'BIfInstr(v_seg,"C")>0thenLine(ColPos2,10,ColPos2,22)'CIfInstr(v_seg,"D")>0thenLine(ColPos1,22,ColPos2,22)'DIfInstr(v_seg,"E")>0thenLine(ColPos1,0,ColPos1,22)'EIfInstr(v_seg,"F")>0thenLine(ColPos1,10,ColPos1,22)'FIfInstr(v_seg,"G")>0thenLine(ColPos1,10,ColPos2,10)'GIfInstr(v_seg,"M")>0thenLine(MidPos1,12,ColPos2,12)'HALF OF G SEGMENT GNextv_inotEndSub
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That is brill. They are graphic displays and seems a waste just to use text.
Drawing chars with line and moving the x,y start and redrawing a few times makes 3D looking chars.
Get your moneys worth from the little displays or stick to 2 line x 16 char boring displays :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In my code, I choose one of two sizes for the font I use:
and that will give me two different fonts, one large and one small. Let's call those my RAW fonts.
If I also include this:
then I can still get two different sized fonts, but the OLED font is different than the RAW font. Once I use it I'm unable to use the other two RAW fonts. It seems like an either/or decision.
What I'm wondering is if I can use both the RAW font and the OLED font, and switch back and forth between them somehow. Is that possible?
Thanks
Last edit: George Alvarez 2017-12-23
It is an either or for the two font set you have been using... but, you can add you own fonts and lots more.
See https://sourceforge.net/p/gcbasic/blog/2017/09/create-your-own-oled-characters-on-your-glcd-noreplyinsfnet/
The Great Cow BASIC traditional fonts are scalable - just changed the font size.
Great Cow BASIC has other font support BigPrint and BigChar that can imported from other libaries.
With Great Cow BASIC you can add you own fonts - https://sourceforge.net/p/gcbasic/discussion/629990/thread/ed588c38/
Lots of options - you only have a little display and I think a number of these willl create very large fonts, and, some will work very nicely.
Totally irrellevent but you could draw the chars with lines and circles. It would look interesting at least...sorry, just a thought
Hi Stan, actually, that's what I did at the very beginning. It was my maiden effort for GCB... they look very 7 segment-ish, so now I'm shooting for a more polished look.
In case you're interested, this is a slightly modified version. I'm doing a music thing, so I got rid of the sharp and flat accents to the letters, haven't tried this version yet, but you should get the idea.
I might add rounded corners next.
That is brill. They are graphic displays and seems a waste just to use text.
Drawing chars with line and moving the x,y start and redrawing a few times makes 3D looking chars.
Get your moneys worth from the little displays or stick to 2 line x 16 char boring displays :)
I found this too, just wanted to keep it all in one place.
SSD1306 fonts
Google: ssd1306 font generator
Last edit: George Alvarez 2017-12-24
another http://colemanair.us/vp_asp/scripts/articles/OLEDandLCD.htm