Docs @ Psychtoolbox Wiki : TextFont

Search PTB Function help:
homepsychtoolbox.orgpage updateslogin

Revision [9781]

Last edited on 2010-01-11 08:33:18 by DocBot
Additions:
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
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.
Deletions:
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, so use font names
for reliability. The font name can be a string, e.g. 'Helvetica', or a list
containing one string, e.g. {'Helvetica'}. The default font (set by the Mac OS)
is 1 (the "application" font, typically Geneva) for an on-screen window and 0
(the "system" font, typically Charcoal) for an off-screen window. 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 M$-Windows and GNU/Linux you can only pass font names. Font numbers are
ignored.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
available fonts and provides such a spec-string on request. Linux is picky about
the supplied fonts - if you request a non-existent font, the DrawText command
will fail with an error message. This limitation will be removed in a future
release of PTB.


Revision [9147]

Edited on 2008-11-05 05:54:54 by DocBot
Additions:
""<div class="subfct" id="Screen">""===[[TextFont Screen('TextFont')]]===
Deletions:
""<div class="subfct" id="Screen" style="background-color:#eee; padding:1em; border-width:1px; border-style:solid; border-color:#ddd; margin-bottom: 2em;border-top: 5px solid #999999;">""===[[TextFont Screen('TextFont')]]===


Revision [7031]

Edited on 2008-07-10 16:07:57 by DocBot
Additions:
""<div class="subfct" id="Screen" style="background-color:#eee; padding:1em; border-width:1px; border-style:solid; border-color:#ddd; margin-bottom: 2em;border-top: 5px solid #999999;">""===[[TextFont Screen('TextFont')]]===
""</div>""
Deletions:
===[[TextFont Screen('TextFont')]]===


Revision [4971]

Edited on 2008-04-26 21:21:20 by DocBot
Additions:
%%(matlab;Usage)[oldFontName,oldFontNumber]=Screen('TextFont', windowPtr [,fontNameOrNumber]);%%
Deletions:
%%(matlab;Usage)[oldFontName,oldFontNumber]=[[Screen]]('TextFont', windowPtr [,fontNameOrNumber]);%%


Revision [4942]

Edited on 2008-04-26 20:18:20 by DocBot
Additions:
===[[TextFont Screen('TextFont')]]===
Deletions:
===[[subfunction Screen('TextFont')]]===


Revision [4886]

Edited on 2008-04-26 20:04:49 by DocBot
Additions:
===[[subfunction Screen('TextFont')]]===
==[[Psychtoolbox]] › [[Screen]].{mex*,dll} subfunction==
%%(matlab;Usage)[oldFontName,oldFontNumber]=[[Screen]]('TextFont', windowPtr [,fontNameOrNumber]);%%
Deletions:
===[[TextFont]]===
==ScreenFunctions==
Usage:
[oldFontName,oldFontNumber]=Screen('TextFont', windowPtr [,fontNameOrNumber]);
ScreenFunctions


Revision [2515]

The oldest known version of this page was created on 2008-03-15 23:19:00 by DocBot
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki
Page was generated in 0.0340 seconds