Пример #1
0
// Returns the style name of the font's currently selected face,
// or a blank string if unavailable.
func (f *Font) StyleName() string {
	if f == nil {
		return "nil"
	}
	p := C.TTF_FontFaceStyleName(f.cfont)
	if p == nil {
		return ""
	}
	s := C.GoString(p)
	return s
}
Пример #2
0
// Returns the style name of the font's currently selected face,
// or a blank string if unavailable.
func (f *Font) StyleName() string {
	var s string
	if f != nil {
		p := C.TTF_FontFaceStyleName(f.cfont)
		if p != nil {
			s = C.GoString(p)
		} else {
			s = ""
		}
	} else {
		s = "nil"
	}

	return s
}
Пример #3
0
// Returns the style name of the font's currently selected face,
// or a blank string if unavailable.
func (f *Font) StyleName() string {
	var s string
	if f != nil {
		f.mutex.RLock()

		p := C.TTF_FontFaceStyleName(f.cfont)
		if p != nil {
			s = C.GoString(p)
		} else {
			s = ""
		}

		f.mutex.RUnlock()
	} else {
		s = "nil"
	}

	return s
}
Пример #4
0
// Font face stylename
func TTFFontFaceStyleName(font *C.TTF_Font) string {
	return C.GoString(C.TTF_FontFaceStyleName(font))
}
Пример #5
0
func (f *Font) FaceStyleName() string {
	return C.GoString(C.TTF_FontFaceStyleName(f.c))
}