Exemple #1
0
// Sets the font family to use when annotating with text.
func (dw *DrawingWand) SetFontFamily(fontFamily string) error {
	csFontFamily := C.CString(fontFamily)
	defer C.free(unsafe.Pointer(csFontFamily))
	C.DrawSetFontFamily(dw.dw, csFontFamily)
	return dw.GetLastError()
}
Exemple #2
0
// Sets canvas' default font family
func (self *Canvas) SetFontFamily(family string) {
	self.text.Family = family
	cfamily := C.CString(family)
	defer C.free(unsafe.Pointer(cfamily))
	C.DrawSetFontFamily(self.drawing, cfamily)
}