trip5 / Matrix-Fonts

Fonts For Use with LED Matrix Clocks
MIT License
33 stars 3 forks source link

Add Ukrainian alphabet #5

Closed andrewjswan closed 11 months ago

andrewjswan commented 11 months ago

Add Ukrainian alphabet to Fonts

https://en.wikipedia.org/wiki/Ukrainian_alphabet

andrewjswan commented 11 months ago

@10der I understand the new version of the font in Git, I'll check it out in a while and maybe fix something, but you're welcome to take a look, an outsider's perspective is always good

trip5 commented 11 months ago

WIP. I had to google that. My brain is full of pixels right now. Yes, lol, it is. And I changed my mind. I'll keep babysitting 8 full fonts for now. Latin and Cyrillic isn't too hard to keep up with. But I really have to stop changing my mind about how I want the shape of the letters to look.

I think the tails can be left in the font, if they are not displayed, it won't be a problem, the font is readable.

Nope, they're totally visible if you use a yoffset of 7. For the moment. I'm definitely going to ditch the below-the-baseline tails and lift the fonts up 1 pixel. It takes some clicking but I have a macro that automates the process. I already did it to all the X fonts anyway.

After that, the yoffsets will all match the number in the font file and it'll allow easier copying and pasting glyphs between the font files as well.

@10der Ah I didn't even notice we have a 3rd person here. This thread has been going on and on and on... Haha. I'm glad to get some attention from 2 Ukrainians!

trip5 commented 11 months ago

By the way these 2 characters seem a bit off when together: Бб - in both fonts, particularly б looks off to me. Should I change it? Anything else?

andrewjswan commented 11 months ago

Especially take a look at the different Дд, Єє, Жж, Зз, Іі, Її, Лл and tell me what you think.

All look Super! But Д and д better like this: image

trip5 commented 11 months ago

Excellent to hear. I just fixed it (they're identical in both fonts now). I'm working on the baseline/yoffset issue and I noticed an inconsistency with this one:

In Chunky, I've changed this one to match its lower-case form (which already had the "flat" part on the left): image

The Light font gives them a better curve but I think I got them right there already.

andrewjswan commented 11 months ago

For Chunky Better: small б image

I've changed this one to match its lower-case form

Thumbs Up! :)

trip5 commented 11 months ago

Small б looks good... Matches the height of the other lower-case letters much better.

The shaved one for Light still looks good like this too? image

I'm almost ready to call it done on the regular forms. I think I can stretch them out to the X fonts pretty easily...

Just one more question... this one... image Should the gap be widened to match the Cyrillic H?

And PS. I've toasted any need for yoffset being weird. The number will match the font number. Period.

andrewjswan commented 11 months ago

The shaved one for Light still looks good like this too?

IMHO This looks better: image image

Should the gap be widened to match the Cyrillic H?

There is no such letter in Ukrainian, as far as I know there is no such letter in Russian and Belarusian either.

trip5 commented 11 months ago

A lower-case letter that is wider than it's capital? What a strange letter! I teach English and the most common question from kids is why does A have two lower-case styles that look so different... extra confusing because the capital A is so pointy, the printed a looks like it is a hat and the handwritten α looks more like alpha. Haha. Anyways, the chubby б is in Light already.

Maybe Chunky should get a chubby б too? image

OMG. Another useless letter? Sigh, I probably have a whole bunch in the Latin set, too. It's been driving me crazy. Will you do me a favor then? Post another font file for me, except this time, just hit delete on every letter you think should be un-needed for Ukrainian, Russian, Belarusian. Don't worry if the forms don't match what I have... just use whatever BDF and save as an SFD again That way I can just maximize the windows and compare which ones I have and which ones I can delete. I'll bet I have 20 un-needed characters. They're probably mostly traditional/church Cyrillic.

andrewjswan commented 11 months ago

Maybe Chunky should get a chubby б too?

Better this https://github.com/trip5/Matrix-Fonts/issues/5#issuecomment-1732309403 image

Will you do me a favor then?

I don't think I missed anything, this set should work 100% in Ukrainian, Russian and 99.9% in Belorussian (I don't know it very well). image MatrixChunky8.sfd.zip

trip5 commented 11 months ago

Awesome. That helps a lot! According to Wikipedia most countries that use Cyrillic as a national language essentially use the same set. Working on the 8X fonts now.

trip5 commented 11 months ago

