Hello everybody,
I have an unsolved problem on my computer, my code work in other ones. Run the code without DrawFormattedText
is ok (I displayed some picture in other parts of the code).
Here is the code to display the text:
Screen('Preference', 'SkipSyncTests', 0); %I tryed this part with 0 or 1 but none of them work.
ScreenNumber=max(Screen('Screens'));
[w,wrect] = Screen('OpenWindow',ScreenNumber(end),[0 0 0]);%2400 x 1040
cycleRefresh=Screen('GetFlipInterval', w);
vbl=Screen(w, 'Flip');
[width, height]=Screen('WindowSize', w);
Screen('TextSize',w, 25); % SET TEXT SIZE HERE
Screen('TextFont', w, 'Times');
Screen('TextStyle', w, 1);
Textcolor=[255 255 255];
DrawFormattedText(w, 'Start experiment','center','center',Textcolor);
Here is the message error:
win = 10
Error in function TextBounds: Usage error
The external text renderer plugin failed to render the text string for some reason! % Very helpfull ^^
Error using Screen Usage:
[normBoundsRect, offsetBoundsRect, textHeight, xAdvance] = Screen(‘TextBounds’, windowPtr, text [,x] [,y][,yPositionIsBaseline] [,swapTextDirection]);
Error in DrawFormattedText (line 295) theight = RectHeight(Screen(‘TextBounds’, win, tstring));
Error in SCRIPT_PROSOC_CommentSerialObj (line 102) DrawFormattedText(w, ‘Start experiment’,‘center’,‘center’,Textcolor);