summary refs log tree commit diff stats
path: root/lib/wrappers/cairo/cairoft.nim
blob: 16a80e7f7170c5a0bf2d6169038e1b0fcecf2e6c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#
# Translation of cairo-ft.h 
# by Jeffrey Pohlmeyer 
# updated to version 1.4 by Luiz Am�rico Pereira C�mara 2007
#

import 
  cairo, freetypeh

#todo: properly define FcPattern:
#It will require translate FontConfig header

#*
#typedef struct _XftPattern {
#  int		    num;
#  int		    size;
#  XftPatternElt   *elts;
# } XftPattern;
# typedef FcPattern XftPattern;
#

type 
  FcPattern* = Pointer
  PFcPattern* = ptr FcPattern

proc ft_font_face_create_for_pattern*(pattern: PFcPattern): PFontFace{.cdecl, 
    importc: "cairo_ft_font_face_create_for_pattern", dynlib: LIB_CAIRO.}
proc ft_font_options_substitute*(options: PFontOptions, pattern: PFcPattern){.
    cdecl, importc: "cairo_ft_font_options_substitute", dynlib: LIB_CAIRO.}
proc ft_font_face_create_for_ft_face*(face: TFT_Face, load_flags: int32): PFontFace{.
    cdecl, importc: "cairo_ft_font_face_create_for_ft_face", dynlib: LIB_CAIRO.}
proc ft_scaled_font_lock_face*(scaled_font: PScaledFont): TFT_Face{.cdecl, 
    importc: "cairo_ft_scaled_font_lock_face", dynlib: LIB_CAIRO.}
proc ft_scaled_font_unlock_face*(scaled_font: PScaledFont){.cdecl, 
    importc: "cairo_ft_scaled_font_unlock_face", dynlib: LIB_CAIRO.}