Docs @ Psychtoolbox Wiki : TextFont

Search PTB Function help:
homepsychtoolbox.orgpage updateslogin

Screen('TextFont')

PsychtoolboxScreen.{mex*,dll} subfunction

Usage
[oldFontName,oldFontNumber]=Screen('TextFont', windowPtr [,fontNameOrNumber]);

Get/Set the font for future text draws in this window.
You can ask what the current font is, or specify the desired font by number or
by name (e.g. 'Helvetica'). Font numbers are not consistent from Mac to Mac, and
they aren't supported but silently ignored on MS-Windows and Linux, so use font
names for reliability and portability. Font numbers are only available for
backward compatibility to old OS-9 Psychtoolbox versions.
The font name can be a string of at most 255 characters length, e.g.
'Helvetica', or a list containing one string of at most 255 characters, e.g.
{'Helvetica'}. The default font depends on the operating system and is selected
for good readability. You can query and change it via a call to
Screen('Preference', 'DefaultFontName').
It's ok to request a non-existent font on OS/X; this will have no effect. If you
care, call TextFont again to find out whether you got the font you requested.
See FontDemo.
On Linux you can either provide a font name - PTB will select a matching font
with that name that also fullfills the size and style requirements - or you can
supply a full X-Windows font specifier string which encodes all kinds of
properties. The xfontsel -print command under Linux allows you to query all
available fonts and provides such a spec-string on request. Depending on the
selected text renderer, Linux can be picky about the supplied fonts - if you
request a non-existent font, the DrawText command will fail with an error
message. However, with the default FTGL text renderer on Linux, Linux will be
lenient in its font selection.


Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki
Page was generated in 0.1820 seconds