Comment text position difference between Mac and Windows
I’m creating a set of learning objects that need to be accessible on both Mac and Windows computers. In a couple of the learning objects, I need to add emphasis to a line of text. Since you can’t change font style within a comment box, I use two different comment boxes and align them. The problem is that the text line spacing is different between Mac and Windows leading to a text offset like the image below. If I make it work for one platform, then it’s off in the other. Any suggestions on how to make this work? I would LOVE to be able to use different fonts/styles/colors/etc. within a single comment box.
It’s a bit awkward, but you could actually solve it by printing the text using a borderless
[lcd] object. It’s more a workaround than a real solution, but it works.
Ah, that’s a really interesting idea. I’ll give it a shot. Thanks!
You could also put a long rectangular semi-transparent [panel] over the line, with a highlight color. One advantage is that it can be hidden/shown, for example if you want a responsive warning indicator if the user does something potentially hazardous… ;)
I’ve actually done the "hidden" thing with the text so that it only shows up when they are about to do something that could be hazardous. My concern with the panel is that with the different line spacing between Mac and Windows, the panel would be offset compared to the text in one of the two platforms.
Ah, I thought the line spacing was only an issue with two separate comments, not just using one comment box. But you’re saying the line spacings from using "Return" within one comment box is different on different platforms as well? That’s strange…I guess the fonts render differently then.
I noticed something similar in Max 4 within object boxes, on one platform it would be fine but on the other it would wrap a letter and look bad. Seems to have been fixed for Max 5. Still, I like to up the Fixed Width Ratio (to 1.1) for a bit o’ breathing room.
It is with two comment boxes. Because the line height is different–even with the same font–on Mac and Windows, the comment box changes height depending on the platform. If I position the second comment box–the one with the emphasis–below the first comment box, it will look correct on one platform, but not the other. I would assume that if I put all the text in one comment and tried to overlay a panel on the highlighted text, I would still have the same problem since the line height changes from Mac to Windows, but the panel would remain at the same coordinates. If you look at the image I posted above, the one on the right is from a Mac and the left from Windows 7. It’s the same .mxf file in both cases, so the text/font/etc. is all the same. The red text is the second comment, but the black text is all in the same comment box. Notice the vertical space between the first two rows of black text is greater in the right-hand image than it is in the left one.
You might want to check out textbrick at loadbang.net– I use it all the time for x-platform text rendering etc
Ah, I forgot about textbrick. Thanks for the reminder FP.
Forums > MaxMSP