UFX is a proportional font format.
UFX file begins with 256 bytes corresponding to the width(in pixels) of each of the 256 glyphs in the spritesheet, followed by the pixel data in the .icn format for each character.
The pixel data for each glyph is stored in a series of 8x8 tiles, the drawing order goes vertically as to be able to skip extra draw calls for narrow characters if needed:
A naive uf2 character drawing routine in Uxntal is about 50 bytes, with the screen's auto byte set to
@draw-uf2 ( text* -- ) #15 .Screen/auto DEO &while LDAk #20 SUB #00 SWP DUP2 #50 SFT2 ;font/glyphs ADD2 .Screen/addr DEO2 ;font ADD2 LDA #00 SWP .Screen/x DEI2 ADD2 #01 .Screen/sprite DEOk DEO .Screen/x DEO2 INC2 LDAk ,&while JCN POP2 JMP2r
The empty pixel data of the first 32 invisible characters are typically removed. You will find this filetype in the Uxn ecosystem, namely in Left. Uf2 fonts can be viewed and edited with Turye.
Incoming: turye adelie potato