func (self *Canvas) SetFont(font string) error { cFont := C.CString(font) defer C.free(unsafe.Pointer(cFont)) if C.DrawSetFont(self.drawing, cFont) == C.MagickFalse { return fmt.Errorf("Could not set font: %s", self.Error()) } return nil }
// Sets the fully-sepecified font to use when annotating with text. func (dw *DrawingWand) SetFont(fontName string) error { csFontName := C.CString(fontName) defer C.free(unsafe.Pointer(csFontName)) C.DrawSetFont(dw.dw, csFontName) return dw.GetLastError() }
// Sets canvas' default font name func (self *Canvas) SetFontName(font string) { self.text.Font = font cfont := C.CString(font) defer C.free(unsafe.Pointer(cfont)) C.DrawSetFont(self.drawing, cfont) }