Search found 51 matches

by v923z
Thu Jan 17, 2019 7:12 pm
Forum: Programs, Libraries and Tools
Topic: fast font rendering on graphical displays
Replies: 9
Views: 689

Re: fast font rendering on graphical displays

To throw in some comments on my solution. The Writer class for monochrome displays uses bit blitting which is done in C. Unfortunately the framebuf blit method has no means of mapping a monochrome font onto a colour framebuf. This has been discussed but was never implemented. I agree, framebuf woul...
by v923z
Wed Jan 16, 2019 7:02 am
Forum: Programs, Libraries and Tools
Topic: fast font rendering on graphical displays
Replies: 9
Views: 689

Re: fast font rendering on graphical displays

Graphics requires the most amount of RAM out of about anything you r likely to do in Micro-Python. I could use an approach on ESP32 that I couldn't use on ESP8266 because of the fact ESP32 has more RAM than ESP8266 Updating 1 pixel at a time to the screen is super super slow. Being able to create a...
by v923z
Tue Jan 15, 2019 9:18 am
Forum: Programs, Libraries and Tools
Topic: fast font rendering on graphical displays
Replies: 9
Views: 689

Re: fast font rendering on graphical displays

One thing I have clean forgotten to mention: for an extra factor of approx. 4 in render time, one can implement aliasing, without any overhead on the RAM. (The transfer times will not be affected.) I don't know, whether this is relevant/interesting or not.
by v923z
Tue Jan 15, 2019 9:08 am
Forum: Programs, Libraries and Tools
Topic: fast font rendering on graphical displays
Replies: 9
Views: 689

Re: fast font rendering on graphical displays

Hi Scott, Thanks for dropping by. Here are a couple of comments. Hi Matt and Zoltán, I'm curious about your use cases for text and in what way speed matters. Is it initial time to display a static value or rapidly changing values like a terminal while compiling? This issue is not so much about the s...
by v923z
Mon Jan 14, 2019 8:58 pm
Forum: Programs, Libraries and Tools
Topic: fast font rendering on graphical displays
Replies: 9
Views: 689

fast font rendering on graphical displays

Hi all, I would like to refer to two postings on this board, related to efficiently using graphical displays, and in particular, rendering fonts. One of them is quite old, in which @pythoncoder was circulating his idea of storing fonts in the flash https://forum.micropython.org/viewtopic.php?f=3&t=2...
by v923z
Fri Nov 30, 2018 7:18 am
Forum: Development of MicroPython
Topic: including math functions in module
Replies: 8
Views: 434

Re: including math functions in module

The general tendency is to make things STATIC unless they need to be shared. From a maintenance standpoint a function that is declared STATIC can be changed arbitrarily and you only need to look within the same source file to find all of the "users" of that function. If a function is made public, t...
by v923z
Thu Nov 29, 2018 9:30 pm
Forum: Development of MicroPython
Topic: including math functions in module
Replies: 8
Views: 434

Re: including math functions in module

Well, if you were going to expose the functions at a C level, you would probably factor them out from the existing functions, since the existing functions take mp_obj_t's rather than floats, so you'll wind up doing a bunch of conversions. For such a small function, it's quite possibly cheaper (both...
by v923z
Thu Nov 29, 2018 6:59 am
Forum: Development of MicroPython
Topic: including math functions in module
Replies: 8
Views: 434

Re: including math functions in module

On the pyboard, they're exposed to python in the math module: MicroPython v1.9.4-479-g828f771e3-dirty on 2018-09-12; PYBv1.1 with STM32F405RG Type "help()" for more information. >>> import math >>> math.radians(90) 1.570796 >>> math.degrees(1.570796) 89.99998 >>> Those functions aren't exposed to C...
by v923z
Wed Nov 28, 2018 9:45 pm
Forum: Development of MicroPython
Topic: including math functions in module
Replies: 8
Views: 434

Re: including math functions in module

This is definitely true, thanks! However, there are still degrees and radians that are part of modmath.c, and I don't think they are exposed anywhere.
by v923z
Wed Nov 28, 2018 8:57 pm
Forum: Development of MicroPython
Topic: including math functions in module
Replies: 8
Views: 434

including math functions in module

Hi all, I would like to include a couple of functions from math in my C module. I can compile the module all right, but I get a linker error like so test.c:(.text.test_vec+0x5e): undefined reference to `acos' I have tried to add the file to SRC_LIBM in Makefile, but that didn't help (I got an other ...