Exemplo n.º 1
0
func (self *Canvas) SetFontFamily(name string) error {
	family := C.CString(name)
	defer C.free(unsafe.Pointer(family))

	if C.MagickSetFont(self.wand, family) == C.MagickFalse {
		return fmt.Errorf("Could not set font family: %s", self.Error())
	}

	return nil
}
Exemplo n.º 2
0
// Sets the font associated with the MagickWand.
func (mw *MagickWand) SetFont(font string) error {
	csfont := C.CString(font)
	defer C.free(unsafe.Pointer(csfont))
	C.MagickSetFont(mw.mw, csfont)
	return mw.GetLastError()
}