Example #1
0
func (self *Surface) SelectFontFace(name string, font_slant_t, font_weight_t int) {
	s := C.CString(name)
	C.cairo_select_font_face(self.context, s, C.cairo_font_slant_t(font_slant_t), C.cairo_font_weight_t(font_weight_t))
	C.free(unsafe.Pointer(s))
}
Example #2
0
func (self *Surface) SelectFontFace(name string, font_slant FontSlant, font_weight FontWeight) {
	p := C.CString(name)
	C.cairo_select_font_face(self.context, p, C.cairo_font_slant_t(font_slant), C.cairo_font_weight_t(font_weight))
	C.free(unsafe.Pointer(p))
}
Example #3
0
func (v *Context) SelectFontFace(family string, slant FontSlant, weight FontWeight) {
	cstr := C.CString(family)
	defer C.free(unsafe.Pointer(cstr))
	C.cairo_select_font_face(v.native(), (*C.char)(cstr), C.cairo_font_slant_t(slant), C.cairo_font_weight_t(weight))
}
Example #4
0
func (w weight) c() C.cairo_font_weight_t {
	return C.cairo_font_weight_t(w)
}