Amateur OS Dev - More "Generic" Fonts (in C)
Changing printing to work with more generic font sizes (or at least an 8x16 and 10x18 one), a change fonts command, and some print_char() refactoring with memcpy to speed up scrolling at the end.
Assuming bdf font files only, so not really generic in that aspect, that have been converted to this OS's font format.
One day I won't sound and be tired. That day is not today.
Git repos for this OS:
Sourcehut: https://git.sr.ht/~queso_fuego/quesos
Github mirror: https://github.com/queso-fuego/amateuros
OS Dev playlist:
https://www.youtube.com/playlist?list=PLT7NbkyNWaqajsw8Xh7SP9KJwjfpP8TNX
Source code as of the end of this video:
https://git.sr.ht/~queso_fuego/amateur_os_video_sources/tree/master/item/37_generic_fonts
Bitmap fonts github repo (termu16n here):
https://github.com/Tecate/bitmap-fonts/blob/master/bitmap/terminus-font-4.39/ter-u16n.bdf
Notes:
- There's no need to define FONT_WIDTH and FONT_HEIGHT in editor.c, as it already has include print_types. I removed those lines after recording.
- There is some echo/reverb since the office is all walls and floors, may need to get acoustic panels or a rug or open the closet and put
coats in there or something. I could record with the door open so it doesn't echo at all, and will try to do so when there aren't other people home. I can also be louder then.
Next video ideas:
Software & hardware interrupts, setting up the IDT and PIC, and maybe syscalls.
- Let me know if there's anything specific you'd like to see
Outline:
0:00 - Font file "header"
2:15 - Add font width & height to print_types.h, cursor.h, and editor.c
10:47 - Add new font files, set default font to termu16n
19:13 - Change print_char() for generic font width/height
33:16 - chgFont command
50:47 - Change cursor.h printing
58:18 - Various fixes and debugging to make everything work again
1:11:50 - Improve text scrolling with memcpy, & other refactors
1:30:30 - Coming up & Outro
Software used:
VMware Workstation Player - https://www.vmware.com/products/workstation-player/workstation-player-evaluation.html
openBSD - https://www.openbsd.org/
qemu - https://www.qemu.org/
vim - https://www.vim.org/
clang - https://clang.llvm.org/
davinci resolve - https://www.blackmagicdesign.com/products/davinciresolve/
OBS Studio - https://obsproject.com/
Peripherals:
Camera: Sony ZV-1, Elgato Camlink 4k
Microphone: Shure SM7B, Cloudlifter CL-1, Focusrite Scarlett Solo
Keyboard: HHKB Pro Hybrid Type S, white/blank keycaps
Mouse: Logitech M590
Contact:
email - fuegoqueso@gmail.com
twitter - @Queso_Fuego
twitch - https://www.twitch.tv/queso_fuego
Thoughts/Notes/Suggestions/Other - Drop a message in the video comments, twitter, or email
Updates for these videos and other things will be on twitter or maybe the YouTube channel community tab, or mailing lists. If I remember.
Credits:
Music from https://incompetech.com:
"Your Call" Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 4.0 License
http://creativecommons.org/licenses/by/4.0/
#osdev #programming #fonts