Failed to load X11 font with name Helvetica. on 32bit Ubuntu12.04

Hi,

 I am trying pursuit (PsychHardware/Eyelinktoolbox/EyelinkDemos/SR_ResearchDemos/pursuit.m), but always get error message given below. 


So I add the line 

Screen('TextFont', window, '-misc-fixed-bold-r-normal--13-100-100-100-c-70-iso8859-1');

before the call to Screen('BlendFunction' ....)   where the error is located.

-misc-fixed-bold-r-normal--13-100-100-100-c-70-iso8859-1   (  ------ listed in the font name given by Available X11 fonts are: ... ... )


I still get the same error messages as given below, still complained that failed to load X11 font name Helvetica. 


I checked the default font , using Screen('Preference', 'defaultFontName')  and get Times as default font.

I tried to use Screen('TextFont', window, 'Times');
 
I still get error message as below.

Now I am lost. Hope I can get help here about what I should do to continue.

I installed textlive-fonts-recommended on my machine, according to someone unknown from internet, it has helvetica font.

Thanks a lot for any help.

LJ

-----------------------------------------------------------error message:

 pursuit
EDFFile: DEMO


PTB-INFO: This is Psychtoolbox-3 for GNU/Linux X11, under Matlab 32-Bit (Version 3.0.11 - Build date: Oct 17 2013).
PTB-INFO: Type 'PsychtoolboxVersion' for more detailed version information.
PTB-INFO: Most parts of the Psychtoolbox distribution are licensed to you under terms of the MIT License, with
PTB-INFO: some restrictions. See file 'License.txt' in the Psychtoolbox root folder for the exact licensing conditions.

PTB-INFO: NVIDIA Corporation - G84 [Quadro FX 1700] GPU found. Trying to establish low-level access...
PTB-INFO: Connected to NVidia G84 [Quadro FX 1700] GPU of NV-50 family with 2 display heads. Beamposition timestamping enabled.
PTB-INFO: Failed to enable realtime-scheduling [Operation not permitted]!
PTB-INFO: You need to run Matlab or Octave with root-privileges, or run the script PsychLinuxConfiguration once for this to work.
PTB-INFO: Failed to enable realtime-scheduling [Operation not permitted]!
PTB-INFO: You need to run Matlab or Octave with root-privileges, or run the script PsychLinuxConfiguration once for this to work.


PTB-INFO: OpenGL-Renderer is NVIDIA Corporation :: Quadro FX 1700/PCIe/SSE2 :: 3.3.0 NVIDIA 304.116
PTB-INFO: VBL startline = 900 , VBL Endline = 933
PTB-INFO: Measured monitor refresh interval from beamposition = 16.689734 ms [59.917074 Hz].
PTB-INFO: Will use beamposition query for accurate Flip time stamping.
PTB-INFO: Measured monitor refresh interval from VBLsync = 16.687617 ms [59.924672 Hz]. (50 valid samples taken, stddev=0.187310 ms.)
PTB-INFO: Reported monitor refresh interval from operating system = 16.698394 ms [59.886000 Hz].
PTB-INFO: Small deviations between reported values are normal and no reason to worry.
PTB-INFO: Support for fast OffscreenWindows enabled.
Running experiment on a 'EYELINK CL 5.00  ' tracker.
Failed to load X11 font with name Helvetica.

Available X11 fonts are:

... ...



Failed to load X11 font with name -*-helvetica-regular-r-*--20-*-*-*.
Try a Screen('TextFont') name according to one of the listed available fonts above.

Error in function DrawText:     Usage error
Couldn't select the requested font with the requested font settings from X11 system!
EYELINK: WARNING! PsychEyelinkCallRuntime() Failed to call eyelink runtime callback function PsychEyelinkDispatchCallback [rc = 1]!
EYELINK: WARNING! Make sure that function is on your Matlab/Octave path and properly initialized.
EYELINK: WARNING! May also be an error during execution of that function. Type ple at command prompt for error messages.
EYELINK: WARNING! Auto-Disabling all callbacks to the runtime environment for safety reasons.
Eyelink: In PsychEyelink_get_input_key(): Error condition detected: Trying to send TERMINATE_KEY abort keycode!
Eyelink: In PsychEyelink_get_input_key(): Error condition detected: Trying to send TERMINATE_KEY abort keycode!
Eyelink: In PsychEyelink_get_input_key(): Error condition detected: Trying to send TERMINATE_KEY abort keycode!
Eyelink: In PsychEyelink_get_input_key(): Error condition detected: Trying to send TERMINATE_KEY abort keycode!
Error in function BlendFunction:     Invalid Window (or Texture) Index provided: It doesn't correspond to an open window or texture.
Did you close it accidentally via Screen('Close') or Screen('CloseAll') ?
pursuit: some error occured
Error using Screen
Usage:

[sourceFactorOld, destinationFactorOld,
colorMaskOld]=Screen('BlendFunction', windowIndex, [sourceFactorNew],
[destinationFactorNew], [colorMaskNew]);

Error in pursuit (line 263)
            Screen('BlendFunction', window, GL_SRC_ALPHA,
            GL_ONE_MINUS_SRC_ALPHA);





So you now managed to install the most recent ptb and fix the graphics, but something is still broken on your setup. Simply answering my questions would have probably been a faster way to make progress, but to each its own...


1. Run PsychLinuxConfiguration, log out and log in again, to fix realtime behaviour. This should have automatically run on your system if you installed via our installer?


2. The high quality text rendering plugin doesn't load for some reason, which is why you get the old and primitive text renderer which is very fragile wrt. font selection. You could get ugly but workable text if you exactly specify a X11 font which is installed on your machine. The slightest deviation in font name, text size or text style will lead to failure. Historically Screen('TextFont', ..., 'Courier') with a 'TextSize' of 12 pixels and a 'TextStyle' of 0 worked - at least that was the default. Other sizes and styles may also work, maybe 24 pixels or 18 pixels. This hasn't been tested in years, but the listing of fonts would allow to narrow down names and sizes.


Run with Screen('Preference','Verbosity', 6) or a higher number. The output should give a hint why the text renderer plugin doesn't load.


Simply installing the package "matlab-psychtoolbox-3" from NeuroDebian should also fix all those problems:


http://neuro.debian.net/pkgs/matlab-psychtoolbox-3.html#binary-pkg-matlab-psychtoolbox-3


or the completely free GNU/Octave based version.


http://neuro.debian.net/pkgs/octave-psychtoolbox-3.html


-mario


Hi Mario,


     Thank you very much for your detailed answer. I really appreciate it. 

     Yes, I changed my graphics card and got the graphics working on my machine. The build you saw in the last poster is the one I build myself (I try to fix some bugs being seen in Eyelinktoolbox). 


     I managed to make the example run by changing the font from Helvecica last night (it is set in EyelinkInitDefaults.m , this can also be modified by el.msgfont='other font you want to use') I can see fonts show up in the screen.  


     After I see your reply, I put Screen('Preference','Verbosity', 6) in my code, the error messages do help. Thanks.  I guess I have different version of the libptbdrawtest library on my machine. somehow the wrong one is used. So I rename all others than the one installed to  /usr/share/matlab/... . Also I change the default setting in EyelinkInitDefaults.m back to Helvetica.  


    Now everything seems to run well.   Thanks again.


LJ