~ubuntu-branches/debian/stretch/grub2/stretch

« back to all changes in this revision

Viewing changes to include/grub/font.h

Tags: upstream-1.98+20100705
ImportĀ upstreamĀ versionĀ 1.98+20100705

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#include <grub/types.h>
23
23
#include <grub/video.h>
24
24
#include <grub/file.h>
 
25
#include <grub/unicode.h>
25
26
 
26
27
/* Forward declaration of opaque structure grub_font.
27
28
   Users only pass struct grub_font pointers to the font module functions,
69
70
  grub_uint8_t bitmap[0];
70
71
};
71
72
 
 
73
/* Part of code field which is really used as such.  */
 
74
#define GRUB_FONT_CODE_CHAR_MASK     0x001fffff
 
75
#define GRUB_FONT_CODE_RIGHT_JOINED  0x80000000
 
76
#define GRUB_FONT_CODE_LEFT_JOINED   0x40000000
 
77
 
72
78
/* Initialize the font loader.
73
79
   Must be called before any fonts are loaded or used.  */
74
80
void grub_font_loader_init (void);
97
103
 
98
104
int EXPORT_FUNC (grub_font_get_height) (grub_font_t font);
99
105
 
100
 
int EXPORT_FUNC (grub_font_get_string_width) (grub_font_t font,
101
 
                                              const char *str);
 
106
int EXPORT_FUNC (grub_font_get_xheight) (grub_font_t font);
102
107
 
103
108
struct grub_font_glyph *EXPORT_FUNC (grub_font_get_glyph) (grub_font_t font,
104
109
                                                           grub_uint32_t code);
110
115
                                               grub_video_color_t color,
111
116
                                               int left_x, int baseline_y);
112
117
 
113
 
grub_err_t EXPORT_FUNC (grub_font_draw_string) (const char *str,
114
 
                                                grub_font_t font,
115
 
                                                grub_video_color_t color,
116
 
                                                int left_x, int baseline_y);
 
118
int
 
119
EXPORT_FUNC (grub_font_get_constructed_device_width) (grub_font_t hinted_font,
 
120
                                        const struct grub_unicode_glyph *glyph_id);
 
121
struct grub_font_glyph *
 
122
EXPORT_FUNC (grub_font_construct_glyph) (grub_font_t hinted_font,
 
123
                           const struct grub_unicode_glyph *glyph_id);
117
124
 
118
125
#endif /* ! GRUB_FONT_HEADER */