File: FontInfo.m

package info (click to toggle)
psychtoolbox-3 3.0.19.14.dfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 86,796 kB
  • sloc: ansic: 176,245; cpp: 20,103; objc: 5,393; sh: 2,753; python: 1,397; php: 384; makefile: 193; java: 113
file content (38 lines) | stat: -rw-r--r-- 1,838 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
function FontInfo
% numFonts=FontInfo('NumFonts');        % Return the number of installed fonts
% fontInfoStructArray=FontInfo('Fonts');% Return an array of font info structs
% versionInfo=FontInfo('Version');      % Return version info for Fonts command
%
% OS X: ___________________________________________________________________
% 
% Return information about the text fonts installed on your computer.
% FontInfo may be used in conjunction with Screen('DrawText') to select a
% screen font which satisfies your requirements.  FontInfo('Fonts') may omit
% information in some fields of the returned struct, depending on what
% information the font file itself supplies.  In particular, the
% verticalMetrics and horizontalMetrics substructs are often empty.
%
% The font number associated with a particular font may change if you
% restart your computer or change the installed fonts.  Therefore you 
% should not code font  numbers into your scripts.  Instead, specify fonts
% within your scripts by using font names.  You may pass font names
% directly to Screen('TextFont'), or use the table returned by the FontInfo
% function to find the number of a font which satisfies your criteria for a
% font.  Among those criteria may be the font name itself.
%
% OS 9, WINDOWS, Linux: ___________________________________________________
%
% FontInfo does not exist on OS-9, Windows and Linux.
% _________________________________________________________________________
%
% SEE ALSO: Screen, Screen('TextFont')

% HISTORY
% 7/03/04   awi wrote it.
% 7/10/04   awi cosmetic.
% 7/12/04   awi Divided into platform sections.
% 10/4/05   awi Note here cosmetic changes by dgp between 7/12/04 and 10/4/05   

% Give an error on all platforms if MATLAB fails to find the mex file and
% executes this help  file instead.
AssertMex('FontInfo.m');