File: cairo_text_helper.pkg

package info (click to toggle)
conky 1.22.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,376 kB
  • sloc: cpp: 64,271; ansic: 18,382; python: 813; xml: 324; sh: 248; makefile: 143; javascript: 139
file content (19 lines) | stat: -rw-r--r-- 911 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$#include <cairo.h>
$#include <libcairo_text_helper.h>

typedef enum _cairo_text_alignment {
  CAIRO_TEXT_ALIGN_LEFT = 0,
  CAIRO_TEXT_ALIGN_RIGHT,
  CAIRO_TEXT_ALIGN_CENTER
} cairo_text_alignment_t;

void cairo_text_hp_show(cairo_t *cr, int x, int y, const char *text, const char *font, int font_size, 
                        cairo_text_alignment_t alignment = CAIRO_TEXT_ALIGN_LEFT, const char *language = "en",
                        const char *script = NULL, const char *direction = NULL);

/* This function allows you to get sizing so you can layout multiple sets of text next to each other */
void cairo_text_hp_text_size(const char *text, const char *font, int font_size, 
                             const char *language = "en", const char *script = NULL, const char *direction, int *width, int *height);

/* This will clear all currently loaded / cached fonts */
void cairo_text_hp_delete_fonts();