Changes in uspace/lib/draw/font.c [b7fd2a0:38d150e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/draw/font.c
rb7fd2a0 r38d150e 60 60 } 61 61 62 errno_t font_get_metrics(font_t *font, font_metrics_t *metrics) {62 int font_get_metrics(font_t *font, font_metrics_t *metrics) { 63 63 return font->backend->get_font_metrics(font->backend_data, metrics); 64 64 } 65 65 66 errno_t font_resolve_glyph(font_t *font, wchar_t c, glyph_id_t *glyph_id) {66 int font_resolve_glyph(font_t *font, wchar_t c, glyph_id_t *glyph_id) { 67 67 return font->backend->resolve_glyph(font->backend_data, c, glyph_id); 68 68 } 69 69 70 errno_t font_get_glyph_metrics(font_t *font, glyph_id_t glyph_id,70 int font_get_glyph_metrics(font_t *font, glyph_id_t glyph_id, 71 71 glyph_metrics_t *glyph_metrics) 72 72 { … … 75 75 } 76 76 77 errno_t font_render_glyph(font_t *font, drawctx_t *context, source_t *source,77 int font_render_glyph(font_t *font, drawctx_t *context, source_t *source, 78 78 sysarg_t x, sysarg_t y, glyph_id_t glyph_id) 79 79 { … … 83 83 84 84 /* TODO this is bad interface */ 85 errno_t font_get_box(font_t *font, char *text, sysarg_t *width, sysarg_t *height)85 int font_get_box(font_t *font, char *text, sysarg_t *width, sysarg_t *height) 86 86 { 87 87 font_metrics_t fm; 88 errno_t rc = font_get_metrics(font, &fm);88 int rc = font_get_metrics(font, &fm); 89 89 if (rc != EOK) 90 90 return rc; … … 101 101 rc = font_resolve_glyph(font, c, &glyph_id); 102 102 if (rc != EOK) { 103 errno_t rc2 = font_resolve_glyph(font, U_SPECIAL, &glyph_id);103 int rc2 = font_resolve_glyph(font, U_SPECIAL, &glyph_id); 104 104 if (rc2 != EOK) { 105 105 return rc; … … 121 121 122 122 /* TODO this is bad interface */ 123 errno_t font_draw_text(font_t *font, drawctx_t *context, source_t *source,123 int font_draw_text(font_t *font, drawctx_t *context, source_t *source, 124 124 const char *text, sysarg_t sx, sysarg_t sy) 125 125 { … … 128 128 129 129 font_metrics_t fm; 130 errno_t rc = font_get_metrics(font, &fm);130 int rc = font_get_metrics(font, &fm); 131 131 if (rc != EOK) 132 132 return rc; … … 144 144 rc = font_resolve_glyph(font, c, &glyph_id); 145 145 if (rc != EOK) { 146 errno_t rc2 = font_resolve_glyph(font, U_SPECIAL, &glyph_id);146 int rc2 = font_resolve_glyph(font, U_SPECIAL, &glyph_id); 147 147 if (rc2 != EOK) { 148 148 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.