regarding alphbet file

Post here if you need help getting started with Daggerfall Unity or just want to clarify a potential bug. Questions about playing or modding classic Daggerfall should be posted to Community.
Post Reply
높은산_낮은산
Posts: 40
Joined: Mon Apr 17, 2023 11:33 am

regarding alphbet file

Post by 높은산_낮은산 »

First of all, thank you for your efforts regarding localization.

There was a problem while I was trying to translate this

FONT0003-SDF.txt alphabet files have Memory Limits or Something?

Because I'm trying to translate it into Korean, I put 2300 letters that are used a lot in the Korean alphabet in the alphabet file.
(Hangul has a large number of characters because it combines consonants and vowels to form a single character.)

However, it did not output normally.

Image

So I put only 5 to 10 characters in the alphabet file and printed them out, and it came out normally.

Image

If you put in a small number, it will be output normally, and if you put in a lot, it will be output abnormally.
Therefore, I think there is a problem due to restrictions on font generation.
Is there a problem with Unity font processing?

It would be nice to be able to write about 4,300 characters if possible, but anyway, about 2,300 characters is the lowest number. It cannot be reduced below 2300.

target alphabet

target font

User avatar
Interkarma
Posts: 7245
Joined: Sun Mar 22, 2015 1:51 am

Re: regarding alphbet file

Post by Interkarma »

Hey there. :) From the look of characters, it might be an overflow in atlas packing (texture dimension too small). Thanks for providing target font and alphabet. I'll see what I can do to fix with this in next release.

높은산_낮은산
Posts: 40
Joined: Mon Apr 17, 2023 11:33 am

Re: regarding alphbet file

Post by 높은산_낮은산 »

Thank you for your reply.
I'll look forward to the update.
:D

User avatar
Interkarma
Posts: 7245
Joined: Sun Mar 22, 2015 1:51 am

Re: regarding alphbet file

Post by Interkarma »

I've merged a change that greatly increases total number of characters imported alphabet can support.

Would you be able to provide the larger 4300 character alphabet? I'll test to ensure this change is still adequate.

Thank you. :)

Lywzc
Posts: 107
Joined: Mon Sep 23, 2019 6:15 pm

Re: regarding alphbet file

Post by Lywzc »

I wonder what is the limit now since Japanese and especially Chinese perhaps need much more characters than Korean to display correctly. Noto Sans CJK for example contains 65535 glyphs which is the already at the limit for a single font. Even if we only collect characters that are absolutely needed for the translation it might be over 10k.

User avatar
Interkarma
Posts: 7245
Joined: Sun Mar 22, 2015 1:51 am

Re: regarding alphbet file

Post by Interkarma »

From what I can see, you only need around 3500 characters for over 99% of Chinese writing. They should be able to get by. :)

https://goabroadchina.com/how-many-chin ... er%2099%25.

I estimate the new limit will be somewhere around 6000 (give or take). It capped out around 1400 before, and I've expanded that by about 4.3 times. I can push this out a bit further if needed at some cost to sample quality. Then there's multi-atlas setups if it really becomes a problem. But I'd rather not go there.

Let's leave that for another time. This area of forums is here to support topic creator directly with their problem, not for general discussion.

높은산_낮은산
Posts: 40
Joined: Mon Apr 17, 2023 11:33 am

Re: regarding alphbet file

Post by 높은산_낮은산 »

6000! awesome.

6,000 is more than enough to use Korean.
:)

target 4350 characters

There are some combinations that are rarely used, but it's good to have it because it might be necessary to properly translate nouns, etc used in Daggerfall.

Thank you for your effort. I'm looking forward to the next release.

User avatar
Interkarma
Posts: 7245
Joined: Sun Mar 22, 2015 1:51 am

Re: regarding alphbet file

Post by Interkarma »

Thank you for updated alphabet. I tested this and still hit some overflow at very end of alphabet, so my earlier estimate was high. I've adjusted this again, and everything looks to be working OK now.

Screenshots below of start and end of extended alphabet, just to see that characters are rendering from either end. Sorry images are different sizes, I just quickly snipped from screen.

text1.png
text1.png (164.07 KiB) Viewed 2459 times
text2.png
text2.png (129.62 KiB) Viewed 2459 times

I think that's rendering OK now, but please let me know if any characters aren't looking right. :)

높은산_낮은산
Posts: 40
Joined: Mon Apr 17, 2023 11:33 am

Re: regarding alphbet file

Post by 높은산_낮은산 »

Looks good. I think the letters in the middle will be printed normally.
That's great.
:D

User avatar
Interkarma
Posts: 7245
Joined: Sun Mar 22, 2015 1:51 am

Re: regarding alphbet file

Post by Interkarma »

Awesome, thank you! :) I'll get this into 0.15.2 soon. If you still hit problems with this, just let me know.

There's probably many other things I haven't properly considered when it comes to the wide range of languages out there. I can't possibly tackle all of them in such a limited game, but I'll do my best to help if you raise any further issues after next release.

Post Reply