Hello,
To continue to demo Arabic support on AmigaOS 4.1FE, I need an option on Multiview for RightToLeft support ; that’s font that displays from RTL (this is weird, I know).
Also, keep going on watching my 3 videos of Arabic console on os4depot.net - 18/12/2022 http://www.os4depot.net/?function=modul ... leid=12353
Regards,
DGILLES
A RightToLeft option into Multiview support
A RightToLeft option into Multiview support
Last edited by gdridi on Tue Jul 18, 2023 6:41 pm, edited 1 time in total.
Re: A RightToLeft option into Multiview support
Just a question: Maybe the datatype should do the layout like TDTA_WordWrap?
Enjoy the power of ARexx http://aminet.net/package/gfx/conv/GPS2URL
Re: A RightToLeft option into Multiview support
Thank you
I mean a right to left displacement from a right margin.
I mean a right to left displacement from a right margin.
Re: A RightToLeft option into Multiview support
A statement of Ali Gholami Rudi:
"The main issue is that I think a terminal should change neither the position
nor the shape of characters on the screen and rendering bidirectional text
should be handled by programs that use the terminal and not the terminal
itself. A terminal is like a simple shelf on which you put characters;
it should not change their order (or shape) on its own. Breaking this
assumption by default does not seem a good idea. This may be a convenient
feature for some users; in that case I suggest not changing the default
behaviour, and adding an option for that instead."
https://github.com/aligrudi/neatvi/issu ... -537022890
"The main issue is that I think a terminal should change neither the position
nor the shape of characters on the screen and rendering bidirectional text
should be handled by programs that use the terminal and not the terminal
itself. A terminal is like a simple shelf on which you put characters;
it should not change their order (or shape) on its own. Breaking this
assumption by default does not seem a good idea. This may be a convenient
feature for some users; in that case I suggest not changing the default
behaviour, and adding an option for that instead."
https://github.com/aligrudi/neatvi/issu ... -537022890
Enjoy the power of ARexx http://aminet.net/package/gfx/conv/GPS2URL
Re: A RightToLeft option into Multiview support
Hello,
You’re right ; this could be an option at first in multiview : from right margin to let the font going onto the left.
My font mungi-sakkal-kufi is ready for that, but the Length [TextLength()] tend to be negative so we have to take the absolute value for the total of a displayed Arabic word/line [Text()] with the option on.
Try Multiview with the Arabic right margin option set (when released, bounty possible) and the FONT= parameter to Multiview with mungi-kufi.font[without modifying the font], and it should display something when the option is released and TextLength() absolute value done.
Should be nice !
Post scriptum
I not an AmigaOS developer with access to Multiview source code so I can just give Hyperion or AmigaOS developer a bounty to make the job, for this feature. A few hundred buckets no more. Displaying the font as it without modifying it, without beginning from right margin but from left to right (LTR or RTL) should be a first step but bounty will be less than one hundred bucket.
You’re right ; this could be an option at first in multiview : from right margin to let the font going onto the left.
My font mungi-sakkal-kufi is ready for that, but the Length [TextLength()] tend to be negative so we have to take the absolute value for the total of a displayed Arabic word/line [Text()] with the option on.
Try Multiview with the Arabic right margin option set (when released, bounty possible) and the FONT= parameter to Multiview with mungi-kufi.font[without modifying the font], and it should display something when the option is released and TextLength() absolute value done.
Should be nice !
Post scriptum
I not an AmigaOS developer with access to Multiview source code so I can just give Hyperion or AmigaOS developer a bounty to make the job, for this feature. A few hundred buckets no more. Displaying the font as it without modifying it, without beginning from right margin but from left to right (LTR or RTL) should be a first step but bounty will be less than one hundred bucket.
- tonyw
- AmigaOS Core Developer
- Posts: 1479
- Joined: Wed Mar 09, 2011 1:36 pm
- Location: Sydney, Australia
Re: A RightToLeft option into Multiview support
I think it is wrong to modify Multiview to do what graphics.library should do. I have spent some time in the past trying to see how hard it would be to make graphics support RTL* text. A big problem is that there are no spare style bits that you can switch to indicate RTL text. Perhaps the indication should come from the font: If the font is designed to be displayed RTL, then graphics should detect that and display it properly.
In any case, graphics will need a large amount of work to add RTL support. It's not just the Text() functions, it's nearly every internal function, as well as the internal data structures (and state flags). All must be rewritten to support RTL text.
* RTL = Right-to-Left
In any case, graphics will need a large amount of work to add RTL support. It's not just the Text() functions, it's nearly every internal function, as well as the internal data structures (and state flags). All must be rewritten to support RTL text.
* RTL = Right-to-Left
cheers
tony
tony
Re: A RightToLeft option into Multiview support
Yes, it’s wrong to modify Multiview and Polluks, Javier did right too.
Tony,
For the font there’s a flag to indicate that it’s to be render RTL :
29 / The Text Function / Choosing the Font:
FPF_REVPATH
I don’t use it because last time it yields a guru. Perhaps it is just a flag but I not own source code of Font/Graphics to confirm.
My font is reversed without the REVPATH bit set.
I use TypeFace: font editor, from the Aminet and set two times -9 (negative value two times) for the horizontal width increments (probably tf_XSize and CharSpace? Or Kern’s are set?) :
It seems good for monospaced font only, I think.
Yes, it’s partially a hack, but read from RKM :
"
...
tf_CharSpace
This is a pointer to an array of WORDs containing the width of each glyph in the font. Each entry tells the OS how much to increment the current horizontal position (usually RastPort.cp_X).
For reverse path fonts, these values can be negative.
...
"
I use my custom Arabic font with a slightly modify version of LargeFile program from Alfkil os4depot that is start x to the width of the window and it works perfectly logical.
The only thing to do is use or a WORD-absolute value for TextLength() if it’s negative substract 65536. If you use TextLength() function. But LargeFile don’t use this function, only Text() graphics.
I have ´play’ with Datatypes (read the doc on the wiki) and we can do not to modify the Multiview program I agree, if a datatype for RTL Arabic / Hebrew text is detected :
At the same level of text.datatype add:
ArabText.datatype which is essentially the same as text.datatype except two things:
1. Replace TextLength() call with ´absolute value’ ((WORD)TextLength() < 0) ? (65536 - TextLength()) : TextLength().
2. Start x at width of the window "to begin".
I don’t know although, if I need to define moreover an ArabSCII.datatype like an ascii.datatype ; Perhaps?
Best regards,
DGILLES - os4depot.net 18/12/2022
Tony,
For the font there’s a flag to indicate that it’s to be render RTL :
29 / The Text Function / Choosing the Font:
FPF_REVPATH
I don’t use it because last time it yields a guru. Perhaps it is just a flag but I not own source code of Font/Graphics to confirm.
My font is reversed without the REVPATH bit set.
I use TypeFace: font editor, from the Aminet and set two times -9 (negative value two times) for the horizontal width increments (probably tf_XSize and CharSpace? Or Kern’s are set?) :
It seems good for monospaced font only, I think.
Yes, it’s partially a hack, but read from RKM :
"
...
tf_CharSpace
This is a pointer to an array of WORDs containing the width of each glyph in the font. Each entry tells the OS how much to increment the current horizontal position (usually RastPort.cp_X).
For reverse path fonts, these values can be negative.
...
"
I use my custom Arabic font with a slightly modify version of LargeFile program from Alfkil os4depot that is start x to the width of the window and it works perfectly logical.
The only thing to do is use or a WORD-absolute value for TextLength() if it’s negative substract 65536. If you use TextLength() function. But LargeFile don’t use this function, only Text() graphics.
I have ´play’ with Datatypes (read the doc on the wiki) and we can do not to modify the Multiview program I agree, if a datatype for RTL Arabic / Hebrew text is detected :
At the same level of text.datatype add:
ArabText.datatype which is essentially the same as text.datatype except two things:
1. Replace TextLength() call with ´absolute value’ ((WORD)TextLength() < 0) ? (65536 - TextLength()) : TextLength().
2. Start x at width of the window "to begin".
I don’t know although, if I need to define moreover an ArabSCII.datatype like an ascii.datatype ; Perhaps?
Best regards,
DGILLES - os4depot.net 18/12/2022