Oh. I get this character now. It's probably from a Ukrainian Lorem Ipsum sort of font test but I see how it works now. The top of the loop is just below the middle of a line... and the curved stem is decorative and can reach the height of a capital letter (but just below is okay too). 2023-09-24-01-53-fontsgeek com

So, Light8X will get this: image

trip5 commented 11 months ago

I'm pretty satisfied with the Cyrillic (and the changes to the Latin I made along the way). If you see any issues, let me know!

I'll leave this issue open until I finish adding Cyrillic to the 6-series. Soon... ish. I won't wait too long or everything I learned here might slip out of my head...

andrewjswan commented 11 months ago

So, Light8X will get this:

Super! For Light :)

andrewjswan commented 11 months ago

I'll leave this issue open until I finish adding Cyrillic to the 6-series. Soon... ish. I won't wait too long or everything I learned here might slip out of my head...

We've done a great job over the week, any comments can be addressed in separate Issues, I've posted a link to the fonts in our local chat room, the people there are active and if they don't like something they'll publicize it in the new Issues. I'm already using these fonts and my family and I are happy with them, but if I need to change anything I'll let you know :)

Or rather, I will change it myself and give you the already changed file for consideration. :)

trip5 commented 11 months ago

All of that sounds great! I'll close this issue for now.

andrewjswan commented 11 months ago

Thank you so much, great job!

andrewjswan commented 11 months ago

Checked the font, everything is fine, but the lettering of the letters Д д is still not quite right, at least in the font Chunky8, it is readable, but not right, it is more correct all the same as I suggested, ie like this: image Can you do it right? Thank you very much! :)

trip5 commented 11 months ago

Done. In all of the 8-series. I had taken some liberties with the Light font, too and it wasn't consistent. Now they're all exactly as above.

trip5 commented 11 months ago

Thanks for the Pixel bitmaps screenshot BTW. That's a great little tool! Can you give me a link to it? I'd link to link to it for future issues (to make it easier for other folks to help out).

And keep your eye out for other inconsistencies. I may not be as quick as I was tonight but I'll be sure to fix any requests when I have time!

andrewjswan commented 11 months ago

Can you give me a link to it? I'd link to link to it for future issues (to make it easier for other folks to help out).

https://pixelit.bastelbunker.de/PixelCreator

10der commented 8 months ago

@andrewjswan hi! What I'm doing wrong?

file_name = "/Users/olegdenisenko/Projects/Python/awtrix/Matrix-Fonts-main/6-series/MatrixLight6.ttf"
font_size = 6
create_image_from_text("hello!привіт!")

image (pay attention on space between "іт"

another issue

file_name = "/Users/olegdenisenko/Projects/Python/awtrix/Matrix-Fonts-main/6-series/MatrixLight6X.ttf"
font_size = 6
create_image_from_text("hello!привіт!")

image

andrewjswan commented 8 months ago

What I'm doing wrong?

I dont use Awtrix, in ESPHome Matrix all Ok

10der commented 8 months ago

What I'm doing wrong?

I dont use Awtrix, in ESPHome Matrix all Ok

it's Ok. but here is PNG file =)

 draw.text((text_x, text_y), in_text, colours, font=font)
trip5 commented 8 months ago

Hi there. Looks like I screwed up the spacing on Cyrillic "і" in Light6 and the baseline of the exclamation point in Light6X.

I'll roll out a fix in a few moments.

andrewjswan commented 8 months ago

ESPHome doesn't have a problem, that's my point.

trip5 commented 8 months ago

Lol, he just got lucky finding 2 errors in my font specific only to those 2 fonts and only 1 error in each font that he noticed. It really is there in the master files... uploading in a few moments.

trip5 commented 8 months ago

@10der - these fonts are usable in Awtrix? If yes, that's fantastic!

10der commented 8 months ago

bug! python

  l = font.getlength("i"); # i - english

result

2 (two)
l = font.getlength("і"); # і ukrainian

result

4 (four)

IMHO bug as fact!

10der commented 8 months ago

face palm! sorry!

MatrixLight6.ttf

trip5 commented 8 months ago

No worries. Did you get the updated font? It should be fixed. And yes, the light font i's should be 2 px.

BTW, next time you should probably just open a new issue as this original issue was about adding Ukranian and your issue was fixing characters...

Let me know if you find any other errors! I took another look but there are hundreds of characters in 8 different font files and I am not perfect! Also, I don't currently personally use either the 6 fonts or non-Latin characters!

10der commented 8 months ago

Thank you so much. Works like a charm!