Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset c6c39d4f in mainline


Ignore:
Timestamp:
2014-08-31T08:25:54Z (7 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master
Children:
8d3512f1
Parents:
794e368
Message:

Add a decoder for X11 pcf fonts.

Location:
uspace
Files:
2 added
3 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       
  • uspace/app/init/init.c

    r794e368 rc6c39d4f  
    356356                gui_start("/app/vlaunch", HID_COMPOSITOR_SERVER);
    357357                gui_start("/app/vterm", HID_COMPOSITOR_SERVER);
    358                 task_spawnl(NULL, NULL, "/app/fontviewer", "/app/fontviewer", "comp:0/winreg", "/cu12.pcf", NULL);
    359358        }
    360359       
  • uspace/lib/draw/Makefile

    r794e368 rc6c39d4f  
    3838        font/embedded.c \
    3939        font/bitmap_backend.c \
     40        font/pcf.c \
    4041        gfx/font-8x16.c \
    4142        gfx/cursor-11x18.c \
Note: See TracChangeset for help on using the changeset viewer.