Changeset 8bf9058 in mainline for uspace/lib/gfxfont
- Timestamp:
- 2020-10-06T18:57:04Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0d62c10
- Parents:
- 74f59b7
- Location:
- uspace/lib/gfxfont
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/gfxfont/include/types/gfx/text.h
r74f59b7 r8bf9058 58 58 gfx_valign_center, 59 59 /** Align bottom */ 60 gfx_valign_bottom 60 gfx_valign_bottom, 61 /** Align to baseline */ 62 gfx_valign_baseline 61 63 } gfx_valign_t; 62 64 -
uspace/lib/gfxfont/src/text.c
r74f59b7 r8bf9058 123 123 124 124 /* Adjust position for vertical alignment */ 125 if (fmt->valign != gfx_valign_bottom) { 126 gfx_font_get_metrics(font, &fmetrics); 125 gfx_font_get_metrics(font, &fmetrics); 127 126 127 if (fmt->valign != gfx_valign_baseline) { 128 128 switch (fmt->valign) { 129 129 case gfx_valign_top: … … 133 133 cpos.y += fmetrics.ascent / 2; 134 134 break; 135 case gfx_valign_bottom: 136 cpos.y -= fmetrics.descent; 137 break; 135 138 default: 136 139 break;
Note:
See TracChangeset
for help on using the changeset viewer.