• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

HEX or BIN to make FONTS etc

ericgibbs

Well-Known Member
Most Helpful Member
#21
hi, C,
Downloaded your big fonts text.;)

I have been building some symbol fonts.
eg: smallish triangles, filled circles and pointers, ideal graphics pointers etc.
Uses a Proc symbol(x0,y0, z0, colour.bg col)
'the z0 has a decimal value from 0 thru 9, to select the symbol type.

E
 

camerart

Active Member
Thread starter #22
hi, C,
Downloaded your big fonts text.;)

I have been building some symbol fonts.
eg: smallish triangles, filled circles and pointers, ideal graphics pointers etc.
Uses a Proc symbol(x0,y0, z0, colour.bg col)
'the z0 has a decimal value from 0 thru 9, to select the symbol type.

E
Morning E,
Is this using system using the technique outlined on #205, on the 5110 thread?
C
 

ericgibbs

Well-Known Member
Most Helpful Member
#23
hi C,
It is similar, for the 5110, you do not need the colours.
E.

Proc drawsymb(x0 As Byte, y0 As Byte, z0 As Byte, color As Word, bg As Word)
Dim cntr As Byte
Dim symbfont As Word
Dim symhi As Byte

sy = y0
sx = x0
symval = z0

Gosub sym2tft 'get font

For fnt1 = 0 To 10 ''symb font width '11
sy = y0
symbfont = sym1(fnt1) 'get all bit/bytes in symb font sequence

symhi = symbfont.HB
For cntr = 3 To 0 Step -1
If symhi.cntr = 1 Then
Call setpixel(sx, sy, color)
sy = sy + 1
Else
Call setpixel(sx, sy, bg)
sy = sy + 1
Endif
Next cntr

symhi = symbfont.LB
For cntr = 7 To 0 Step -1
If symhi.cntr = 1 Then
Call setpixel(sx, sy, color)
sy = sy + 1
Else
Call setpixel(sx, sy, bg)
sy = sy + 1
Endif
Next cntr
sx = sx + 1
Next fnt1

End Proc
 

EE World Online Articles

Loading

 
Top