Request Dynamic Text View Width

I find it a not in every case practical that the Text View Width is fixed. What if there would be the option (maybe just a button at the lower bottom of the text view window) to make it dynamic, either dependent on the text size or dependent on the window width?

Or, what if there would be the same buttons as for the text size (+ and – at the bottom of the text view), but for the View Width?

You can set it really big. Then it only responds to the text and you need to add line breaks.

Aligning it with the window width is not useful as it would reflow every time you zoom.

Yes, but when working with tools like word-o-mat it’s a bit annoying to change the View Width via Preferences every time. I would prefer if there would be a faster way to change it.

How many settings would you need? Toggle between a wide and a short one? That could be done with a script too, then you could assign a keyboard shortcut. Or something like Accommodate A-Z of current font in one line.

could a script also increase and decrease the width in steps?

Yes.

Could you give me an example how to script this? Thanks!

# getting the old value
FontViewWidth = Glyphs.intDefaults["GSFontViewWidth"]

#change the FontViewWidth

# setting a new value
Glyphs.intDefaults["GSFontViewWidth"] = FontViewWidth

1 Like

Great, thanks!

Hello. After using of code like this

Glyphs.intDefaults["GSFontViewWidth"] = 10

my Glyphs editor are broken.
All characters in Text View mode are under one another.

And I can not make any change.

The text width parameter in the Settings doing nothing.

Just call it again with a reasonable value? Or set it directly in Preferences.

It’s not working. And reinstallation of Glyphs is not helpful too

What is not working?
Try:
Glyphs.intDefaults["GSFontViewWidth"] = 15000

Thank you. I thought the number of characters should be specified. That’s why it didn’t work. Now it works!

It’s the number of units actually :innocent: