Custom font size on GLCD (Almost solved)
Moderator: Benj
-
- Posts: 161
- Joined: Sun Feb 25, 2007 10:56 am
- Location: bucharest, romania
- Has thanked: 90 times
- Been thanked: 34 times
- Contact:
Custom font size on GLCD (Almost solved)
Hi all!
There is a way to print very large font (only numbers, see picture) , on a GLCD 128x64 oled i2c ssd1306?
Thank you!
There is a way to print very large font (only numbers, see picture) , on a GLCD 128x64 oled i2c ssd1306?
Thank you!
- Attachments
-
- big_font.jpg (23.59 KiB) Viewed 12089 times
Last edited by bercioiu on Tue May 09, 2017 10:42 pm, edited 2 times in total.
-
- Posts: 161
- Joined: Sun Feb 25, 2007 10:56 am
- Location: bucharest, romania
- Has thanked: 90 times
- Been thanked: 34 times
- Contact:
Re: Custom font size on GLCD
What changes need to be made to modify an existing font? I tried to print in lines and points but it's almost impossible, there are over 8000 pixels ...
Thank you!
Thank you!
-
- Posts: 161
- Joined: Sun Feb 25, 2007 10:56 am
- Location: bucharest, romania
- Has thanked: 90 times
- Been thanked: 34 times
- Contact:
Re: Custom font size on GLCD
Understand from your answer that there is no way to change the existing font?
Do you imagine how many x,y (rectangle) I have to put for all 4 digits?
Do you imagine how many x,y (rectangle) I have to put for all 4 digits?
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: Custom font size on GLCD
From your image it looks like you want 7 segment digits?
In which case you could create a macro that draws a digit with 7 rectangles?
So the macro would have as parameters, the digit to display and the offset/position on screen.
In which case you could create a macro that draws a digit with 7 rectangles?
So the macro would have as parameters, the digit to display and the offset/position on screen.
-
- Posts: 161
- Joined: Sun Feb 25, 2007 10:56 am
- Location: bucharest, romania
- Has thanked: 90 times
- Been thanked: 34 times
- Contact:
Re: Custom font size on GLCD
I tried but there is a problem, how do I delete the previous segments to print the new number?
VIDEO:
https://youtu.be/yeRX73yWdjY
VIDEO:
https://youtu.be/yeRX73yWdjY
Last edited by bercioiu on Mon May 08, 2017 10:13 pm, edited 3 times in total.
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: Custom font size on GLCD
Several solutions:
1) Clear the screen and redraw everything,
2) Draw the segment using the background colour.
1) Clear the screen and redraw everything,
2) Draw the segment using the background colour.
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
-
- Posts: 161
- Joined: Sun Feb 25, 2007 10:56 am
- Location: bucharest, romania
- Has thanked: 90 times
- Been thanked: 34 times
- Contact:
Re: Custom font size on GLCD
Thank you for your reply!
1) In the upper link is a video with clear screen.
2) Can not draw rectangles with the outline of the background color
1) In the upper link is a video with clear screen.
2) Can not draw rectangles with the outline of the background color
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: Custom font size on GLCD
You should be able to use macros 'SetBackgroundColour' and 'SetForegroundColour' to change the drawing colours before calling the DrawRectangle macro.
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
-
- Posts: 161
- Joined: Sun Feb 25, 2007 10:56 am
- Location: bucharest, romania
- Has thanked: 90 times
- Been thanked: 34 times
- Contact:
Re: Custom font size on GLCD
I think I'll quit. I'll finish the project with Arduino. With Arduino I can do any fonts that I want...
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Custom font size on GLCD
That way you won't get the sense of achievement when it's all workingI think I'll quit. I'll finish the project with Arduino. With Arduino I can do any fonts that I want...
It sounds like your very close. Post your program so far and we will be able to help.
Variable fonts is something we are considering but getting them right is tricky. We could however offer more scaling options without too much effort.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 161
- Joined: Sun Feb 25, 2007 10:56 am
- Location: bucharest, romania
- Has thanked: 90 times
- Been thanked: 34 times
- Contact:
Re: Custom font size on GLCD
I'm getting closer
The refresh of the segments is a little weak, but given that they are "drawn" I will live with them ...
Video"
https://www.dropbox.com/s/1mhoync2xy5kf ... 3.mp4?dl=0
The refresh of the segments is a little weak, but given that they are "drawn" I will live with them ...
Video"
https://www.dropbox.com/s/1mhoync2xy5kf ... 3.mp4?dl=0