Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support of Cyrillic, Greek and extended latin #154

Merged
merged 10 commits into from Sep 19, 2019

Conversation

@Cosmatevs
Copy link
Contributor

commented Aug 31, 2019

  • slightly improved existing characters, recreated some
  • recreated diacritics and composed characters of Latin-1 Supplement
  • created monotonic Greek and Cyrillic characters used in most spoken languages
  • redone spacing
  • painfully redone kerning
  • made numbers monospaced (because of dynamic labels)
  • removed Japanese and Chinese characters, and gothic characters, since they're unused
    font
    I am not a professional font designer but I think the effect is rather pleasing.
    Unfortunately, I couldn't see how it looks in the game.
    Tell me if you need any glyphs. I'll see what I can do.
Cosmatevs added 2 commits Aug 31, 2019
@riperiperi

This comment has been minimized.

Copy link
Owner

commented Sep 14, 2019

Looks very good! Sorry for the delay, must have missed the email. Will look at the new characters and rebuild the msdf font for ingame.

@riperiperi

This comment has been minimized.

Copy link
Owner

commented Sep 15, 2019

I noticed you removed characters from the font including some of the symbols. I'd prefer if they were only added - not removed - as if they are not needed they can simply be excluded from the ini. Symbols like ┛, ♪ were used in the ini, and I notice the only one you didn't remove is the stars (because it it used by upgrades).

The ttf is not distributed with the game (we distribute a font resource generated with the ini config), so the extra size is not an issue. Recently I added support for dynamically loadable "extension" character sets, which the japanese characters in this font could still be used for, rather than pulling an additional font.

The glyphs you've added are brilliant - they look indistinguishable from the maxis ones in terms of style, which is as perfect as you can ask for.

@Cosmatevs

This comment has been minimized.

Copy link
Contributor Author

commented Sep 15, 2019

I've kept non-gothic symbols only, and recreated stars. I'll add back all symbols for now, and recreate them later if they're going to be used.

