AmyrAhmady / FarsiType

FarsiType - type in Farsi or Arabic in C++ programs and get a fixed version of it!
MIT License
40 stars 8 forks source link

My attempts failed 😢 AmyrAhmady #4

Open 3xx opened 1 year ago

3xx commented 1 year ago

hi AmyrAhmady I am interested in the project I want a source project supported in Arabic I just want to learn how to call Arabic calligraphy I hope you can help me, because my attempts failed Thank you with all my heart ❤️

AmyrAhmady commented 1 year ago

Please show what you have done already, so I can help @3xx provide more details

thanks

3xx commented 1 year ago

هل يمكنني ان اتواصل معك الدسكورد اوتليجرام

Naeemullah1 commented 1 year ago

hi AmyrAhmady I am interested in the project I want a source project supported in Arabic I just want to learn how to call Arabic calligraphy I hope you can help me, because my attempts failed Thank you with all my heart ❤️

Hi brother . I am involved in game POC cheats making and sometimes my customers require R2L language support. In Imgui 1.88+ they have added support for unicode ranges above FFFF so it essentially supports writing any kind of R2L language now. But for that to work, you need to create logic in your program to read the directions of multi-word multi-directed texts. That is also easily done by finding direction code points in the current side string and deciding where each word in multi-word is changing. Then you can use the indices of those results to work forward for your project and display the wide characters.

Joining those widecharacters properly would need for you to use this project as an example and study it how this person used to join for farsi. You can take this logic and make your own.

If it doesn't help, and you are stuck somewhere, make sure you reach some place in your programming, then come to me, I will show you how to complete the rest.

TG: @mrkhan6263

AmyrAhmady commented 1 year ago

هل يمكنني ان اتواصل معك الدسكورد اوتليجرام

I do not speak Arabic, so please show your pieces of your code just to see how you are trying to achieve this, or send it over Discord at iAmir#8100

AmyrAhmady commented 1 year ago

Hi brother . I am involved in game POC cheats making and sometimes my customers require R2L language support. In Imgui 1.88+ they have added support for unicode ranges above FFFF so it essentially supports writing any kind of R2L language now.

@Naeemullah1 having unicode support has nothing to do with glyph shaping or bidirectional text generation, plus imgui always had that, that's how this project was made and tested on; By adding code ranges here like this:

static const ImWchar ranges[] =
{
    0x0020, 0x00FF, // Basic Latin
    0x2010, 0x205E, // Punctuations
    0x0600, 0x06FF, // Farsi/Arabic
    0xFE00, 0xFEFF, // Farsi/Arabic
    0,
};
Naeemullah1 commented 1 year ago

Hi brother . I am involved in game POC cheats making and sometimes my customers require R2L language support. In Imgui 1.88+ they have added support for unicode ranges above FFFF so it essentially supports writing any kind of R2L language now.

@Naeemullah1 having unicode support has nothing to do with glyph shaping or bidirectional text generation, plus imgui always had that, that's how this project was made and tested on; By adding code ranges here like this:

static const ImWchar ranges[] =
{
  0x0020, 0x00FF, // Basic Latin
  0x2010, 0x205E, // Punctuations
  0x0600, 0x06FF, // Farsi/Arabic
  0xFE00, 0xFEFF, // Farsi/Arabic
  0,
};

Well, I am not expert in text glyphs and all. But I achieved it easily with their latest imgui 1.88+. Unicode support yes, they had it. Support for glyph ranges above 0xFFFF and adding support to enable displaying multi-character wide characters was something they did not have. Although out of the box they do not have direct support for displaying arabic or other R2L, but it can be achieved easily. This API I used it partially for finding the indices of turn points (I don't know what it is called, but that index where the text changes its direction from R2L to L2R or from L2R to R2L). Then I used those indices and this project to join the partial words together and display them without changing imgui core. Somehow it is working for me. And many others did the same concept.

Naeemullah1 commented 1 year ago

هل يمكنني ان اتواصل معك الدسكورد اوتليجرام

I do not speak Arabic, so please show your pieces of your code just to see how you are trying to achieve this, or send it over Discord at iAmir#8100

I am intending to upload it to github soon, with proper credits to the work of this author. I will update this comment when I do this.

[RESERVED FOR UPDATE LINK]