blurymind / YarnClassic

A tool for writing interactive dialogue in games!
MIT License
514 stars 51 forks source link

Spacing is wrong when using the Thai language. #110

Open nattyboyz opened 4 years ago

nattyboyz commented 4 years ago

The font format is right but the spacing is wrong when using the Thai language. Thai font contains the upper and lower character that has 0 lengths and it seems like Yarn just adds extra space to each of them.

example word "สุขีสมบูรณ์" it will turn into "สุขีสมบูรณ์ " (extra space)

image

blurymind commented 4 years ago

Yes unfortunately that is due to Ace editor not supporting non monospaced fonts. It appears that the default multilangual font we currently have doesn't support Thai local, so your browser is reverting to another font which is not monospaced.

I could make it detect the users local and use a monospaced font targeting Asian languages. Currently the Asian languages are not well covered by the font we have

On Tue, Dec 17, 2019, 1:45 PM NattyboyZ notifications@github.com wrote:

The font format is right but the spacing is wrong when using the Thai language. Thai font contains the upper and lower character that has 0 lengths and it seems like Yarn just adds extra space to each of them.

example word "สุขีสมบูรณ์" it will turn into "สุขีสมบูรณ์ " (extra space)

[image: image] https://user-images.githubusercontent.com/686526/70999723-87ce7480-210c-11ea-8f25-fdcdd688d722.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/YarnSpinnerTool/YarnEditor/issues/110?email_source=notifications&email_token=ABRRWVM73WEP6ZETXGPXYV3QZDJYTA5CNFSM4J33V3AKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IBBUSKA, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRRWVMRN7MLX2V2UV5XT4LQZDJYTANCNFSM4J33V3AA .

blurymind commented 4 years ago

A better fix would be to replace Ace with monaco or some other editor that works better, but that would require a huge refactoring

On Wed, Dec 18, 2019, 12:06 AM Todor Imreorov blurymind@gmail.com wrote:

Yes unfortunately that is due to Ace editor not supporting non monospaced fonts. It appears that the default multilangual font we currently have doesn't support Thai local, so your browser is reverting to another font which is not monospaced.

I could make it detect the users local and use a monospaced font targeting Asian languages. Currently the Asian languages are not well covered by the font we have

On Tue, Dec 17, 2019, 1:45 PM NattyboyZ notifications@github.com wrote:

The font format is right but the spacing is wrong when using the Thai language. Thai font contains the upper and lower character that has 0 lengths and it seems like Yarn just adds extra space to each of them.

example word "สุขีสมบูรณ์" it will turn into "สุขีสมบูรณ์ " (extra space)

[image: image] https://user-images.githubusercontent.com/686526/70999723-87ce7480-210c-11ea-8f25-fdcdd688d722.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/YarnSpinnerTool/YarnEditor/issues/110?email_source=notifications&email_token=ABRRWVM73WEP6ZETXGPXYV3QZDJYTA5CNFSM4J33V3AKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IBBUSKA, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRRWVMRN7MLX2V2UV5XT4LQZDJYTANCNFSM4J33V3AA .

blurymind commented 4 years ago

do you know any monospace font that supports most asian languages and is free? This is actually an easy fix, but we will need to bundle another font, preferably not increase the dist size too much

thammawat-s commented 3 years ago

hi. I came across a free monotype Thai font here TlwgTypott-ttf.tar.gz