XXIIVV
Proportional Fonts in Uxn
Proportional Fonts in Uxn

UFX is a 1-bit proportional font format for the Uxn system.

The UF* file begins with 256 bytes corresponding to the width of each of the 255 characters in the font (in pixels), followed by the pixel data in the .icn format for each character.

ExtensionSize(px)Filesize
.uf18x8(1 tile)0x0900
.uf216x16(4 tiles)0x2100
.uf324x24(9 tiles)0x4900

You will find this filetype in the Uxn ecosystem, namely in Left. Uf2 fonts can be viewed and edited with Turye. The drawing order goes vertically as to be able to skip 2 draw calls for narrow characters if needed:

02
13

The uf2 character drawing routine in Uxntal is about 50 bytes, with the screen's auto byte set to #15:

@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

Incoming: turye adelie