You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think ideally, size should refer to the fretboard and give an upper limit for the font size. If the text is too long however, it should shrink to fit neatly on top of the fretboard.
The text was updated successfully, but these errors were encountered:
Neither the chord name, nor the chord box are centered within the image.
The image width is calculated without taking the length of the chord name into account.
Size '1' behaves differently compared to 2-10. While the latter only scale up the image, the font sizes are arbitrarily increased for size '1'. Most likely, because the text would otherwise be really hard to read, but that explains why the behavior is amplified for size '1'.
The issue reported by Kendall is caused by multiple interferring
calculations.
First of all, the image width is mainly determined by the chord box and
**not** by the chord name, even though the latter can be much longer /
wider. This is solved by resizing the image. The solution is not ideal
and produces some redundant code. The main issue is that we have to
initialize a Graphics instance first to measure the string. But to
initialize the Graphics, we need a Bitmap instance of a certain width.
Another problem I noticed is that neither the chord box, nor the chord
name were properly centered. The widths of both are calculated, but
until now they weren't used to place the elements properly. This is now
fixed so that no matter the final width of the image, the chord box and
name stay nicely centered. I'll run this by Kendall to make sure that
centering the text is what he would expect as well.
This relates to #4.
Here's an example for F#13b9 (on size 2):
![image](https://user-images.githubusercontent.com/14924663/228931971-cf9705f7-6e27-4e8b-9c71-4fe3cf035747.png)
It's even worse on size 1:
![image](https://user-images.githubusercontent.com/14924663/228932076-cc844d39-40bc-457d-acab-038358a8926f.png)
I think ideally, size should refer to the fretboard and give an upper limit for the font size. If the text is too long however, it should shrink to fit neatly on top of the fretboard.
The text was updated successfully, but these errors were encountered: