luckman212 Posted January 24, 2021 Share Posted January 24, 2021 (edited) macOS 11.2 Alfred 4.3.1.1214 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 February 5, 2021 by luckman212 Link to comment Share on other sites More sharing options...
luckman212 Posted February 5, 2021 Author Share Posted February 5, 2021 Is anyone else having this problem? Sometimes I feel like this xkcd https://xkcd.com/979 Link to comment Share on other sites More sharing options...
Andrew Posted February 5, 2021 Share Posted February 5, 2021 @luckman212 Alfred is wrapping the Large Type output at approx 50 chars by default, which is why you're seeing this. I've added the following option for the next build, which turns out to be actually really quite useful option: Cheers, Andrew luckman212 1 Link to comment Share on other sites More sharing options...
luckman212 Posted February 5, 2021 Author Share Posted February 5, 2021 Thank you @Andrew ! Yes that's going to be very useful indeed. Much appreciated. Question: will it accept "0" as the wrap parameter? (disable wrapping completely). That would be nice- in case of a very long line, it could just disappear into the right edge of the largetype boundary. Link to comment Share on other sites More sharing options...
Andrew Posted February 5, 2021 Share Posted February 5, 2021 @luckman212 this is now available if you update to the 4.3.2 b1216 pre-release... For now, I've ranged it between 20 and 400 as it gets somewhat unpredictable outside this range (e.g. the size of the font is calculated from the wrapping, and too large wrap makes the font tiny). Link to comment Share on other sites More sharing options...
luckman212 Posted February 5, 2021 Author Share Posted February 5, 2021 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now