Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 03:44 27 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : # big font

Author Message
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 351
Posted: 07:29pm 10 Dec 2023
Copy link to clipboard 
Print this post

Hi there,

does anyone know how to read the bits (pixels) from the fonts in picomite? For example to print big characters with "#" (like on printers in the past ...) or to display a letter on the 8x8led ;-)


#     #  #     #  ######      #      #####   ###   #####  
##   ##  ##   ##  #     #    # #    #     #   #   #     #
# # # #  # # # #  #     #   #   #   #         #   #      
#  #  #  #  #  #  ######   #     #   #####    #   #      
#     #  #     #  #     #  #######        #   #   #      
#     #  #     #  #     #  #     #  #     #   #   #     #
#     #  #     #  ######   #     #   #####   ###   #####  
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6098
Posted: 07:37pm 10 Dec 2023
Copy link to clipboard 
Print this post

If your display is suitable,
Print the text to the display then use the PIXEL function to read each pixel.

Jim
VK7JH
MMedit   MMBasic Help
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 896
Posted: 10:12pm 10 Dec 2023
Copy link to clipboard 
Print this post

MM.INFO(FONT ADDRESS n) Returns the actual address of the memory location containing the start of the binary data defining FONT n

Then PEEK(BYTE addr%) to access the data.

The data looks like this. First four byte define the fontwidth,fontheight,first charcter in data, number of characters in font , the data then follows.


