Jump to content

Odd text wrapping in Large Type output (bug?)


Recommended Posts

  • macOS 11.2
  • Alfred


I have some workflows that dump columnar text into LargeType. For some reason, the wrapping gets crazy sometimes. Long lines, especially ones containing many spaces end up with soft line breaks all over the place. I think pictures are worth 1000 words here, so here are a few as well as a workflow that you can download to replicate these:


LargeType Odd Wrapping.alfredworkflow


  • The workflow trigger is keyword "jibber"
  • It generates 10 lines of random text, in 2 columns
  • It accepts an optional parameter in the format #words:separator. e.g "5:="
  • Default is 8 words, with space as the delimiter
  • The first column contains the words, the 2nd column is the md5 hash of those words
  • Output is passed on to LargeType (and copied to the clipboard)




This produces the following output:



Since the text has also been copied to the clipboard, you can paste into Sublime Text etc to verify that is was correctly formatted prior to being displayed by Alfred.



Using 4 words or less produces clean output for some reason:






Using 5+ words (`jibber 5`) triggers the wrapping problem for me:




Using `_` as a separator to join the words (`jibber 8:_`) reduces the problem somewhat (with the exception of the FIRST line for some reason)






These are my general LargeType feature settings (font=SF Mono however I have tried other proportional as well as monospace fonts and while the sizing changes a bit, overall the bug is still reproducible regardless of font)



@Andrew hoping you can have a look. Thank you!



Edited by luckman212
Link to comment
Share on other sites

  • 2 weeks later...

By Jove you've done it!




Thanks again for this 🎉


P.S. to anyone else who happened to download the test workflow above, I noticed a bug in it this morning- $RANDOM is 16-bit only (0-32767) so the jibberish output only contains words beginning with the letters {a,b,c}. Pretty boring. Newer versions of Bash support $SRANDOM which is 32-bit, so changing the shebang to #!/usr/local/bin/bash and RANDOM to SRANDOM will "fix" it.


Also, swapping in gnu-sed for the built in macOS sed speeds up the loop by a factor of 2 for me. Here's an updated version in case anyone cares:

LargeType Odd Wrapping_v0.0.2.alfredworkflow


(use brew install bash gsed to satisfy the requirements...)


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...