|
Fast enough now.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
|
“enough”
The difference between engineering and design!
|
|
|
|
|
It all kind of runs together for me but also I know what you mean.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
Surprising what Copilot (AI integrated in vs Code) does:
In my team we buy cake every Wednesday. Duties circulate based on "hmm feels like my turn today". I bit bored I wrote a Python snippet that printed a "100% fair" calendar. Still bored... I wanted to add a fun license. I started with a modified MIT license (MIT has no restrictions).
# CAKE License
# Copyright (c) 2024 - 3024 Adam .......
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software with the sole restriction
at this point Copilot, without being prompted, continued:
that the person who uses the Software
# must provide a cake to the author of the Software. The cake must be of the
# chocolate variety and must be delivered to the author in person. The cake
# must be accompanied by a glass of milk.
"If we don't change direction, we'll end up where we're going"
|
|
|
|
|
So, it turns out that the cake is not a lie?
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
Cake even AI understands it.
To err is human to really elephant it up you need a computer
|
|
|
|
|
I like the fact that AI recognizes chocolate as the best flavor of cake. But milk goes with cookies.
I’ve given up trying to be calm. However, I am open to feeling slightly less agitated.
I’m begging you for the benefit of everyone, don’t be STUPID.
|
|
|
|
|
|
Happy birthday to you!
Happy Birthday to you!
Happy Birthday @Brisingr_Aerowing
Happy Birthday to Youuuuuuuuuu!
Have a good one:
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Happy Birthday
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Me too, Me too!!!
Happy Birthday.
Have lots of them, they are good for you health.
>64
It’s weird being the same age as old people. Live every day like it is your last; one day, it will be.
|
|
|
|
|
Wordle 1,154 3/6
⬜🟨⬜🟨⬜
🟨⬜🟩⬜🟩
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 1,154 3/6*
🟨🟩⬜⬜🟩
🟨🟩🟩⬜🟩
🟩🟩🟩🟩🟩
Lot of options going on there!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
🟨🟩🟩⬜🟩
🟩🟩🟩🟩🟩
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
Wordle 1,154 6/6*
⬜⬜🟩⬜🟩
⬜⬜🟩🟨🟩
⬜🟩🟩⬜🟩
🟨🟩🟩⬜🟩
⬜🟩🟩🟩🟩
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 1,154 3/6
🟨⬛⬛🟨🟩
⬛🟩🟩🟩🟩
🟩🟩🟩🟩🟩
Ok, I have had my coffee, so you can all come out now!
|
|
|
|
|
Wordle 1,154 4/6
⬜⬜⬜⬜🟩
⬜⬜⬜🟨🟩
🟩🟩⬜⬜🟩
🟩🟩🟩🟩🟩
Within you lies the power for good - Use it!
|
|
|
|
|
Wordle 1,154 6/6*
🟨⬛⬛⬛🟩
⬛⬛🟩🟨🟩
⬛🟩🟩⬛🟩
⬛🟩🟩⬛🟩
🟩🟩🟩⬛🟩
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 1,154 5/6
⬜🟨⬜⬜⬜
🟨🟨⬜🟨🟩
🟩🟩🟩⬜🟩
🟩🟩🟩⬜🟩
🟩🟩🟩🟩🟩
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
God I hate it. It took me ages to go from this:
Render before fix[^]
Which was wrong, to this
Render after fix[^]
Still not perfect. The red rectangle is the result of "measuring" the space the text will occupy.
It works great for some fonts, but certain Truetype fonts still aren't quite perfect. It's frustrating the heck out of me.
Why does it have to be such a pain? Between ascent, descent, baseline, line height, line advance, and individual glyph offsets and dimensions it's like CSS for text. WTH?
This code... my god, it's full of corner cases! but it works pretty well at this point.
Excerpt just so you understand how nasty it is.
uint16_t em_width = 0;
uint16_t x_ext = 0, y_ext = 0;
uint16_t x = 0,y=0;
uint32_t cp=0, cp_next=0;
size_t advlen = len;
size_t advlen_next = 0;
const uint16_t lineadv = this->line_advance();
gfx_result res = encoding.to_utf32(sz,&cp,&advlen);
if(res!=gfx_result::success) {
return res;
}
sz+=advlen;
len-=advlen;
if(*sz) {
advlen_next = len;
res = encoding.to_utf32(sz,&cp_next,&advlen_next);
if(res!=gfx_result::success) {
return res;
}
sz+=advlen_next;
len-=advlen_next;
y_ext = lineadv;
} else {
out_area->width = 0;
out_area->height = 0;
return gfx_result::success;
}
font_glyph_info em_gi;
uint16_t xo, cw;
bool cached;
int tail;
while(1) {
font_glyph_info gi;
switch(cp) {
case '\t':
if(em_width==0) {
cached = false;
if(cache!=nullptr) {
if(gfx_result::success==cache->find('M',0,&em_gi)) {
cached = true;
}
}
if(!cached) {
res=on_measure('M',0,&em_gi);
if(res!=gfx_result::success) {
return res;
}
if(cache!=nullptr) {
cache->add('M',0,em_gi);
}
}
em_width=em_gi.advance_width;
}
cw = em_width*tab_width;
x=((x/cw)+1)*cw;
if(x>=max_width) {
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
modified 16-Aug-24 4:03am.
|
|
|
|
|
Perhaps Sanskrit would be simpler.
|
|
|
|
|
It probably would be. I think it's effectively monospaced.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
You keep pointing out how you are working on a memory-constrained, embedded system so why in the wide world of sports are you supporting TrueType fonts?
JUST SAY NO!
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|
|
For many reasons.
A) It can be smaller to load a 30KB TTF font like "Telegrama" over at fontsquirrel.com than it would be to render it all out to anti-aliased alpha transparency maps with the requisite kerning tables. Particularly if you need it in several sizes
B) I work with design teams that produce content in a particular style and want it replicated as closely as possible. It's fast for me to just embed a proper TTF from somewhere like fontsquirrel - or even one they give me rather than having to try to prune and create a specific VLW fontset
C) Although this isn't as true of my professional projects, my hobby projects often target multiple pieces of hardware with different display resolutions. TTF scales. Fixed raster fonts do not. And I *have* had to do this professionally a few times when we hadn't finalized the hardware yet.
D) ARM CPUs have pretty decent floating point, and can handle my TTF and SVG rendering with relative ease. The ESP32 struggles a bit, but it's more of a hobbyist chip anyway. Edit: I should add that even then it's very usable in many situations and I employ it several of my hobby projects.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
modified 16-Aug-24 13:47pm.
|
|
|
|