Recent

Author Topic: Lazpaint : text tool handling native language.  (Read 1048 times)

Love

  • New Member
  • *
  • Posts: 39
Lazpaint : text tool handling native language.
« on: January 31, 2025, 06:40:40 pm »
Hello,I used google translate to translate 'spoon' in my native language(Nepali) -> 'चम्चा'
But while pasting it in lazpaint it was pasted as 'चम् चा'. There was no space while I pasted it in Lazpaint.

I found this type of error in other programs also.
I tried it to paste in paint.net software. It pasted it correctly.
Can you implement something in lazpaint to handle it.

Have a nice day everybody. :)

Tony Stone

  • Sr. Member
  • ****
  • Posts: 268
Re: Lazpaint : text tool handling native language.
« Reply #1 on: January 31, 2025, 11:06:16 pm »
I think the issue might be related to how "script like characters" are processed. I once watched a friend typing Korean Hangul on his phone, and instead of having a full set of characters, he used a few base symbols that combined to form what looked like single characters.

So I think it has something to do with each character having multiple unicode points and if the program doesn't properly support it... well... it wont look right. 

I don't have a great answer for you.  I just find it interesting and am reading some stuff now and will watch this thread to see if someone gives you an acceptable answer.

Tony Stone

  • Sr. Member
  • ****
  • Posts: 268
Re: Lazpaint : text tool handling native language.
« Reply #2 on: January 31, 2025, 11:16:42 pm »
Can you implement something in lazpaint to handle it.

Well... I think it can be implemented with something like this.
https://github.com/harfbuzz/harfbuzz?tab=readme-ov-file

And according to some of the info i just glanced over in this post I wonder if you can build LazPaint with GTK3 and maybe it will properly render your characters.  hmmm..
https://forum.lazarus.freepascal.org/index.php?topic=67536.30
« Last Edit: January 31, 2025, 11:30:04 pm by Tony Stone »

lainz

  • Hero Member
  • *****
  • Posts: 4691
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: Lazpaint : text tool handling native language.
« Reply #3 on: February 01, 2025, 02:47:17 am »
Bgrabitmap now supports gtk 3.

But it must work in all OS. Since lazpaint is not only Linux.

Love

  • New Member
  • *
  • Posts: 39
Re: Lazpaint : text tool handling native language.
« Reply #4 on: February 01, 2025, 05:51:28 am »
One way of having native language appear correctly is to install a native file font. After translating english into native language using google translate then we can copy that text and use a website that can convert that text into installed font format.
For my native language there is a font named preeti. I use a website that can convert unicode to preeti font. In lazpaint I have to select preeti from font dialog then I can paste it and it will work.

However if that process can be eliminated working will be more easier. :)

circular

  • Hero Member
  • *****
  • Posts: 4391
    • Personal webpage
Re: Lazpaint : text tool handling native language.
« Reply #5 on: February 02, 2025, 04:32:28 pm »
Hi Love!

It's a relief you have a method that converts into glyphs (the resulting shape after combining characters). However it is indeed not convenient.

To make it work with LazPaint, and in fact BGRABitmap, we need to know which characters combine together. In the example, it seems that म्चा is the compound of म् and चा. If I understand correctly, when displayed, you've obtained म्‌चा.

Looking at the wikipedia page of Newari scripts, I conclude that characters combine:
  • Either when there are diacrtric marks (this is already handled)
  • Or when there are multiple consonants (with the example of म्चा)

And I have the impression that consonant combine when the previous consonant has the virama (the "bottom-right apostrophe"). In this case "म्" and not "म" so in the example: "म्" + "च" = "म्च"

Is this correct? Would it cover all cases?
Conscience is the debugger of the mind

Love

  • New Member
  • *
  • Posts: 39
Re: Lazpaint : text tool handling native language.
« Reply #6 on: February 04, 2025, 02:18:21 pm »
 I do not have good grasp of grammar but I made pictures to show differences.
image 1 -> Lazpaint handled. I think you mentioned them as diacrtric marks.

image 2 -> Lazpaint did not handeled. I think it is related to what you mentioned as I have the impression that consonant combine when the previous consonant has the virama. I have re written lazpaint result to help you see clearer.

image 3 -> Using web service to translate google result into native font(they say it unicode to preeti converter) and using it in lazpaint after selecting same font iLazpaint made mistake. So this method did not worked. But another program handeled it.

circular

  • Hero Member
  • *****
  • Posts: 4391
    • Personal webpage
Re: Lazpaint : text tool handling native language.
« Reply #7 on: February 04, 2025, 05:07:09 pm »
Thanks for the feedback. So I will add that up to four letters can be combined when they have the virama (except the last letter of course that can have any vowel).
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 4391
    • Personal webpage
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018