this post was submitted on 17 Sep 2023
33 points (94.6% liked)
Transprogrammer
830 readers
1 users here now
A space for trans people who code
Matrix Space:
- #transprog:socki.moe
Rules:
- Don't be a meanie
- no *ism
- consider the feelings of somebody who might read what you say
- Don't shitpost
- Keep it wholesome
- Must be trans / programming related
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Actually, technically speaking, that PNG is a preview image. It's ALL the characters of the font laid out in their Unicode positions in 16x16 cells from U+0000 to U+10FFFF
Also I was asleep when Luna replied, and I was really tired when I said I didn't make a preview image. I actually DID, but it's the TTF2PNG build of the font that was generated in a special way that makes it so that the image can be read sequentially from U+0000 to U+10FFFF in 16x16 cells to get the character you want, with no need for a definition file that shows where a codepoint is in the image. Also, it means that it also serves as a 1:1 preview that is properly mapped too.
As for why the image is "black", it has to do with the fact that to store U+0000 to U+10FFFF in 16x16 cells in a way compatible with sequential reading it requires that the sheet be 4096x65536. Blink engine browsers as well as Samsung's Gallery app have no problems viewing it (as well as some others), but there are also quite a few viewers that really hate this size. Oh, and the PNG is in 1bpp Indexed Color mode to get it small enough to fit in the 1MiB figure used by the 3DO console's font chip size (Apparently the 3DO had the largest font chip.) Basically, the TTF2PNG build is its own preview image, but it may be difficult to display on some viewers. Sorry for any confusion.
Please don't hate me.
Firefox wasn't doing good with displaying that.
No need to hate you for this.