diasurgical / devilutionX

Diablo build for modern operating systems
Other
8.08k stars 795 forks source link

Font used in Credits and Support screens, does not have proper greek glyphs. #4000

Open xGnoSiSx opened 2 years ago

xGnoSiSx commented 2 years ago

Version: 1.3 master #3999, 27 Jan

There does seem to be some extra bold greek letters there, but most are missing or are garbled. And it seems that no matter how much I try, I can't provide you guys with a screenshot, even on windowed mode! (how did you achieve that!)

AJenbo commented 2 years ago

(how did you achieve that!)

? It exits the credits when a button is clicked. If that is the issue then use the screen shot tool and set a count down, then start the credits.

The relevant font file: https://github.com/diasurgical/devilutionX/blob/master/Packaging/resources/assets/fonts/22-03.pcx

The Greek symbol mapping: image

For how to adapt the symbols from Unifont see: https://github.com/diasurgical/devilutionX/issues/2893

xGnoSiSx commented 2 years ago

Here a screenshot of the disclaimer page. I had to download a freeware program and set the delay for 20 seconds.

It instantly looks like a total mess. Your posted mapping appears correct. but some mappings are wrong in the font file: 03BC,03BD,03BE for the letters μ,ν,ξ

  1. Random bolding of letters
  2. letter ν (nu) is wrong and replaced with lower case ξ (ksi)
  3. letter μ (mu) is replaced with ν (nu)
  4. letter ω (omega) is replaced with ι (iota)
  5. punctuation seems to be too large!
  6. Capital case letters are smaller than bold lower case letters.
  7. There might be more issues, haven't gone looked at it in detail, but it seems that this glyph set was created as an afterthought, and wasn't tested or used for greek at all.

2022-01-27 11_58_49-DevilutionX disclaimer

xGnoSiSx commented 2 years ago

As a friend just said, it looks like a ransom note!! Not good for the project's Disclaimer page!!!

xGnoSiSx commented 2 years ago

Here's a snip from the font file you posted from gimp. As you can see the font was just thrown together with no concern on how it looks or works.

image

AJenbo commented 2 years ago

Here's a snip from the font file you posted from gimp. As you can see the font was just thrown together with no concern on how it looks or works.

Ouch, I did my best, but I don't speak every language in the world :D

The issue is that Charis SIL Bold does not contain most of the Greek letters so those holes where filled in with letters from Unifont instead.

Feel free to draw up some nicer symbols if you are concerned :)

xGnoSiSx commented 2 years ago

Here's a snip from the font file you posted from gimp. As you can see the font was just thrown together with no concern on how it looks or works.

Ouch, I did my best, but I don't speak every language in the world :D

The issue is that Charis SIL Bold does not contain most of the Greek letters so those holes where filled in with letters from Unifont instead.

Feel free to draw up some nicer symbols if you are concerned :)

Wow, you created that? Without knowing the language? Nice effort!

There are many tools around that create bitmap fonts, with effects including shadows as well. The problem is which font to use as most are under license.

I can easily create a such a bitmap, with hiero that I use for my libgdx projects, but the format (layout) is different, not to say anything about getting the kerning right, just by moving glyphs around. The resultant bitmap from hiero is just a tiled bitmap, but you need to use the suplementary fnt file for the glyph, kerning and other info, I suppose this project must have something equivalent.

https://libgdx.com/wiki/tools/hiero

xGnoSiSx commented 2 years ago

I can make this: https://localfonts.eu/freefonts/traditional-cyrillic-free-fonts/arimo/ into a bitmap. It is under apache 2.0 license, and includes complete cyrilic, greek, latin and umlauts. do you have a complete glyph string for the project (all characters for the font to display on screen)?

Would you be able to add it to the project?

AJenbo commented 2 years ago

The issue with tools like that is that they are often intended for a reduced glyph set where DevilutionX supports the full UTF-8 addressable symbols (It is not fully Unicode compliant as it does not do any form of glyph merging/substitution).

But they also rely on graphical features that we do not support.

The format is pretty simple, unicode broken into chunks of 256 symbols. file name is -.pcx, the symbol width is in the .bin file which is just 256 bytes, one for each symbol, so best edited with a hex editor.

xGnoSiSx commented 2 years ago

Yes, you need to specify the full characters to include in a large string. This is done because most projects don't even need the entire symbol set. Merging and substitution is done on the fnt file. You can specify any texture region for any single one glyph or for more than one glyphs.

Ignore the special effects - however the output has alpha & optionally antialiasing and will need further processing. We need a clear "system" font for the credits, something that would work nicely with few pixels.

Did you do the glyph layouts by hand? You mean there's no tool for the fonts in DevilutionX?

AJenbo commented 2 years ago

I scripted most of it, you can see some of it in the link i gave in the first reply

xGnoSiSx commented 2 years ago

Will study it and get back to you later.

xGnoSiSx commented 2 years ago

This issue comes from the fact that the glyphs in the font are from seperate sources and styles.

Some seems to be taken from a very old extended ascii standard from the DOS era whose purpose was to facilitate partial polytonic greek, and the usage of greek as mathematical symbols (the pig Pi and Sigma stand out for this usage as product and sum).

This is the case because the same characters were found in a very old/ancient complete unicode font for linux.

I don't have the time to fix this - this needs proper care to make it a correct font, not just a weekend of edits - and I lack such graphical skill.

And unfortunately it also afects error messages. perhaps I may do it in the far future, now I look to complete the translation as other concerns are coming in my life.

I will set the credits and error strings as fuzzy and let it be for now...

AJenbo commented 2 years ago

I don't think Charis SIL is considered a DOS era font. It came out in 2006. But the monochrome rendering used in Diablo probably gives it an older feel. As mentioned Unifont is used as a fallback for symbols not found in Charis SIL

You could also find a font with a compatible license that would work well for the Greek portion so we can convert that instead.

xGnoSiSx commented 2 years ago

Not a DOS era font, but the characters seem like they're made for a DOS encoding.

The problem with a compatible font is that it won't mesh with the existing english one. And in the credits roll up, it will stand out.

AJenbo commented 2 years ago

Charis SIL version 6 appears to have Greek symbols. Unfortunately they removed monochrome rendering hints which made some symbols look a bit crooked when we used the font (which is why we stuck with version 5). But once converted it should be easy to go over the Greek symbols and make any needed tweaks.

https://software.sil.org/charis/download/