I’m setting up MWorks in a new set up (new M2 Mac mini + new Mac OS) and observing a weird effect of number of displays on a text stimulus. We can’t see the text stimulus (other stimuli are fine) when we are using only one display. With two displays, it works fine. We match the preference in MWorks server (like width/height of mirror window, etc) but nothing helps. In old Mac/MWorks, a single display and the same MWorks code work fine.
Do you have any suggestion or idea to resolve this? I suspect it could be related to font/size…
That is strange. What you happens when you run the attached experiment? It should fill the display with repetitions of “Hi!” and generate the following warning in the server console:
WARNING: Text for stimulus "stim" does not fit within the specified region and will be truncated
We’ve tested your code and it works totally fine. One thing we tried in our code is that we used the ‘fullscreen’ option and then we saw the text stimulus, even with only one display (i.e., in a mirror window). But now somehow its location is weird and I suspect that it might be something to do with font size and its interaction with x_size, etc. One question I have now is how the size of the text stimulus is decided given font size, x_size, and other miscellaneous options like max_x_size, fullscreen, etc.
Again, everything works fine with two displays so it’s not super-critical at this point.
I think I may have misunderstood your initial problem description. When you said “using only one display”, I thought you meant you were using a fullscreen window on that display and controlling the experiment via MWClient on a different Mac. Did you actually mean that you selected “Mirror window only” in MWServer’s display options?
If you’re using only a mirror window, then you won’t be able to use the same font size as you’d use on a fullscreen window. The reason: the font_size parameter takes values in points, which have no relation to the visual-angle-based sizes of MWorks stimuli. For example, text rendered in a 12-point Helvetica font in an MWorks text stimulus should be about the same size on screen as the same text in the same font in a TextEdit document. This is true for both fullscreen stimulus display windows and mirror-window-only stimulus displays. However, the size of the text relative to other MWorks stimuli is going to be different for fullscreen vs mirror window only, because the windows are different sizes.
As for the relation between font_size and the other size parameters: x_size and y_size set the size of the rectangle in which the text is drawn. However, they don’t affect the font size at all. If the font is too large for the text to fit in the rectangle, it will be truncated. (MWorks issues a warning if this happens.) If the font is much too large, the text may be completely truncated (i.e. disappear entirely). This might be why you can’t see the text stimulus in some cases.
I implemented things this way because points are the standard measure of font size. That said, I appreciate how this can sometimes make sizing a text stimulus awkward, and making it possible to specify font sizes in degrees is on my to-do list. In the meantime, though, if you want the text in an experiment designed for fullscreen display to work in mirror-window-only mode, you’ll have to make the font size smaller.
Note that text stimuli have worked this way ever since they were first added. I’m puzzled as to why you’d see a difference after upgrading MWorks and/or macOS.
Thanks for your kind explanation! It makes sense to me. I was using “mirror window only” and I guess what I have to do now is to adjust the font size to prevent the truncation.
And I think it has nothing to do with the upgrading mworks or Mac. I expect this would have been happening even in the old Mac, if I just use the mirror window.