Tux Guitar

Problems

Subject Partially visible digits on tabulature



Author Message
Kamil Neczaj
Post: Sep 11th 2008 at 7:43 PM

Many times I print a tabulature with chords on which digits which indicates frets to pull are close to one another. When one digit is close to another it partially cover it, but not only cover it by itself, it covers another digit by its white background. The problem exists even with font size for notes as low as 7. On the screen changing font size to 9 also shows this bug. Bigger font sizes such as 9 or 10 are needed especially in printing. Printing with such a big font makes playing using tabulature easier.

The problem may be solved by compositing a tabulature in the way which doesn't allow notes to be cover by background of any other notes. In my opinion also the space between lines of tabulature should increase dynamically when a user changes the font size.


Back to Top
 
Julian
Post: Sep 11th 2008 at 8:03 PM

Sometimes we need to choice beetween quality VS speed.
When you work with a "real time" paint, it's not easy to make all that things and not make the application slowly.
This white background, is because the chord is an image.
it is painted only 1 time instead of every time you refresh the socre.

> the space between lines of tabulature should increase dynamically when a user changes the font size.
This also is not so easy.
The problem here is not all fonts are equal.
i mean, you can set a height, but the X position on the screen is different by each font name.
i tried this, and not get nice results.

But, there is another possible thing already done (but i need to finish it to make dynamic) about line spacings.
If you change the spacing beetween lines, the font is scaled.
As it is not finished it's not included on the end user settings. but you can apply it if you manually edit the config file (with tuxguitar closed) adding this lines:

tab.line-spacing=X
score.line-spacing=X

Where "X" is a pixels number.
e.g:
tab.line-spacing=20
score.line-spacing=15

The plan is make that option on real time (don't need to restart application) and add it as scale (or zoom) feature.


Back to Top
 
Kamil Neczaj
Post: Sep 13th 2008 at 9:14 PM

> This white background, is because the chord is an image.

I understand you, but could you limit the white background around the digits (especially on top and bottom). There is a few pixels of the white background above and below every digit.

> i mean, you can set a height, but the X position on the screen is different by each font name.

I have problems only with height. If I set too large font only bottom of a digit is covered when there is another digit below it.

The tab.line-spacing is exactly what I'm looking for but this value should be increased automatically when user increase the font size. The font size should determine tab.line-spacing.

> Sometimes we need to choice beetween quality VS speed.

It's not the case of speed, because it's enough to set spaces between lines and redraw whole tabulature only when user changes the font size.

I really don't know what's going on with score.line-spacing, I don't feel any difference. The only difference is that tuxguitar won't run if I set this to 20000 ;)

I will add a screenshot tomorrow.


Back to Top
 
Julian
Post: Sep 14th 2008 at 3:49 PM

You didn't understand my point of font size.
there is not only 1 font to select.
you have a lot of fonts available (and different OS, have different fonts).
i suggest you try 1 by 1 of all fonts available, and you'll see that the "size" is not same for each font (it's not real in pixels).
So i can select a font and scale all based on that font.
but, then if you change the font name (same size) you may see all very wrong.

By other hand, user may want see big tablatures, but small fonts. or not.. it's the user choice.

> The tab.line-spacing is exactly what I'm looking for but this value should be increased automatically when user increase the font size

It will be automatically when user set "Zoom: 100%, Zoom: 75%", etc.

> could you limit the white background around the digits
No, images are rectangles.. there aren't circular, triangular images...
It's just a rectangle.
What you can do, is to set a transparent mask.
but here is when i talk about to choice beetween quality and speed.
transparent images take more time to be painted than normal images.
It's not because i say. it's because i already tested this issues.


Back to Top
 
Kamil Neczaj
Post: Sep 14th 2008 at 7:41 PM

> > The tab.line-spacing is exactly what I'm looking for but this value should be increased automatically when user increase the font size

> It will be automatically when user set "Zoom: 100%, Zoom: 75%", etc.

