Changeset 38a4b6d in mainline
- Timestamp:
- 2020-09-30T19:46:07Z (4 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d884672
- Parents:
- 7358f5b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/fontedit/fontedit.c
r7358f5b r38a4b6d 53 53 glyph_scale = 8, 54 54 glyph_orig_x = 100, 55 glyph_orig_y = 10055 glyph_orig_y = 200 56 56 }; 57 57 … … 346 346 } 347 347 348 /** Paint font preview .348 /** Paint font preview string. 349 349 * 350 350 * @param fedit Font editor 351 */ 352 static errno_t font_edit_paint_preview(font_edit_t *fedit) 351 * @param x Starting X coordinate 352 * @Param y Starting Y coordinate 353 * @param str String 354 */ 355 static errno_t font_edit_paint_preview_str(font_edit_t *fedit, 356 gfx_coord_t x, gfx_coord_t y, const char *str) 353 357 { 354 358 gfx_glyph_metrics_t gmetrics; 355 359 size_t stradv; 356 360 const char *cp; 361 gfx_coord2_t pos; 357 362 gfx_glyph_t *glyph; 358 gfx_coord2_t pos; 359 errno_t rc; 360 361 cp = "ABCD"; 362 pos.x = 20; 363 pos.y = 20; 363 errno_t rc; 364 365 pos.x = x; 366 pos.y = y; 367 cp = str; 364 368 365 369 while (*cp != '\0') { … … 379 383 pos.x += gmetrics.advance; 380 384 } 385 386 return EOK; 387 } 388 389 /** Paint font preview. 390 * 391 * @param fedit Font editor 392 */ 393 static errno_t font_edit_paint_preview(font_edit_t *fedit) 394 { 395 errno_t rc; 396 397 rc = font_edit_paint_preview_str(fedit, 20, 20, 398 "ABCDEFGHIJKLMNOPQRSTUVWXYZ"); 399 if (rc != EOK) 400 return rc; 401 402 rc = font_edit_paint_preview_str(fedit, 20, 40, 403 "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"); 404 if (rc != EOK) 405 return rc; 406 407 rc = font_edit_paint_preview_str(fedit, 20, 60, 408 "abcdefghijklmnopqrstuvwxyz"); 409 if (rc != EOK) 410 return rc; 411 412 rc = font_edit_paint_preview_str(fedit, 20, 80, 413 "the quick brown fox jumps over the lazy dog"); 414 if (rc != EOK) 415 return rc; 381 416 382 417 return EOK;
Note:
See TracChangeset
for help on using the changeset viewer.