Changeset 06b8383 in mainline for uspace/app/fontedit
- Timestamp:
- 2020-08-18T11:32:59Z (5 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)
- Location:
- uspace/app/fontedit
- Files:
-
- 2 edited
-
fontedit.c (modified) (4 diffs)
-
fontedit.h (modified) (2 diffs)
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; -
uspace/app/fontedit/fontedit.h
rd2100e2 r06b8383 37 37 #define FONTEDIT_H 38 38 39 #include <gfx/ font.h>39 #include <gfx/typeface.h> 40 40 #include <guigfx/canvas.h> 41 41 … … 50 50 /** Window height */ 51 51 int height; 52 /** Font*/53 gfx_ font_t *font;52 /** Typeface */ 53 gfx_typeface_t *typeface; 54 54 } font_edit_t; 55 55
Note:
See TracChangeset
for help on using the changeset viewer.
