• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Improve linebreak situation for guitar tabs on narrow screens
#1
(Note to Mike: i have collected a few feature ideas in the previous months, hence the multiple new topics opened by me, i hope it is okay that i kept one feature idea per forum thread)

Currently i have not figured out any way to avoid ugly line breaks in tab sections of my chordpro files.

As you can see in the following screenshots at the bottom, if the screen width is lower than necessary, the guitar tabs get rendered useless.

Forgive me if there is some option to fix this available already.

From my logical thinking perspective there would be the following possible solutions:
1) auto-scale based on the number of characters per line (would be nice though if it would only scale the tab section - https://www.chordpro.org/chordpro/directives-env_tab/ - and not the entire .cho file)
2) more intelligent solution to introduce auto-breaks in guitar tabs - possibly way more complex

Example Screenshots:

1) screen width ok:
(i had my tablet in landscape orientation)
[Image: Screenshot-20250222-135458.jpg]

2) screen width too low:
(tablet in portrait orientation)
[Image: Screenshot-20250222-135449.jpg]
Reply
#2
I'm not sure how I want to go about resolving this. Auto-scaling the font used for tab sections is doable, but it would increase the processing time dramatically as MobileSheets would have to gradually reduce the font size (and measuring after each adjustment) to see if it results in an overlap until it finally doesn't. While this may not be a problem for a single file, if a setlist involved 20+ files, this would slow things down noticeably if many of the files had tab sections, as I need to do some of the initial processing for the ChordPro files when the setlist is first loaded so that the total number of pages is calculated correctly. 

I think you may want to consider using a fixed page size. If you tap the A at the top right, and then "Page Size", you can specify a page size such as 1800x2400. MobileSheets will then render to that size and scale the resulting image to match your tablet dimensions. If you set the page size to match the tablet's dimensions in portrait, then adjust the text display settings to look appropriate, then if you rotate the tablet to landscape, it will just scale the image up as needed. You will get a small loss in clarity with the rendering, and it will not utilize the screen dimensions in the same way (it will be more like a PDF), but then the file will look identical in each orientation and you won't have the wrapping issue.

Mike
Reply
#3
(05-28-2025, 05:37 AM)Zubersoft Wrote: I'm not sure how I want to go about resolving this. Auto-scaling the font used for tab sections is doable, but it would increase the processing time dramatically as MobileSheets would have to gradually reduce the font size (and measuring after each adjustment) to see if it results in an overlap until it finally doesn't. While this may not be a problem for a single file, if a setlist involved 20+ files, this would slow things down noticeably if many of the files had tab sections, as I need to do some of the initial processing for the ChordPro files when the setlist is first loaded so that the total number of pages is calculated correctly. 

I think you may want to consider using a fixed page size. If you tap the A at the top right, and then "Page Size", you can specify a page size such as 1800x2400. MobileSheets will then render to that size and scale the resulting image to match your tablet dimensions. If you set the page size to match the tablet's dimensions in portrait, then adjust the text display settings to look appropriate, then if you rotate the tablet to landscape, it will just scale the image up as needed. You will get a small loss in clarity with the rendering, and it will not utilize the screen dimensions in the same way (it will be more like a PDF), but then the file will look identical in each orientation and you won't have the wrapping issue.

Mike

Hi Mike,
thanks for your response!

That is interesting, i don't know any implementation details of course.
I would never want to go in any direction that comes with performance decline of course!
The quick thoughts you have listed in your response all make sense, i just did not know that there is an initial calculation happening for all the files in a setlist, at the same time. I guess you are talking about the "load all" feature?
I am never using that to be honest, just always stepping from song to song without any "preloading" - but thanks for pointing that out, i completely ignored it, unwittingly.

I have tried the fixed width size feature u suggested - it is not entirely my taste, to have everything scaled, but i might use it for some extreme cases.

Some side note on that fixed width feature for everybody who is interested in using it:
it will only start scaling once you set both, width and height, to a value != -1
In the beginning i only set the width and nothing happened Smile
Reply
#4
I solved this problem using "Jpeg conversion"

Image tab scale becomes proportional when embeded in a PDF file.

Mike could eventually offer a "image conversion" of a part of windows (a kind of copy-past) ?

Unfortunatly it is the same with "Buton Intelligent", position become hératic if you change screen proportion or definition...


[Image: attachment.php?aid=3535]


Attached Files Thumbnail(s)
   
Reply
#5
The only other possibility would be to support a custom ChordPro directive that takes orientation into consideration (i.e. {x_mobilesheets_tabsize_portrait: 15} and {x_mobilesheets_tabsize_landscape: 20}) when setting the font size for the tab section. I don't think ChordPro has (or needs) a way to specify different sizes per orientation, as that's really more of an issue a mobile app needs to deal with, but I'm not opposed to something like this if users want it. It does create an incompatibility of sorts with other programs though, but they should just ignore this directive if you use it.

Mike
Reply




Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2025 MyBB Group.