Tiny font alignment

More
09 Nov 2017 11:32 #65648 by vlad_vy
Tiny font alignment was created by vlad_vy
I can do better vertical alignment for TINY_FONT (128x64x1 GUI). Is it worth to implement?

Before fix:


After fix:
Attachments:

Please Log in or Create an account to join the conversation.

More
09 Nov 2017 11:40 #65650 by FDR
Replied by FDR on topic Tiny font alignment
Well, it looks much better, so I would say yes.

Once I made an all new narrow font too, but there was not much interest in that:
www.deviationtx.com/forum/custom-skins/6...-the-bw-transmitters
Probably it is too difficult to edit the config.ini...

Please Log in or Create an account to join the conversation.

More
09 Nov 2017 16:07 - 09 Nov 2017 16:10 #65665 by vlad_vy
Replied by vlad_vy on topic Tiny font alignment
I need to change Channels monitor page also. With new vertical alignment TINY_FONT touch bargraph. Fixed by horizontal offset of labels.

Before fix:


After fix:
Attachments:
Last edit: 09 Nov 2017 16:10 by vlad_vy.

Please Log in or Create an account to join the conversation.

More
09 Nov 2017 16:20 #65666 by FDR
Replied by FDR on topic Tiny font alignment
Changing the channel monitor is not a problem if we supply the new (corrected) font, but the horizontal move might not solve the issue, since in other languages the different letters might touch that bar anyway.
How did it look like with the original font?

Please Log in or Create an account to join the conversation.

More
09 Nov 2017 16:23 - 09 Nov 2017 16:25 #65667 by vlad_vy
Replied by vlad_vy on topic Tiny font alignment
Original screen


TINY_FONT has not languages support.
Attachments:
Last edit: 09 Nov 2017 16:25 by vlad_vy.

Please Log in or Create an account to join the conversation.

More
10 Nov 2017 02:22 - 10 Nov 2017 02:25 #65683 by sbstnp
Replied by sbstnp on topic Tiny font alignment
This may look weird with the small UI, I would keep both fonts with different names, just in case (I know hardly anyone uses the condensed display, I personally can't live without it - but then again, I run my own version with some customisations anyway).


Devo 10 + 4in1
Spektrum Dx9
FrSky Taranis + TBS Crossfire
Attachments:
Last edit: 10 Nov 2017 02:25 by sbstnp.

Please Log in or Create an account to join the conversation.

More
10 Nov 2017 05:00 #65688 by FDR
Replied by FDR on topic Tiny font alignment

sbstnp wrote: This may look weird with the small UI, I would keep both fonts with different names, just in case (I know hardly anyone uses the condensed display, I personally can't live without it - but then again, I run my own version with some customisations anyway).

That's not bad at all.
Or is it with the original font?

Please Log in or Create an account to join the conversation.

More
10 Nov 2017 05:20 #65689 by sbstnp
Replied by sbstnp on topic Tiny font alignment
It's with the original font, the top is aligned higher so characters like lower-case p and g can go one pixel lower.

Devo 10 + 4in1
Spektrum Dx9
FrSky Taranis + TBS Crossfire

Please Log in or Create an account to join the conversation.

More
10 Nov 2017 05:53 #65690 by vlad_vy
Replied by vlad_vy on topic Tiny font alignment
You need to test it. Vertical offset is used for TYNY_FONT, but not for BUTTON_FONT.

Please Log in or Create an account to join the conversation.

More
10 Nov 2017 11:17 - 10 Nov 2017 11:19 #65698 by vlad_vy
Replied by vlad_vy on topic Tiny font alignment
Tested, nothing changed, mixer page with tiny font looks the same.
Last edit: 10 Nov 2017 11:19 by vlad_vy.

Please Log in or Create an account to join the conversation.

More
10 Nov 2017 20:44 #65715 by sbstnp
Replied by sbstnp on topic Tiny font alignment
But did you change line and header height to fit more lines on the screen? I can give you my settings if you want.

Devo 10 + 4in1
Spektrum Dx9
FrSky Taranis + TBS Crossfire

Please Log in or Create an account to join the conversation.

More
11 Nov 2017 06:20 #65733 by vlad_vy
Replied by vlad_vy on topic Tiny font alignment
I changed line height to 8. You can attach your settings for complete testing.

Please Log in or Create an account to join the conversation.

More
15 Dec 2017 10:42 - 15 Dec 2017 11:10 #66516 by vlad_vy
Replied by vlad_vy on topic Tiny font alignment
Now I can properly align any version of 04b03.bdf (tiny font). At the moment it changes old 04b03.fon only, other fonts are not affected and remains the same.

We need change "bdf_to_font.pl"

from:
sub align_chars {
    my($font) = @_;
    my $max_zero = 0;
    foreach my $c (sort {$a <=> $b} keys %$font) {
        last if ($c > 2000);
        $max_zero = $font->{$c}{zero} if($font->{$c}{zero} > $max_zero);
    }
    #Align to baseline
    foreach my $c (keys %$font) {
        if($font->{$c}{zero} < $max_zero) {
            foreach my $col (@{ $font->{$c}{data} }) {
                $col <<= $max_zero - $font->{$c}{zero};
            }
            $font->{$c}{zero} = $max_zero;
        }
    }
}
to:
sub align_chars {
    my($font) = @_;
    my $max_zero = $ascent;
    #Align to baseline
    foreach my $c (keys %$font) {
        if($font->{$c}{zero} < $max_zero) {
            foreach my $col (@{ $font->{$c}{data} }) {
                $col <<= $max_zero - $font->{$c}{zero};
            }
            $font->{$c}{zero} = $max_zero;
        }
    }
}
Last edit: 15 Dec 2017 11:10 by vlad_vy.

Please Log in or Create an account to join the conversation.

Time to create page: 0.129 seconds
Powered by Kunena Forum