GA_TEXTEDITOR_Flow

This forum is for general developer support questions.

GA_TEXTEDITOR_Flow

Postby mritter0 » Fri Mar 30, 2018 3:09 am

When using that tag in texteditor.gadget

GA_TEXTEDITOR_Flow, GV_TEXTEDITOR_Flow_Right,

for right to left text, the horizontal scroll bar should be started all the way to the right, not the left, so it slides to the left by default.

I have tried to set SLIDER_Level to compensate for this but it will not change.
Workbench Explorer - A better way to browse drawers
User avatar
mritter0
 
Posts: 212
Joined: Mon Aug 25, 2014 10:41 pm
Location: Bettendorf, IA, USA

Re: GA_TEXTEDITOR_Flow

Postby broadblues » Fri Mar 30, 2018 6:21 pm

for right to left text,


I don't think right to left text is supported?

GA_TEXTEDITOR_Flow affects the alignment of text not the direction of it.

As such the scroller should continue to work left to right, same as for example it does in wordworth.

It's position at anyone time will depnd on the cursor anyway.
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 540
Joined: Sat Jun 18, 2011 3:40 am
Location: Portsmouth, UK

Re: GA_TEXTEDITOR_Flow

Postby mritter0 » Fri Mar 30, 2018 8:05 pm

I am using it in read only mode. I have not seen right to left text since can't read it, but isn't it written right to left? So displaying it would be correct.

Yes, typing in text would be a whole 'nother thing.
Workbench Explorer - A better way to browse drawers
User avatar
mritter0
 
Posts: 212
Joined: Mon Aug 25, 2014 10:41 pm
Location: Bettendorf, IA, USA

Re: GA_TEXTEDITOR_Flow

Postby broadblues » Fri Mar 30, 2018 8:40 pm

mritter0 wrote:I am using it in read only mode. I have not seen right to left text since can't read it, but isn't it written right to left? So displaying it would be correct.


Again GA_TEXTEDITOR_Flow sets the alignment of text, not it's direction. The autodoc suggests in can be set on a per paragraph basis, but I'm not sure that works for the current implementation. Where I use it in the SketchBlock text tool the whole text gets realigned left right or centre.

I'm not convinced (but welcome correction from anyone who really knows about this) that right to left fonts will work, in general in AmigaOS or more specifically in the texteditor.gadget, but if they did the change of font would be what dictated the change of direction of the scroll bar rather than the above tag.
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 540
Joined: Sat Jun 18, 2011 3:40 am
Location: Portsmouth, UK

Re: GA_TEXTEDITOR_Flow

Postby tonyw » Fri Mar 30, 2018 10:40 pm

There is no support in graphics.library for right-to-left fonts.
cheers
tony
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 1323
Joined: Wed Mar 09, 2011 2:36 pm
Location: Sydney, Australia

Re: GA_TEXTEDITOR_Flow

Postby nbache » Fri Mar 30, 2018 10:50 pm

tonyw wrote:There is no support in graphics.library for right-to-left fonts.
How does Locale Prefs then display the localized version of "Hebrew" (seemingly) right-to-left? Is it constructed internally as an image or something?

Best regards,

Niels
User avatar
nbache
Beta Tester
Beta Tester
 
Posts: 1287
Joined: Mon Dec 20, 2010 8:25 pm
Location: Copenhagen, Denmark

Re: GA_TEXTEDITOR_Flow

Postby tonyw » Sat Mar 31, 2018 11:08 am

I have no idea, Niels. Suffice it to say that I have looked at the source of graphics/Text() to see what has to be done to enable right-left drawing and it's not easy.

Perhaps the Hebrew draws the characters in the normal left-right way, but the character glyphs and characters in the string are reversed?
cheers
tony
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 1323
Joined: Wed Mar 09, 2011 2:36 pm
Location: Sydney, Australia

Re: GA_TEXTEDITOR_Flow

Postby broadblues » Sat Mar 31, 2018 1:41 pm

@Niels

Bascically it cheats. It checks the languages charset and sets the browser nodes justification to right if it happens to be iso-8859-8 but otherwise the text is rendered left to right and I'd guess there the characters are in reverse order in the C string representing it.

I tested out of interest and when you enable Hebrew very few strings are localised (mainly the country names as far as I can tell) and those that are are still rendered left to right and left justified, the only place you see it right justified is in the locale prefs language chooser.
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 540
Joined: Sat Jun 18, 2011 3:40 am
Location: Portsmouth, UK

Re: GA_TEXTEDITOR_Flow

Postby nbache » Sat Mar 31, 2018 8:12 pm

@Tony & @Andy:

Thanks for explaining - I had a feeling it might be something like that.

Oh well, if at least we could get full Unicode working one day, even if only in left-to-right fashion, that would amount to somthing, I guess.

But I'm digressing from the thread's original matter, sorry.

Best regards,

Niels
User avatar
nbache
Beta Tester
Beta Tester
 
Posts: 1287
Joined: Mon Dec 20, 2010 8:25 pm
Location: Copenhagen, Denmark


Return to General Developer Support

Who is online

Users browsing this forum: No registered users and 7 guests