const unsigned char F_6x8_LE[580] = {
0x06,0x08,0x20,0x60,
0x00,0x00,0x00,0x00,0x00,0x00, // Chr$(32)
0x20,0x82,0x08,0x00,0x82,0x00, // Chr$(33)  !
0x51,0x45,0x00,0x00,0x00,0x00, // Chr$(34)  "
0x51,0x4F,0x94,0xF9,0x45,0x00, // Chr$(35)  #
0x21,0xEA,0x1C,0x2B,0xC2,0x00, // Chr$(36)  $
0x00,0x69,0x90,0x20,0x4C,0xB0, // Chr$(37)  %
0x62,0x4A,0x10,0xAA,0x46,0x80, // Chr$(38)  &
0x60,0x84,0x00,0x00,0x00,0x00, // Chr$(39)  '
0x10,0x84,0x10,0x40,0x81,0x00, // Chr$(40)  (
0x40,0x81,0x04,0x10,0x84,0x00, // Chr$(41)  )
0x00,0x8A,0x9C,0xA8,0x80,0x00, // Chr$(42)  *
0x00,0x82,0x3E,0x20,0x80,0x00, // Chr$(43)  +
0x00,0x00,0x00,0x30,0x42,0x00, // Chr$(44)  ,
0x00,0x00,0x3E,0x00,0x00,0x00, // Chr$(45)  -
0x00,0x00,0x00,0x01,0x86,0x00, // Chr$(46)  .
0x00,0x21,0x08,0x42,0x00,0x00, // Chr$(47)  /
0x72,0x29,0xAA,0xCA,0x27,0x00, // Chr$(48)  0
0x21,0x82,0x08,0x20,0x87,0x00, // Chr$(49)  1
0x72,0x20,0x84,0x21,0x0F,0x80, // Chr$(50)  2
0xF8,0x42,0x04,0x0A,0x27,0x00, // Chr$(51)  3
0x10,0xC5,0x24,0xF8,0x41,0x00, // Chr$(52)  4
0xFA,0x0F,0x02,0x0A,0x27,0x00, // Chr$(53)  5
0x31,0x08,0x3C,0x8A,0x27,0x00, // Chr$(54)  6
0xF8,0x21,0x08,0x41,0x04,0x00, // Chr$(55)  7
0x72,0x28,0x9C,0x8A,0x27,0x00, // Chr$(56)  8
0x72,0x28,0x9E,0x08,0x27,0x00, // Chr$(57)  9
0x01,0x86,0x00,0x61,0x80,0x00, // Chr$(58)  :
0x01,0x86,0x00,0x60,0x84,0x00, // Chr$(59)  ;
0x10,0x84,0x20,0x40,0x81,0x00, // Chr$(60)  <
0x00,0x0F,0x80,0xF8,0x00,0x00, // Chr$(61)  =
0x40,0x81,0x02,0x10,0x84,0x00, // Chr$(62)  >
0x72,0x20,0x84,0x20,0x02,0x00, // Chr$(63)  ?
0x72,0x20,0x9A,0xBA,0x27,0x00, // Chr$(64)  @
0x72,0x28,0xA2,0xFA,0x28,0x80, // Chr$(65)  A
0xF2,0x28,0xBC,0x8A,0x2F,0x00, // Chr$(66)  B
0x72,0x28,0x20,0x82,0x27,0x00, // Chr$(67)  C
0xE2,0x48,0xA2,0x8A,0x4E,0x00, // Chr$(68)  D
0xFA,0x08,0x3C,0x82,0x0F,0x80, // Chr$(69)  E
0xFA,0x08,0x3C,0x82,0x08,0x00, // Chr$(70)  F
0x72,0x28,0x2E,0x8A,0x27,0x80, // Chr$(71)  G
0x8A,0x28,0xBE,0x8A,0x28,0x80, // Chr$(72)  H
0x70,0x82,0x08,0x20,0x87,0x00, // Chr$(73)  I
0x38,0x41,0x04,0x12,0x46,0x00, // Chr$(74)  J
0x8A,0x4A,0x30,0xA2,0x48,0x80, // Chr$(75)  K
0x82,0x08,0x20,0x82,0x0F,0x80, // Chr$(76)  L
0x8B,0x6A,0xAA,0x8A,0x28,0x80, // Chr$(77)  M
0x8A,0x2C,0xAA,0x9A,0x28,0x80, // Chr$(78)  N
0x72,0x28,0xA2,0x8A,0x27,0x00, // Chr$(79)  O
0xF2,0x28,0xBC,0x82,0x08,0x00, // Chr$(80)  P
0x72,0x28,0xA2,0xAA,0x46,0x80, // Chr$(81)  Q
0xF2,0x28,0xBC,0xA2,0x48,0x80, // Chr$(82)  R
0x7A,0x08,0x1C,0x08,0x2F,0x00, // Chr$(83)  S
0xF8,0x82,0x08,0x20,0x82,0x00, // Chr$(84)  T
0x8A,0x28,0xA2,0x8A,0x27,0x00, // Chr$(85)  U
0x8A,0x28,0xA2,0x89,0x42,0x00, // Chr$(86)  V
0x8A,0x28,0xAA,0xAA,0xA5,0x00, // Chr$(87)  W
0x8A,0x25,0x08,0x52,0x28,0x80, // Chr$(88)  X
0x8A,0x28,0x94,0x20,0x82,0x00, // Chr$(89)  Y
0xF8,0x21,0x08,0x42,0x0F,0x80, // Chr$(90)  Z
0x71,0x04,0x10,0x41,0x07,0x00, // Chr$(91)  [
0x02,0x04,0x08,0x10,0x20,0x00, // Chr$(92) backslash
0x70,0x41,0x04,0x10,0x47,0x00, // Chr$(93)  ]
0x21,0x48,0x80,0x00,0x00,0x00, // Chr$(94)  ^
0x00,0x00,0x00,0x00,0x0F,0x80, // Chr$(95)  _
0x00,0xC4,0x8C,0x00,0x00,0x00, // Chr$(96)  `
0x00,0x07,0x02,0x7A,0x27,0x80, // Chr$(97)  a
0x82,0x0B,0x32,0x8A,0x2F,0x00, // Chr$(98)  b
0x00,0x07,0x20,0x82,0x27,0x00, // Chr$(99)  c
0x08,0x26,0xA6,0x8A,0x27,0x80, // Chr$(100)  d
0x00,0x07,0x22,0xFA,0x07,0x00, // Chr$(101)  e
0x31,0x24,0x38,0x41,0x04,0x00, // Chr$(102)  f
0x01,0xE8,0xA2,0x78,0x27,0x00, // Chr$(103)  g
0x82,0x0B,0x32,0x8A,0x28,0x80, // Chr$(104)  h
0x20,0x06,0x08,0x20,0x87,0x00, // Chr$(105)  i
0x10,0x03,0x04,0x12,0x46,0x00, // Chr$(106)  j
0x82,0x09,0x28,0xC2,0x89,0x00, // Chr$(107)  k
0x60,0x82,0x08,0x20,0x87,0x00, // Chr$(108)  l
0x00,0x0D,0x2A,0xAA,0x28,0x80, // Chr$(109)  m
0x00,0x0B,0x32,0x8A,0x28,0x80, // Chr$(110)  n
0x00,0x07,0x22,0x8A,0x27,0x00, // Chr$(111)  o
0x00,0x0F,0x22,0xF2,0x08,0x00, // Chr$(112)  p
0x00,0x06,0xA6,0x78,0x20,0x80, // Chr$(113)  q
0x00,0x0B,0x32,0x82,0x08,0x00, // Chr$(114)  r
0x00,0x07,0x20,0x70,0x2F,0x00, // Chr$(115)  s
0x41,0x0E,0x10,0x41,0x23,0x00, // Chr$(116)  t
0x00,0x08,0xA2,0x8A,0x66,0x80, // Chr$(117)  u
0x00,0x08,0xA2,0x89,0x42,0x00, // Chr$(118)  v
0x00,0x08,0xA2,0xAA,0xA5,0x00, // Chr$(119)  w
0x00,0x08,0x94,0x21,0x48,0x80, // Chr$(120)  x
0x00,0x08,0xA2,0x78,0x27,0x00, // Chr$(121)  y
0x00,0x0F,0x84,0x21,0x0F,0x80, // Chr$(122)  z
0x10,0x82,0x10,0x40,0x82,0x04, // Chr$(123)  {
0x20,0x82,0x00,0x20,0x82,0x00, // Chr$(124)  |
0x20,0x41,0x02,0x08,0x41,0x08, // Chr$(125)  }
0x00,0x04,0xAA,0x90,0x00,0x00, // Chr$(126)  ~
0x00,0x02,0x14,0x8B,0xE0,0x00 // Chr$(127)
};



Gerry
Latest F4 Latest H7
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2129
Posted: 10:32pm 10 Dec 2023
Copy link to clipboard 
Print this post

Interesting. read pixel ok but thought read character set as said.
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024