Japanese characters don't follow the font style and they could be difficult to read in small sizes since they're quite thin. For that reason, I think Japanese should have its own font, like Thai has. By the way, I've deleted Japanese characters because it takes a few seconds to save such a big file and it was some inconvenience for me saving a file frequently. I could add Japanese characters back if you want.
(I think the Rounded M+ 2c Bold font matches this font's style well. You can find it on this page, inside rounded-mplus-20150529.zip)

And thanks for your kind words, I tried my best.

Cosmatevs added 4 commits Sep 15, 2019
@Cosmatevs

This comment has been minimized.

Copy link
Contributor Author

commented Sep 17, 2019

I've just added Vietnamese glyphs but double-diacritized capital letters are so high that I'm afraid they're going to be cut.
vietnamese

@riperiperi

This comment has been minimized.

Copy link
Owner

commented Sep 17, 2019

Cosmatevs added 2 commits Sep 18, 2019
minor changes of Vietnamese glyphs
@Cosmatevs

This comment has been minimized.

Copy link
Contributor Author

commented Sep 18, 2019

Thus some Vietnamese characters will be rescaled…

I'll probably be changing/extending this font in the future but for now that's all. Consider using the font I've mentioned before, as a fallback for Japanese characters.

@riperiperi

This comment has been minimized.

Copy link
Owner

commented Sep 18, 2019

It's not really something to consider since the difference is that miniscule. For example, in the english font , has a lot more "resolution per distance" than like, W. I'll give this version a run through the content builder and test it ingame.

ranges=( ,~),( ,±),(´,¸),(º,»),(¿,ň),(Ŋ,ſ),(Ə,Ə),(Ơ,ơ),(Ư,ư)(Ș,ț),(Ȳ,ȳ),(ȷ,ȷ),(ə,ə),(ˆ,ˇ),(˘,˝),(̉,̉),(̒,̓),(̛,̛),(̣,̣),(̦,̦),(;,;),(΄,Ί),(Ό,Ό),(Ύ,Ρ),(Σ,ώ),(Ѐ,џ),(Ґ,ғ),(Җ,ҝ),(Ҡ,ң),(Ҫ,ҫ),(Ү,ҳ),(Ҷ,һ),(Ӏ,ӂ),(ӏ,ӑ),(Ӗ,ә),(Ӣ,ӣ),(Ө,ө),(Ӯ,ӯ),(Ӳ,ӳ),(Ạ,ỹ),(‐,―),(‘,‣),(‥,…),(‰,‰),(′,″),(‹,※),(€,€),(⃘,⃘),(℃,℃),(№,№),(℡,™),(Å,Å),(Ⅰ,ⅿ),(←,↕),(⇒,⇒),(⇔,⇔),(∀,∀),(∂,∃),(∇,∈),(∋,∋),(∑,∑),(√,√),(⇒,⇒),(⇔,⇔),(∀,∀),(∂,∃),(∇,∈),(∋,∋),(∑,∑),(√,√),(∝,∠),(∥,∥),(∧,∬),(∮,∮),(∴,∵),(∽,∽),(≈,≈),(≒,≒),(≠,≡),(≤,≧),(≪,≫),(⊂,⊃),(⊆,⊇),(⊥,⊥),(⊿,⊿),(⌒,⌒),(①,⑳),(─,┃),(┌,┌),(┏,┏),(┐,┐),(┓,└),(┗,┘),(┛,┝),(┠,┠),(┣,┥),(┨,┨),(┫,┬),(┯,┰),(┳,┴),(┷,┸),(┻,┼),(┿,┿),(╂,╂),(╋,╋),(■,□),(▲,△),(▼,▽),(◆,◇),(◊,○),(◎,●),(◯,◯),(★,☆),(♀,♀),(♂,♂),(♪,♪),(♭,♭),(♯,♯),( ,〕),(〝,〟),(,)

This comment has been minimized.

Copy link
@riperiperi

riperiperi Sep 19, 2019

Owner

Missing comma here: (Ư,ư)(Ș,ț)

The MSDFExtension also has trouble importing this file, but that was on my end and will be fixed with a commit to master. For some reason it was forcing read as ASCII rather than UTF-8 (how did thai characters work?)

This comment has been minimized.

Copy link
@Cosmatevs

Cosmatevs Sep 19, 2019

Author Contributor

Added the missing comma and removed a private range that I guess causes problems. But I don't know how the Thai characters will work now since they contain references to characters in the private range.

@riperiperi

This comment has been minimized.

Copy link
Owner

commented Sep 19, 2019

Did some ingame testing, looking very good.

Vietnamese example:
image

Double diacritized:
image

New star on upgrades:
image

Cyrillic:
image

Large Scaling (signed distance field upscaling):
image

@Cosmatevs

This comment has been minimized.

Copy link
Contributor Author

commented Sep 19, 2019

Cyrillic characters aren't kerned well, from what I see. The font has got three kerning subtables – for Latin, Cyrillic and Greek. I'm afraid that the first one only works… By the way, I've just found an unkerned pair.

@riperiperi

This comment has been minimized.

Copy link
Owner

commented Sep 19, 2019

The truetype library that I am using reads one kern-table that can read multiple subtables.

https://github.com/roy-t/TrueType/blob/master/RoyT.TrueType/TrueTypeFont.cs
https://github.com/roy-t/TrueType/blob/master/RoyT.TrueType/Helpers/KerningHelper.cs

If multiple subtables are used, the kerning should still be detected.

@Cosmatevs

This comment has been minimized.

Copy link
Contributor Author

commented Sep 19, 2019

But probably it isn't detected at all, even the Latin part. Look at To in Touch, or ГД.

@riperiperi

This comment has been minimized.

Copy link
Owner

commented Sep 19, 2019

Not sure how that can be the case, as the kerning I added to the font originally did work.

@riperiperi

This comment has been minimized.

Copy link
Owner

commented Sep 19, 2019

image
Compiling it is showing 0 kerning pairs, but I cannot debug the MSDFExtension due to how MGCB works.

@Cosmatevs

This comment has been minimized.

Copy link
Contributor Author

commented Sep 19, 2019

I've saved the font using the old style 'kern' option. Does it work now?

@riperiperi

This comment has been minimized.

Copy link
Owner

commented Sep 19, 2019

image
Yep. Hopefully C# dictionary is fast enough for this.

image

@riperiperi riperiperi merged commit 91a89d7 into riperiperi:master Sep 19, 2019
@riperiperi

This comment has been minimized.

Copy link
Owner

commented Sep 19, 2019

LGTM, thank you so much! I'll commit the change to the MSDF extension and a compiled version separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.