1. 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.
    Dismiss Notice

HEX or BIN to make FONTS etc

Discussion in 'Oshonsoft' started by camerart, Dec 14, 2017.

  1. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,354
    Likes:
    650
    Location:
    Ex Yorks' Hants UK
    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
     
  2. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,833
    Likes:
    11
    Location:
    Dorset UK.
    Morning E,
    Is this using system using the technique outlined on #205, on the 5110 thread?
    C
     
  3. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,354
    Likes:
    650
    Location:
    Ex Yorks' Hants UK
    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
     
  4. dave miyares

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    2
    Likes:
    -10
  5. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,833
    Likes:
    11
    Location:
    Dorset UK.
    Hi E,
    It's a bit advanced for me, perhaps later, thanks.
    C.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice