Example #1
0
// Ascent (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_30.html#SEC30)
func (f *Font) Ascent() int { return int(C.TTF_FontAscent(f.f)) }
Example #2
0
File: ttf.go Project: beoran/fungo
// Get the offset from the baseline to the top of the font
// This is a positive value, relative to the baseline.
func TTFFontAscent(font *C.TTF_Font) int {
	return int(C.TTF_FontAscent(font))
}
Example #3
0
File: ttf.go Project: Zwobot/Go-SDL
// Returns the maximum pixel ascent (from the baseline) of all the glyphs
// of the font.
func (f *Font) Ascent() int {
	f.mutex.RLock()
	result := int(C.TTF_FontAscent(f.cfont))
	f.mutex.RUnlock()
	return result
}
Example #4
0
File: ttf.go Project: krig/Go-SDL2
// Returns the maximum pixel ascent (from the baseline) of all the glyphs
// of the font.
func (f *Font) Ascent() int {
	result := int(C.TTF_FontAscent(f.cfont))
	return result
}