Posts: 1,234
Threads: 194
Joined: May 2015
Reputation:
13
I have two tablets, both 2560x1600 pixels. The S4 is 10.5" and the S7FE is 12.4".
I would expect both tablet to render identical, but that is not the case due to the wonders of Android. We've discussed that years ago.
Identical rendering is imperative when you use ChordPro songs and a master/slave setup. Probably also when you want your annotations to stay consistent.
Snooping around on the internets I was pointed to a setting under Developers Options > Grapics > Minimum Width. On the S4 this is 711 and on the S7FE it is 752. When I set the S7FE to 711 I do get identical rendering. Good. Very good.
But can MSPro control this setting? It would be nice if the setting change was only active during MSPro so that outside MSPro I can benefit of the larger screen characteristics.
Johan
johanvromans.nl — hetgeluidvanseptember.nl — mojore.nl -- howsagoin.nl
Samsung Galaxy Note S7FE (T733) 12.4", Android 13.0, AirTurn Duo & Digit (Gigs).
Samsung Galaxy Note S4 (T830) 10.5", Android 10.0 (maintenance and backup).
Samsung A3 (A320FL), Android 8.0.0 (emergency).
Posts: 13,537
Threads: 302
Joined: Apr 2012
Reputation:
241
Currently, when determining how to render a chord pro or text file, the dimensions of the screen are used to figure out where to wrap text. This creates differences in how the page looks on different devices. The only way to ensure that a page looks identical across devices would be to support an option where you can define the page sizes you want to use for each chord pro file (with a default for this so that you don't have to set it for each new file). So if you know your tablet is something like 2560x1600, you could just set the default page size for chord pro/text files to 2560x1600, and on other tablets that have a lower resolution, they would shrink the page to fit (the same way a PDF page would work), and on tablets with a higher resolution, they would enlarge the page to fit. Normally, I don't apply scaling factors to chord pro pages because I want the text to be as sharp as possible. This approach would require pages to be scaled though, so it could slightly reduce the image quality, but there is no way around that if you want the pages to look identical on each device. I haven't had time to implement this yet (obviously), but it's high on my priority list as I know this is an important thing for users relying on chord pro files across multiple devices.
Mike
Posts: 1,234
Threads: 194
Joined: May 2015
Reputation:
13
(10-07-2021, 05:04 AM)Zubersoft Wrote: Currently, when determining how to render a chord pro or text file, the dimensions of the screen are used to figure out where to wrap text. This creates differences in how the page looks on different devices. The only way to ensure that a page looks identical across devices would be to support an option where you can define the page sizes you want to use for each chord pro file (with a default for this so that you don't have to set it for each new file). So if you know your tablet is something like 2560x1600, you could just set the default page size for chord pro/text files to 2560x1600, and on other tablets that have a lower resolution, they would shrink the page to fit (the same way a PDF page would work), and on tablets with a higher resolution, they would enlarge the page to fit.
AFAICS I don't think that is the case here. Both tablets already have the same pixel dimensions (2560x1600) but the dpi differs. Font sizes are specified in 1/72" points. So a 10pt font on the S4 will take approx. 40 pixels (10/72*287=39.9) and on the S7FE 34 pixels (10/72*243=33.8). In other words, the S4 can take on average 64 characters on a line and the S7FE can take 76 characters. Likewise, the S7FE can display more lines on the page than the S4 and this causes the master/slave sync of ChordPro songs to go out of phase.
Quote:Normally, I don't apply scaling factors to chord pro pages because I want the text to be as sharp as possible.
Fonts are already subpixel rendered so I don't think scaling will change much. It's a matter of multiplying rendering matrices. (Unless you build a pixel image internally and scale the pixels...)
Quote:This approach would require pages to be scaled though, so it could slightly reduce the image quality, but there is no way around that if you want the pages to look identical on each device. I haven't had time to implement this yet (obviously), but it's high on my priority list as I know this is an important thing for users relying on chord pro files across multiple devices.
For the time being the "Developers Options > Grapics > Minimum Width" tweak works for me☺.
Johan
johanvromans.nl — hetgeluidvanseptember.nl — mojore.nl -- howsagoin.nl
Samsung Galaxy Note S7FE (T733) 12.4", Android 13.0, AirTurn Duo & Digit (Gigs).
Samsung Galaxy Note S4 (T830) 10.5", Android 10.0 (maintenance and backup).
Samsung A3 (A320FL), Android 8.0.0 (emergency).
Posts: 13,537
Threads: 302
Joined: Apr 2012
Reputation:
241
10-08-2021, 03:10 AM
(This post was last modified: 10-08-2021, 03:11 AM by Zubersoft.)
The 2560x1600 would be handled using dip (density independent pixels). While both of your tablets have the same resolution, as you have mentioned, the dpi is different, so the width/height that is reported in the application is different for the two. When defining the page size, this would be in measurements that ignores the dpi, and the page would be rendered to that, ensuring that the resulting image is the same on both devices, as all measurements are scaled to handle dpi differences.
I would be rendering a pixel image internally and scaling the pixels, so it will result in a change in appearance. This will allow it to work with the existing framework versus having to try to adjust the font size dynamically to fit the available area which is not something I want to mess with, as fonts don't scale linearly with size (something I learned the hard way as I assumed I could just adjust the font size by fractional amounts to scale text to fit a given area which didn't work).
Mike