Enhance the system font (8x16)

All that makes Kolibri beautiful outside while we are working inside
  • My current proposal is to move the binary blob into the source file, so it can be annotated and facilitate editing. So in `font_.asm` the file import would be replaced directly:

    Code: Select all

    Font_8x16:
    
    ; #000 Other  '␀' (U+0000 Null)
      db 2 dup $FF
      db $FF  ; ▓▓▓▓▓▓▓▓
      db $FF  ; ▓▓▓▓▓▓▓▓
      db $FF  ; ▓▓▓▓▓▓▓▓
      db $FF  ; ▓▓▓▓▓▓▓▓
      db $FF  ; ▓▓▓▓▓▓▓▓
      db $FF  ; ▓▓▓▓▓▓▓▓
      db $FF  ; ▓▓▓▓▓▓▓▓
      db $FF  ; ▓▓▓▓▓▓▓▓
      db $FF  ; ▓▓▓▓▓▓▓▓
      db $FF  ; ▓▓▓▓▓▓▓▓
      db $FF  ; ▓▓▓▓▓▓▓▓
      db $FF  ; ▓▓▓▓▓▓▓▓
      db 2 dup $FF
    
    ; #001 Symbol '☺' (U+263A White Smiling Face)
      db 2 dup $FF
      db $83  ; ▓░░░░░▓▓
      db $7D  ; ░▓▓▓▓▓░▓
      db $55  ; ░▓░▓░▓░▓
      db $55  ; ░▓░▓░▓░▓
      db $7D  ; ░▓▓▓▓▓░▓
      db $7D  ; ░▓▓▓▓▓░▓
      db $45  ; ░▓░░░▓░▓
      db $6D  ; ░▓▓░▓▓░▓
      db $7D  ; ░▓▓▓▓▓░▓
      db $7D  ; ░▓▓▓▓▓░▓
      db $83  ; ▓░░░░░▓▓
      db $FF  ; ▓▓▓▓▓▓▓▓
      db 2 dup $FF
    
    I welcome any feedback!
    1. What is the KOS preferred hexadecimal format `0xFF` or `$FF`?
    2. Are 2x spaces the common indent used for asm source?
    3. I believe that FASM can handle source file comments in UTF-8....?
    4. May I delete the commented-out code for handling 'font_16x32.fon' ... this seems dead?
    5. Should I add my name to the Author's copyright in the header...? I don't really want to claim any copyright(!) but the date needs updating...
  • ace_dent wrote: Tue Oct 03, 2023 3:51 pm Can I confirm, the bitmap data is stored in this binary file: `programs/develop/libraries/fontslib/trunk/font_8x16.fon` ...?
    Pathoswithin, where is the source of /kernel/trunk/gui/charUni.mt and how to compile it to charUni.mt?
    ace_dent wrote: Tue Oct 03, 2023 6:31 pm 1. What is the KOS preferred hexadecimal format `0xFF` or `$FF`?
    Up to you, there is no style guide on hex numbers.
    ace_dent wrote: Tue Oct 03, 2023 6:31 pm 2. Are 2x spaces the common indent used for asm source?
    No, default indent is 8 spaces. It is strictly enforced for the kernel. For most of the other sources this is advice only.
    ace_dent wrote: Tue Oct 03, 2023 6:31 pm 3. I believe that FASM can handle source file comments in UTF-8....?
    Sure.
    ace_dent wrote: Tue Oct 03, 2023 6:31 pm 4. May I delete the commented-out code for handling 'font_16x32.fon' ... this seems dead?
    As a rule of thumb, don't remove any, even dead, code you're not maintaining. There might be a chance the code is somebody's work in progress.
    ace_dent wrote: Tue Oct 03, 2023 6:31 pm 5. Should I add my name to the Author's copyright in the header...? I don't really want to claim any copyright(!) but the date needs updating...
    I'm not really into legal stuff, but here is my opinion. Copyright is not about your desire. If you consider your contribution a non-trivial one, then add your copyright to the header. Unfortunately, I'm not aware of a formal procedure to decide if a particular contribution is a trivial one.
  • Thanks @dunkaist! When you are searching the sourcecode in the dark, there seems to be a lot of vestigial font work... Ideally there should be some guide in the wiki... :-)

    Again the `x.mt` format seems to be raw binary, storing 8x16 bitmaps as Horizontal Least Significant Bit first (HLSB). Bitmaps are horizontally reflected, as they must get rendered as MSB at some point(?)... It seems there is some offset as the alignment is off? A few bytes for ...? The rendering code `font.inc` is too sparsely commented for me to understand :-/
  • Oh dear...
    The compilation programm is for windows, but it's simple as a club.
    http://board.kolibrios.org/viewtopic.ph ... 2&start=30
  • Pathoswithin wrote: Wed Oct 04, 2023 6:49 pm ... it's simple as a club ...
    Thank you for the link and info. Would you like to keep using the BDF format?... or can I to port the data to an asm `.inc`, which may be used without further tools...?
    Do you know where the smaller (6x9px) system font is...?

    For fun: https://unifoundry.com/unifont/index.html

    Update: Pathoswithin looking at the source material(?)... seems the design already had these variations: https://people.mpi-inf.mpg.de/~uwe/misc ... iants.html
  • ace_dent wrote: Wed Oct 04, 2023 7:29 pm Do you know where the smaller (6x9px) system font is...?
    The smaller fonts are in /programs/other/font_conv. Also, look at /contrib/other/font_conv
  • dunkaist wrote: Thu Oct 05, 2023 12:32 pm ... /programs/other/font_conv...
    Thanks. The human readable definitions are similar to this modern YAFF format.
    I may be confused by the directory structure... is this font part of the core system...? Can you confirm the small and big font is available in the kernel / as standard ?
  • Yes, fonts' sources in /programs/other/font_conv should be the original ones. You can verify this by producing binaries and comparing them. The reason why kernel directory has only binaries is not to require font_conv for building the system. Of course, we can move fonts' sources to /kernel/trunk and compile them as other source files.

    Indeed, YAFF is similar to our font format. However, we can build our fonts without python :)
  • Who is online

    Users browsing this forum: No registered users and 7 guests