GA_TEXTEDITOR_Flow

This forum is for general developer support questions.
Post Reply
User avatar
mritter0
Posts: 214
Joined: Mon Aug 25, 2014 9:41 pm
Location: Bettendorf, IA, USA

GA_TEXTEDITOR_Flow

Post by mritter0 »

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
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 600
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: GA_TEXTEDITOR_Flow

Post by broadblues »

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
mritter0
Posts: 214
Joined: Mon Aug 25, 2014 9:41 pm
Location: Bettendorf, IA, USA

Re: GA_TEXTEDITOR_Flow

Post by mritter0 »

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
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 600
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: GA_TEXTEDITOR_Flow

Post by broadblues »

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
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1479
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: GA_TEXTEDITOR_Flow

Post by tonyw »

There is no support in graphics.library for right-to-left fonts.
cheers
tony
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: GA_TEXTEDITOR_Flow

Post by nbache »

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
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1479
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: GA_TEXTEDITOR_Flow

Post by tonyw »

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
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 600
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: GA_TEXTEDITOR_Flow

Post by broadblues »

@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
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: GA_TEXTEDITOR_Flow

Post by nbache »

@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
Post Reply