HN user

skrellm

5 karma
Posts1
Comments7
View on HN

Small correction, you're wrong about the details.

You say ttf and otf are the same, but that's not true, one utilizes quadratic curves, the other cubic curves. Also one is patented, the other isn't (most notably its bytecode vm).

Also, you say curve and spline is the same. They are not. Spline is a series of curves where you don't store the starting points, because those are the same as previous curve's ending points. So a spline requires less space to store than a list of the same curves, hope this makes sense to you.

I've also implemented a very fast font renderer, which supports bitmap, pixmap, quadratic and cubic curves, even mixed. I took a different path though: I've designed a very efficient font format, and provided a tool to convert ttf, otf, ps, etc. fonts into that format. This way the computational heavy parts are done beforehand, and the renderer can be small and fast (it's just a single header library, with source of 32k).

https://gitlab.com/bztsrc/scalable-font2

Using GPU for rasterizing is a good idea, but my font renderer is extremely portable so it's deliberately dependency-free and uses CPU integer arithmetic only. So it had a different design goal than yours, but still, it might be useful to study and it might give you ideas on further optimizations.

Hi dev,

Warning: This overwrites data starting at sector 64! Use a dedicated blank USB.

This would be much more usable if you'd put a file system on the USB stick with a sufficiently large, empty, bianco file.

Note, you don't need to implement a file system driver. Just create it with a big enough file and use that file's starting sector instead of 64. You could even update the file's size with the data written (just one more sector write, and again, you don't need to interpret the file system, just patch one integer in a sector).

I'd recommend ext2 (FAT is not good, because it limits files to 2G, and exFAT is in patent hell). Create with mkfs.ext, add a large file with dd, then save the data as a bunch of "db" lines into your asm source. You'd then assemble the file system along with stage1/2 without the need to interpret what you're writing.

Oh, one more thing: some BIOS checks the first bytes of the boot sector as well (not just the last two bytes), so you should start your boot sector with a short jmp and a nop. Also it's not guaranteed that direction flag is cleared, add a cld after cli.

To get some ideas, here's a boot sector that loads an EFI PE/COFF executable from a FAT file system (without interpreting the fs), sets up long mode and executes it:

https://gitlab.com/bztsrc/easyboot/-/blob/main/src/boot_x86....

(Notes: written for the flatassembler, which uses a very very similar Intel syntax like nasm, and the 2nd stage EFI executable is written in C very carefully so it doesn't matter if it's loaded by this boot sector on BIOS or by the UEFI firmware, the same binary just works everywhere.)

As for developing EFI apps, I don't use EDK2, because it's messy and bloated, instead I've written my own UEFI SDK: https://gitlab.com/bztsrc/posix-uefi it's much easier to use, you might find it useful too.

[dead] 1 month ago

The skrellm is a single process stack of system monitors which supports applying themes to match its appearance to your window manager, Gtk, or any other theme. It displays these system resource monitors on your desktop.

https://bztsrc.gitlab.io/skrellm/

It is a minimal, multiplatform rewrite of gkrellm, because my distro dropped glib2 and gtk2 support, so I can't compile gkrellm any more (gtk3 rewrite is just a myth, couldn't find it on the official site), and none of the panels my DE has was as sophisticated as I'm used to with gkrellm.

I've checked multiload-ng (doesn't compile) and Conky (too bloated and doesn't compile either, couldn't set up its build env so many dependencies) which didn't work, so I had to implement my own truly lightweight version.

SKrellM is free and Open Source, licensed under GPLv3+, less than 400K single portable binary, hope you like it!