Changes in uspace/lib/gfxfont/src/font.c [0d62c10:5c27e77] in mainline
- File:
-
- 1 edited
-
uspace/lib/gfxfont/src/font.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/gfxfont/src/font.c
r0d62c10 r5c27e77 1 1 /* 2 * Copyright (c) 202 0Jiri Svoboda2 * Copyright (c) 2022 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 180 180 } 181 181 182 /** Create dummy font for printing text in text mode. 183 * 184 * @param tface Typeface 185 * @param rfont Place to store pointer to new font 186 * 187 * @return EOK on success, EINVAL if parameters are invald, 188 * ENOMEM if insufficient resources, EIO if graphic device connection 189 * was lost 190 */ 191 errno_t gfx_font_create_textmode(gfx_typeface_t *tface, gfx_font_t **rfont) 192 { 193 gfx_font_props_t props; 194 gfx_font_metrics_t metrics; 195 196 gfx_font_props_init(&props); 197 props.size = 1; 198 props.flags = gff_text_mode; 199 200 gfx_font_metrics_init(&metrics); 201 metrics.ascent = 0; 202 metrics.descent = 0; 203 metrics.leading = 1; 204 205 return gfx_font_create(tface, &props, &metrics, rfont); 206 } 207 182 208 /** Open font. 183 209 * … … 520 546 metrics->descent = uint16_t_le2host(tmetrics.descent); 521 547 metrics->leading = uint16_t_le2host(tmetrics.leading); 548 metrics->underline_y0 = uint16_t_le2host(tmetrics.underline_y0); 549 metrics->underline_y1 = uint16_t_le2host(tmetrics.underline_y1); 522 550 return EOK; 523 551 } … … 539 567 tmetrics.descent = host2uint16_t_le(metrics->descent); 540 568 tmetrics.leading = host2uint16_t_le(metrics->leading); 569 tmetrics.underline_y0 = host2uint16_t_le(metrics->underline_y0); 570 tmetrics.underline_y1 = host2uint16_t_le(metrics->underline_y1); 541 571 542 572 rc = riff_wchunk_start(riffw, CKID_fmtr, &mtrck);
Note:
See TracChangeset
for help on using the changeset viewer.
