Rich Text <tighten:factor>

I’m trying to squeeze the text in a Text Editor object to fit my requirements, using Rich Text. The <lineheight:min:max:multiple> tag is working great to squeeze it vertically.

I also need to squeeze it horizontally, and I thought the <tighten:factor> was exactly what I needed, but it does nothing.

Perhaps this only works together with the <linebreak:mode> tag, is that correct?

Can anyone give me an example of how to compress the text horizontally?

I’ve tried many things, and in fact, I can’t seem to get the <linebreak:mode> tag to do anything. I never see any ellipsis no matter what mode I try (although I do not want to truncate at all, I’m just testing it and trying to get horizontal compression).

I do understand that the Text Display Options Line Breaks must be set to either Word Wrap or Don’t Wrap in order to use Rich Text, which brings up another question. What is the relationship between this setting, and the <linebreak:mode> tag, since they can be set to “contradict” each other. Which one gets priority? For example, if the Option is set to Word Wrap, and the <linebreak:clipping> tag is used, which means don’t wrap.

If you can’t get it work you might try using a condensed versions of one of the built-in Mac fonts. Arial, Futura and Helvetica have condensed styles available.

The <tighten> factor is not supposed to do what you want. It is only for use with the truncate text options. It won’t work with multi-line text. The purpose is to shrink the text a bit before taking the next step of truncating it and adding ellipsis. You can see this happen in a lot of Apple windows.

The Rich Text feature is based on Apple’s NSAttributedString class. Basically, the tags allow you to manipulate the options for this class without being an Objective-C or Swift programmer. So the underlying code that actually makes all the display options happen is Apple code, and ProVUE cannot add a display option that the NSAttributedString class does not provide. Horizontal compression is not provided by the NSAttributedString class.

What is the relationship between this setting, and the <linebreak:mode> tag, since they can be set to “contradict” each other. Which one gets priority?

That’s a good question! I did some testing, and it appears that the <linebreak> and <tighten> tags currently do not do anything at all! I think this might be due to a change in macOS, I’m pretty sure they worked at one point. But just now I tried them on multiple versions of macOS and these tags did not work on any of them. So that will need further investigation at some point.

However, even if these tags did work, they would not be what you are looking for. There is no capability in the NSAttributedString to squeeze text horizontally. The best you can do is Gary’s suggestion of a condensed font. Of course you may be displaying Japanese text, so I don’t know if there is such a thing as a condensed font for that.

Yes, I am displaying mixed English and Japanese in a multi-line TEo. I’ve spent days searching for a legal condensed and tight Japanese font that is affordable, and they seem to be hard to find (English is easy!). There are several sites with “free” fonts, just as for English, and it can be difficult to know how legit they are. I’m going to be talking to a designer here who may be able to help me.

I was at the MacExpo in Tokyo years ago when Steve Jobs was on stage, explaining how Apple had licensed some very expensive Japanese fonts for Mac OS, and we were all quite excited. They are nice, with many weights, but don’t include condensed versions. Our Panorama files are used on about six machines for a non-profit, so I’m trying very hard to just stick with the built-in Mac fonts.

Thanks much for the feedback and explanations. At least the line-spacing is adjustable, which solves half my problem. I may be able to adjust my form now to fit what I need.