Changeset 06b8383 in mainline for uspace/app/fontedit/fontedit.c
- Timestamp:
- 2020-08-18T11:32:59Z (4 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 20d0098
- Parents:
- d2100e2
- git-author:
- Jiri Svoboda <jiri@…> (2020-08-17 18:32:40)
- git-committer:
- Jiri Svoboda <jiri@…> (2020-08-18 11:32:59)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/fontedit/fontedit.c
rd2100e2 r06b8383 38 38 #include <guigfx/canvas.h> 39 39 #include <gfx/color.h> 40 #include <gfx/font.h> 40 41 #include <gfx/render.h> 42 #include <gfx/typeface.h> 41 43 #include <stdbool.h> 42 44 #include <stdio.h> … … 117 119 canvas_t *canvas = NULL; 118 120 font_edit_t *fedit = NULL; 121 gfx_typeface_t *tface = NULL; 119 122 gfx_font_t *font = NULL; 123 gfx_font_props_t props; 120 124 gfx_font_metrics_t metrics; 121 125 gfx_coord_t vw, vh; … … 178 182 179 183 gc = canvas_gc_get_ctx(cgc); 184 185 rc = gfx_typeface_create(gc, &tface); 186 if (rc != EOK) { 187 printf("Error creating typeface.\n"); 188 goto error; 189 } 190 191 gfx_font_props_init(&props); 180 192 gfx_font_metrics_init(&metrics); 181 193 182 rc = gfx_font_create( gc, &metrics, &font);194 rc = gfx_font_create(tface, &props, &metrics, &font); 183 195 if (rc != EOK) { 184 196 printf("Error creating font.\n"); … … 190 202 fedit->width = vw; 191 203 fedit->height = vh; 192 fedit-> font = font;204 fedit->typeface = tface; 193 205 194 206 *rfedit = fedit;
Note:
See TracChangeset
for help on using the changeset viewer.