Author | Matthew Schinkel - borntechi.com, copyright © 2009, all rights reserved. |
Adapted-by | |
Compiler | >=2.4k |
Main font library. API: include as many font library as you want, then include this one. Define which font you want to use during programm execution, calling glcd_font_use(font_id). Font lookup (retrieving a char) is done using glcd_font_lookup(idx)
http://www.divshare.com/download/11463401-4a9
Fonts have an ID, unique amongst all font libraries. ID goes from 0x01 to 0xFE (0x00 and 0xFF are reserved for internal usage). Fonts which are part of jallib distribution have their ID starting from 0x01, increasing. There are also "slots" for user-defined libraries, starting from 0xFE, decreasing. This way all jallib IDs are consecutive, so are user-defined. This leaves room for 253 fonts. Each font library addition involves updating procedures glcd_font_use() and glcd_font_lookup(). Font name usually includes information about its Width x Height (eg. FONT_5X7). A font library often declares characters, but can also declares other kind of stuff (like sprites). Example: FONT_9X12_TOP_RIGHT_HORIZONTAL_MY_FONT_NAME Your lcd will most likely only support one font bit order. This example is 9x12 (font_top_right_horizontal) const byte FONT_9x12_0_NONAME[] = {0x00,0x00,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x20,0x00,0x00} -- "!" -horizontal---> 0 0 0 0 0 0 0 0 0 -- 0x00 0x00 0 0 0 0 0 0 0 0 0 -- 0x00 0x00 0 0 1 0 0 0 0 0 0 -- 0x20 0x00 0 0 1 0 0 0 0 0 0 -- 0x20 0x00 0 0 1 0 0 0 0 0 0 -- 0x20 0x00 0 0 1 0 0 0 0 0 0 -- 0x20 0x00 0 0 1 0 0 0 0 0 0 -- 0x20 0x00 0 0 1 0 0 0 0 0 0 -- 0x20 0x00 0 0 0 0 0 0 0 0 0 -- 0x00 0x00 0 0 1 0 0 0 0 0 0 -- 0x20 0x00 0 0 0 0 0 0 0 0 0 -- 0x00 0x00 0 0 0 0 0 0 0 0 0 -- 0x00 0x00 This example is FONT_9x12_7_NONAME (FONT_BOTTOM_LEFT_VERTICAL) const byte font_table[] = {0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x2F0C 0x0000 0x0000} -- "!" 0 0 0 0 0 0 0 0 0 ^ 0 0 0 0 0 0 0 0 0 | 0 0 1 0 0 0 0 0 0 L 0 0 1 0 0 0 0 0 0 A 0 0 1 0 0 0 0 0 0 C 0 0 1 0 0 0 0 0 0 I 0 0 1 0 0 0 0 0 0 T 0 0 1 0 0 0 0 0 0 R 0 0 0 0 0 0 0 0 0 E 0 0 1 0 0 0 0 0 0 V 0 0 0 0 0 0 0 0 0 | 0 0 0 0 0 0 0 0 0 | 0x0000 0x0000 0x2F0C 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
No dependency found
var byte glcd_font_current_bit_direction_
var byte glcd_font_current_id_
const bit GLCD_FONT_USAGE = true
var byte glcd_font_current_byte_per_char_
var byte glcd_font_current_width_
var byte glcd_font_current_height_
var byte glcd_font_current_bit_direction_
No documentation found
var byte glcd_font_current_id_
No documentation found
const bit GLCD_FONT_USAGE = true
flag: do we use font & chars related features ?
var byte glcd_font_current_byte_per_char_
No documentation found
var byte glcd_font_current_width_
No documentation found
var byte glcd_font_current_height_
No documentation found
glcd_font_use(byte in font_id)
No documentation found
glcd_font_lookup(word in idx) return byte
No documentation found
16f877a | 16f877a_glcd_ks0108.jal |
18f2580 | 18f2580_rtc_ds1302_glcd.jal |
18f4620 | 18f4620_glcd_touch_stm032qvt_003.jal |
18f46k22 | 18f46k22_glcd_touch_stm032qvt_003.jal |
18f6310 | 18f6310_glcd_ks0108.jal |
18f6310 | 18f6310_glcd_ks0108_math.jal |