It should also be increased automatically when the selected font is too big to be displayed properly.

> i suggest you try 1 by 1 of all fonts available, and you'll see that the "size" is not same for each font (it's not real in pixels).

Maybe Function getHeight() will help.
http://java.sun.com/j2se/1.5.0/docs/api/java/awt/font/LineMetrics.html

I see that there's no need to add any screenshots (which I've promised to add) because you exactly know what's make the problem.


Back to Top
 
Julian
Post: Sep 14th 2008 at 8:01 PM

The link you posted about getHeight is for "awt" widgets library, while tuxguitar uses OS native libraries through SWT.

SWT also provide methods like that, but the problem is other.
each font char, is also like as an image.
the problem, is that getHeight returns you the height of the expected rectangle. but not about the content on it.
so if you have a font of 8 pixels, but the char inside that font uses 5 pixels, there are no way to know that with a simple algorithm.

Another important issue, is not all fonts support same heights (and you don't see errors, only default minimum/maximum heights under screen).

On the other hand you must understand that not all users think equal, and not all have same likes.
Any user maybe want to see 20 pixels spacing beetween lines, but want see a 10 pixels font.
If tuxguitar auto scale all based on font height, user will not be able todo that.


Back to Top
 
Kamil Neczaj
Post: Sep 14th 2008 at 10:32 PM

> so if you have a font of 8 pixels, but the char inside that font uses 5 pixels, there are no way to know that with a simple algorithm.

So isn't better to treat all this white background with char inside as char? In my opinion it is better to make space for 8 pixels char and have 3 or 4 pixels of space beetween the chars instead of letting them to cover each other.

> On the other hand you must understand that not all users think equal, and not all have same likes.
Any user maybe want to see 20 pixels spacing beetween lines, but want see a 10 pixels font.
If tuxguitar auto scale all based on font height, user will not be able todo that.

Yes, I understand. Many users would want to have so, and I respect them ;). In my opinion the spaces only shouldn't be too small, but they obviously could be bigger if someone want to.

My proposition is:
1. Use getHeight (or something similar from SWT) to estimate minimal space between lines of tabulature for actually using font.
2. Obviously let user to increase this value (relatively to the minimal value) using a slider or another GUI element.
3. Let zoom function to modify spaces between lines, but with taking into consideration the value set in the options.


Back to Top
 
Allyn Dimock
Post: Aug 6th 2009 at 2:32 AM

When adjusting the settings on Windows in TuxGuitar 1.0, where do the changed lines go? Setting
tab.line-spacing=30
score.line-spacing=15
in tuxguitar.LAP had no effect on the tab line spacing in either the editing window or on Print Preview.

I would like to be able to print tab with a 9pt font without having the numbers in the tab overlap each other. It would be nice if I was able to do this from TuxGuitar.

While awaiting your response, I will try to learn to use the converter to .tef format since TEFView provides good control over printing.


Back to Top
 
Allyn Dimock
Post: Aug 6th 2009 at 2:43 AM

Never mind TuxGuitar-TEF, it appears to be input-only.

Exporting .pdf seems to create larger fonts than just printing from TuxGuitar, so that could be a stopgap fix allowing me to print tablature in larger fonts until a real fix is available.


Back to Top
 
Julian
Post: Aug 6th 2009 at 10:12 PM

Allyn Dimock,

the tuxguitar.lap file, is just an info file for the .exe launcher ( it don't have configuration issues )..

the file you look for is config.properties
it's located in your user home folder inside ".tuxguitar-{version}"
i do not exactly remember this user folder now (i don't have windows XP to see it..)

i think it was something like:
Document and Settings/[your logued user]/.tuxguitar-1.2

>> Exporting .pdf seems to create large....
If you want PDF files, i recommend you lilypond (it's opensource and free)..
just export the file to lilypond in tuxguitar..
and then, drag the exporter file to lilypond's executable..
generated PDFs are very nice..
http://lilypond.org/web/index


Back to Top