Changes in uspace/lib/gfxfont/src/font.c [5c27e77:0d62c10] in mainline
- File:
-
- 1 edited
-
uspace/lib/gfxfont/src/font.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/gfxfont/src/font.c
r5c27e77 r0d62c10 1 1 /* 2 * Copyright (c) 202 2Jiri Svoboda2 * Copyright (c) 2020 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 Typeface185 * @param rfont Place to store pointer to new font186 *187 * @return EOK on success, EINVAL if parameters are invald,188 * ENOMEM if insufficient resources, EIO if graphic device connection189 * was lost190 */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 208 182 /** Open font. 209 183 * … … 546 520 metrics->descent = uint16_t_le2host(tmetrics.descent); 547 521 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);550 522 return EOK; 551 523 } … … 567 539 tmetrics.descent = host2uint16_t_le(metrics->descent); 568 540 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);571 541 572 542 rc = riff_wchunk_start(riffw, CKID_fmtr, &mtrck);
Note:
See TracChangeset
for help on using the changeset viewer.
