comparison src/cs/drivers/drv_app/r2d/lcds/Simple/r2d_font_init_i.c @ 0:b6a5e36de839

src/cs: initial import from Magnetite
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 15 Jul 2018 04:39:26 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:b6a5e36de839
1 #include "r2d/lcds/simple/font_bitmap_system.h"
2 #include "r2d/lcds/simple/font_metrics_system.h"
3 #include "r2d/lcds/simple/font_table_system.h"
4
5 #include "r2d/lcds/simple/font_bitmap_proportional.h"
6 #include "r2d/lcds/simple/font_metrics_proportional.h"
7 #include "r2d/lcds/simple/font_table_proportional.h"
8
9
10
11 r2d_new_font(system);
12
13 r2d_new_font(proportional);
14
15
16 /* Cleaning font structures when and error occurs at init */
17 void r2d_font_clean()
18 {
19 r2d_clean_font(system);
20 r2d_clean_font(proportional);
21 }
22
23 T_R2D_ERROR r2d_font_init()
24 {
25 UINT16 length;
26 UINT32 *p;
27 UINT32 h,v,words;
28 T_R2D_ERROR ret_err;
29
30 ret_err=R2D_OK;
31
32 r2d_init_font(system);
33 if (ret_err!=R2D_OK)
34 return(ret_err);
35
36 r2d_init_font(proportional);
37 if (ret_err!=R2D_OK)
38 return(ret_err);
39
40
41
42 r2d_init_font_field(R2D_SMALL_SYSTEM_NORMAL,system);
43 r2d_init_font_field_without_bold(R2D_SMALL_SYSTEM_BOLD,system);
44 r2d_init_font_field(R2D_SMALL_SYSTEM_ITALIC,system);
45 r2d_init_font_field_without_bold(R2D_SMALL_SYSTEM_BOLD_ITALIC,system);
46
47 r2d_init_font_field(R2D_MEDIUM_SYSTEM_NORMAL,system);
48 r2d_init_font_field_without_bold(R2D_MEDIUM_SYSTEM_BOLD,system);
49 r2d_init_font_field(R2D_MEDIUM_SYSTEM_ITALIC,system);
50 r2d_init_font_field_without_bold(R2D_MEDIUM_SYSTEM_BOLD_ITALIC,system);
51
52 r2d_init_font_field(R2D_BIG_SYSTEM_NORMAL,system);
53 r2d_init_font_field_without_bold(R2D_BIG_SYSTEM_BOLD,system);
54 r2d_init_font_field(R2D_BIG_SYSTEM_ITALIC,system);
55 r2d_init_font_field_without_bold(R2D_BIG_SYSTEM_BOLD_ITALIC,system);
56
57 r2d_init_font_field(R2D_SMALL_TYPEWRITER_NORMAL,system);
58 r2d_init_font_field_without_bold(R2D_SMALL_TYPEWRITER_BOLD,system);
59 r2d_init_font_field(R2D_SMALL_TYPEWRITER_ITALIC,system);
60 r2d_init_font_field_without_bold(R2D_SMALL_TYPEWRITER_BOLD_ITALIC,system);
61
62 r2d_init_font_field(R2D_MEDIUM_TYPEWRITER_NORMAL,system);
63 r2d_init_font_field_without_bold(R2D_MEDIUM_TYPEWRITER_BOLD,system);
64 r2d_init_font_field(R2D_MEDIUM_TYPEWRITER_ITALIC,system);
65 r2d_init_font_field_without_bold(R2D_MEDIUM_TYPEWRITER_BOLD_ITALIC,system);
66
67 r2d_init_font_field(R2D_BIG_TYPEWRITER_NORMAL,system);
68 r2d_init_font_field_without_bold(R2D_BIG_TYPEWRITER_BOLD,system);
69 r2d_init_font_field(R2D_BIG_TYPEWRITER_ITALIC,system);
70 r2d_init_font_field_without_bold(R2D_BIG_TYPEWRITER_BOLD_ITALIC,system);
71
72 r2d_init_font_field(R2D_SMALL_PROPORTIONAL_NORMAL,proportional);
73 r2d_init_font_field_without_bold(R2D_SMALL_PROPORTIONAL_BOLD,proportional);
74 r2d_init_font_field(R2D_SMALL_PROPORTIONAL_ITALIC,proportional);
75 r2d_init_font_field_without_bold(R2D_SMALL_PROPORTIONAL_BOLD_ITALIC,proportional);
76
77 r2d_init_font_field(R2D_MEDIUM_PROPORTIONAL_NORMAL,proportional);
78 r2d_init_font_field_without_bold(R2D_MEDIUM_PROPORTIONAL_BOLD,proportional);
79 r2d_init_font_field(R2D_MEDIUM_PROPORTIONAL_ITALIC,proportional);
80 r2d_init_font_field_without_bold(R2D_MEDIUM_PROPORTIONAL_BOLD_ITALIC,proportional);
81
82 r2d_init_font_field(R2D_BIG_PROPORTIONAL_NORMAL,proportional);
83 r2d_init_font_field_without_bold(R2D_BIG_PROPORTIONAL_BOLD,proportional);
84 r2d_init_font_field(R2D_BIG_PROPORTIONAL_ITALIC,proportional);
85 r2d_init_font_field_without_bold(R2D_BIG_PROPORTIONAL_BOLD_ITALIC,proportional);
86
87 return(R2D_OK);
88 }