mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-08 04:56:43 +00:00
Rust 1.91 (or perhaps, more accurately llvm?) changed how link ordering works. Previously, modules would be linked in the order they were referenced (e.g. pub mod b; pub mod a; would result in b being at a lower address than a in the resulting binary). However, apparently, this has changed and now someone in their infinite wisdom decided that modules should be alphabetized before linking. I'm really not sure why the arbitrary ordering of the human alphabet is superior to any other system, and also, if you really wanted things alphabetized, you could just alphabetize them in your reference order. Previously the fonts were laid out in a way that tried to minimize cache thrashing by co-locating certain sets of fonts together. Now they are just sprayed around through the arbitrary and not terribly useful permutation funtion of the english alphabet. Rant off. This changes the specification of the fonts in the code generator to be in alphabetical order, making the screen once again legible. |
||
|---|---|---|
| .. | ||
| codegen | ||
| src | ||
| Cargo.toml | ||
| LEGAL.md | ||
| LICENSE-APACHE | ||
| LICENSE-MIT | ||
| README.md | ||
blitstr2
This code is vendored in from https://github.com/samblenny/blitstr2 with permission from the author.
multi-lingual string blitter for 1-bit monochrome (sequel to blitstr)
Maintenance Notes
- Font files are regenerated by running
ruby config_editor.rbfollowed bygo run main.go --writein the/src/blitstr2/codegendirectory relative to this README.md file - The Go files have been modified to generate the necessary templates for the loader/kernel split of the font tables. The main bit of manual "glue" is at the top of
main.rsinside themap_fonts()routine, where theAtomicU32pointers that hold the final linked location of the font maps are initialized at boot. - Font sources are located in
src/blitstr2/codegen/src_data, along with various indices and codepoints. - Most font sources were generated by https://github.com/samblenny/hd1b_other
- The
latinsets that have a more manual process consisting of taking a screenshot of ResEdit's KCHR screen on a Mac OS 7 emulator via https://archive.org/details/mac_MacOS_7.0.1_compilation and massaging the result into a usable sprite sheet. The only two native font sizes that look good ane 9 and 12 point, which gives a coverage of 9, 12, 18 and 24 point sizes (with pixel doubling).
What's New
Compared to the original version of blitstr, blitstr2:
- Supports more languages
- Uses 16x16 pixel size for CJK glyphs instead of 32x32
- Makes it easier for calling code to calculate size of rendered strings
- Ignores multi-codepoint grapheme clusters for modern emoji (instead, there is limited support for old-school monochrome bitmap emoji)
- Focuses on an API to look up glyphs from just one typeface at a time
License
Source code for blitstr2 is dual licensed under the terms of Apache 2.0 or MIT, at your option.
Glyph bitmaps included with blitstr2 have their own copyrights and licenses (OFL-1.1, public domain, Japanese equivalent of public domain).
See LEGAL.md for copyright and license details on embedded glyph bitmaps.