We've encountered an odd behavior for Screen TextStyle. In minimal form, let's say:
fontA = 'Palatino';
sizeA = 24;
styleA = 0;
fontB = 'Arial';
sizeB = 36;
styleB = 1;
Screen('TextSize', MainWindow, sizeA);
Screen('TextFont', MainWindow, fontA);
Screen('TextStyle', MainWindow, styleA);
DrawFormattedText(MainWindow, 'I should be normal', 'center', 'center');
Screen('Flip', MainWindow);
SitNWait;
Screen('TextSize', MainWindow, sizeB);
Screen('TextFont', MainWindow, fontB);
Screen('TextStyle', MainWindow, styleB);
DrawFormattedText(MainWindow, 'I should be bold', 'center', 'center');
Screen('Flip', MainWindow);
SitNWait;
Screen('TextSize', MainWindow, sizeA);
Screen('TextFont', MainWindow, fontA);
Screen('TextStyle', MainWindow, styleA);
DrawFormattedText(MainWindow, 'I should be normal again', 'center', 'center');
Screen('Flip', MainWindow);
SitNWait;
Screen('TextSize', MainWindow, sizeB);
Screen('TextFont', MainWindow, fontB);
Screen('TextStyle', MainWindow, styleB);
DrawFormattedText(MainWindow, 'now back to bold', 'center', 'center');
Screen('Flip', MainWindow);
SitNWait;
The font and point size changes happen as expected. However, the bold style is not applied to the second screen, but to the third. that is, the style changes appear to take hold not on the very next flip, but on the following one.
This is on OSX (leopard). Matlab 2007b, current beta branch of PTB (last updated on 3/30/09).
Anyone else encounter this problem? Mario, any insights?
thanks
Todd Horowitz
fontA = 'Palatino';
sizeA = 24;
styleA = 0;
fontB = 'Arial';
sizeB = 36;
styleB = 1;
Screen('TextSize', MainWindow, sizeA);
Screen('TextFont', MainWindow, fontA);
Screen('TextStyle', MainWindow, styleA);
DrawFormattedText(MainWindow, 'I should be normal', 'center', 'center');
Screen('Flip', MainWindow);
SitNWait;
Screen('TextSize', MainWindow, sizeB);
Screen('TextFont', MainWindow, fontB);
Screen('TextStyle', MainWindow, styleB);
DrawFormattedText(MainWindow, 'I should be bold', 'center', 'center');
Screen('Flip', MainWindow);
SitNWait;
Screen('TextSize', MainWindow, sizeA);
Screen('TextFont', MainWindow, fontA);
Screen('TextStyle', MainWindow, styleA);
DrawFormattedText(MainWindow, 'I should be normal again', 'center', 'center');
Screen('Flip', MainWindow);
SitNWait;
Screen('TextSize', MainWindow, sizeB);
Screen('TextFont', MainWindow, fontB);
Screen('TextStyle', MainWindow, styleB);
DrawFormattedText(MainWindow, 'now back to bold', 'center', 'center');
Screen('Flip', MainWindow);
SitNWait;
The font and point size changes happen as expected. However, the bold style is not applied to the second screen, but to the third. that is, the style changes appear to take hold not on the very next flip, but on the following one.
This is on OSX (leopard). Matlab 2007b, current beta branch of PTB (last updated on 3/30/09).
Anyone else encounter this problem? Mario, any insights?
thanks
Todd Horowitz