nkh / P5-App-Asciio

Plain ASCII diagram
https://nkh.github.io/P5-App-Asciio/
51 stars 4 forks source link

Unicode not supported. #41

Open nkh opened 1 year ago

nkh commented 1 year ago

@qindapao the Thai below doesn't work properly, do you have an idea why?

สุดท้าย สั่งให้ ditaa แปลงแผนภาพ ascii art เป็นภาพจริงๆ ใช้คำสั่งของ java เพื่อรันโปรแกรม diataa โดยส่งพาร์ทของไฟล์ ascii art ของเราเข้าไป และพาร์ทของภาพที่ต้องการสร้าง ดังนี้ (ในตัวอย่างนี้จะสร้างเป็นไฟล์ภาพชื่อว่า rect.png1)

qindapao commented 1 year ago

@nkh

Could it be the font, I don't know much about Thai either. Do any Thai friends let you support the Thai language?

nkh commented 1 year ago

Possible, more the Chinese text the font makes a difference as you can see in the screenshots.

screenshot_2023-06-28_17-50-35

screenshot_2023-06-28_17-50-20

No Thai friend in my friend list, so it's up to the Asciio's Unicode specialist (you ;) ).

qindapao commented 1 year ago

Maybe we need a font that aligns Thai, 1-to-1 or 2-to-1. I'll study it when I'm free.

qindapao commented 1 year ago

CJK is special in that it can be aligned 2 to 1 just under special fonts. Other Language may also be available.

nkh commented 1 year ago

➤ can't be in a text box

nkh commented 12 months ago

Arabic and Hebrew.

screenshot_2023-07-09_10-23-23

Text export doesn't work

Wide character in print at /home/nadim/nadim/devel/repositories/perl_modules/P5-App-Asciio/blib/lib/App/Asciio/Actions/Clipboard.pm line 105.

qindapao commented 12 months ago

@nkh

The problem with Thai is that the characters have an undefined width, and I haven't figured out the law yet.

Then Arabic and Hebrew are written from right to left, which is not fully understood yet. These two texts are very different from the conventional ones.

Further research is needed.

qindapao commented 11 months ago

@nkh

I found one monospace font for Thai and one for Arabic, but not for Hebrew

Install this font after decompression

KawkabMono-Regular.ttf

configuration string

FONT_FAMILY => 'Kawkab Mono Light Normal',

https://www.f0nt.com/release/sov_monospace/#google_vignette

Install this font after decompression

SOV_monospace-hinted.ttf

configuration string

FONT_FAMILY => 'SOV_monospace Normal',

You can also directly use the file I downloaded:

font_and_asciio_file.zip

I have modified the export to ascii function, and it can be exported normally at present. But the font of the text editor used for display after export also needs to be changed to display properly.

qindapao commented 11 months ago

The principle of Hebrew is the same as that of Arabic. In theory, Arabic is normal, so Hebrew should also be normal. I'll find a suitable font though and test it.

In the documentation I state the special characters in both languages

qindapao commented 9 months ago

@nkh I found a font that aligns Hebrew

Overpass Mono

Overpass Mono Regular.zip

This is the default monospace font in my cygwin environment. I searched online for a long time but couldn't find the right one.Just accidentally discovered my local one can works.

configuration string

FONT_FAMILY => 'Overpass Mono Normal',

image

Currently we support English, Chinese, Japanese, Korean, Thai, Arabic, Hebrew. Can this issue be closed?

nkh commented 9 months ago

@qindapao good job finding the font.

I think it's too early to close it because there are still alignment problems when using multiple languages.

I also think that the system that exists today to handle fonts is wrong, what's needed is the possibility to display different languages in the same string using different languages and different fonts.

qindapao commented 9 months ago

@nkh Ok, keep it for now, but I don't think it needs to be put in the 1.9 milestone, because it is more difficult to solve. And it is not urgent. Because people rarely use several specific languages.

I think it is necessary to put it after 2.2.Supporting multi-language alignment can be a big project.Besides, it's not urgent. I wonder if you agree.

nkh commented 9 months ago

I agree, moved it to 2.0