Changeset c6c39d4f in mainline for uspace/app/fontviewer/fontviewer.c


Ignore:
Timestamp:
2014-08-31T08:25:54Z (11 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8d3512f1
Parents:
794e368
Message:

Add a decoder for X11 pcf fonts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/fontviewer/fontviewer.c

    r794e368 rc6c39d4f  
    4747#include <drawctx.h>
    4848#include <font/embedded.h>
     49#include <font/pcf.h>
    4950#include <stdarg.h>
    5051#include <io/verify.h>
     
    6162uint16_t points = 16;
    6263bool show_metrics = true;
     64char *font_path = NULL;
    6365
    6466static int draw(void);
     
    105107static int create_font(font_t **font, uint16_t points)
    106108{
    107         return embedded_font_create(font, points);
     109        if (font_path == NULL) {
     110                return embedded_font_create(font, points);
     111        }
     112       
     113        return pcf_font_create(font, font_path, points);
    108114}
    109115
     
    248254       
    249255        if (argc < 3) {
    250                 printf("No image files specified.\n");
    251                 return 1;
     256                font_path = NULL;
     257        }
     258        else {
     259                font_path = argv[2];
    252260        }
    253261       
Note: See TracChangeset for help on using the changeset viewer.