Large Type - fixed font size and dismiss by hitting Esc

Hello,
What I wanted to accomplish is to display a selected text in Large Type AND make it display on the screen until I hit Esc to quit.
I have roughly succeeded in combining Keyboard Maestro, Alfred, and AppleScript.
I think this would be similar if not the same with what @jaredvogt said at Change size of Alert window.

However, there is a problem with Chinese which does not use any space between characters and punctuations. Consequently, the entire paragraph will be shown in one line in Large Type. If the paragraph contains too many characters, the font becomes very small. It is NOT Large at all. It is like showing something like the following (no space between the letters) in Large Type:
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa."

I would like to fix the font size so that a long paragraph may be shown in multiple lines without reducing the font size. Does anyone know if it is possible to accomplish it?

PS: I use Alfred, because it will show the Large Type until I hit Esc to make it disappear. I understand that Keyboard Maestro has "show text in Large Type" functionality, but it looks like we have to assign a period of time (such as 5 seconds) to it (whether by default or by running defaults write com.stairways.keyboardmaestro.engine DisplayLargeTextDisplayPeriod -float 5.0), and it will not go away by hitting Esc. If I can accomplish what I want without using Alfred, it would be better!

The forum does not allow me to upload the Alfred workflow. I'll share the Dropbox link here: https://www.dropbox.com/s/s741kchok4gs1fg/Show%20Large%20Type%20with%20Keyboard%20Maestro.alfredworkflow?dl=0

Thanks a lot!!

image

Display Selected Text Large.kmmacros (3.2 KB)

easy, just insert a Wrap:

Thank you very much, @hello.
This does make a difference. However, it is still not satisfying.
For English texts, it seems to break one paragraph into several. For instance, applying this on the following paragraph:
" However, there is a problem with Chinese which does not use any space between characters and punctuations. Consequently, the entire paragraph will be shown in one line in Large Type. If the paragraph contains too many characters, the font becomes very small. It is NOT Large at all. It is like showing something like the following (no space between the letters) in Large Type:"

Without the wrapping:

With wrapping:

The font size also reduced due to the multiplication of the paragraphs.

For Chinese texts, the font size is still too small. Take the following text for example:
"ไบบไบบไบบไบบไบบไบบ๏ผŒไบบไบบไบบไบบไบบไบบไบบไบบ๏ผŒไบบไบบไบบไบบไบบไบบไบบไบบไบบไบบไบบไบบไบบไบบไบบไบบไบบไบบไบบไบบไบบ๏ผ›ไบบไบบไบบไบบไบบไบบไบบไบบไบบไบบไบบไบบไบบไบบไบบไบบไบบไบบไบบไบบไบบใ€ไบบไบบไบบไบบไบบไบบไบบไบบไบบไบบใ€‚ไบบไบบไบบไบบไบบไบบไบบไบบไบบไบบไบบไบบไบบไบบไบบไบบไบบใ€‚"

If I select only 6 characters, it looks like this:

If I select the entire paragraph, it looks like this:

I really appreciate your help!

I have found an alternative solution to what I wanted.
I'll explain below in case someone may find it useful.

I used Display Text in Window action instead. I don't need Alfred anymore.

Added 0.2s pause so that it will work if I release the hotkey not fast enough.
I had to remove styles first, otherwise, the style (I just want to change the font family and make the font size larger) in the next action will not be applied to the clipboard text (This is a bit dissatisfying, because the original text may have different font colors. Thankfully, text color is not what I need in most cases).

I also make the window into full screen to mimic the large type background. (It looks like it needs to be run for only once. Keyboard Maestro will remember the last window size)

image

1 Like

cool and simpler, congrats!