home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
General Development (no feature request here!)
RTL text question before starting a patch
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="bob987" data-source="post: 604908" data-attributes="member: 87778"><p>I'm thinking about making a patch to the MP source code but I would like to hear what you think about this before I start.</p><p></p><p>When you set on the option general -> skin -> language contains right to left chars, whenever MP renders a text on the screen it will check if this a RTL text and if so it will reorder its characters.</p><p>Doing so has two disadvantages:</p><p>a) Because the screen get constantly rendered, and the texts hardly get changed allot of CPU time is wasted on the reordering of the characters. (I have an old pc so I can see the effect of this) </p><p>b) While scrolling a text with mixed RTL and LTR text the constant reorder makes the text appear in a wrong order.</p><p></p><p>These problems can be solved by checking to see if the text is a RTL only when text is being set or changed.</p><p></p><p>I was thinking to add a new struct to GUIFont.cs which will hold:</p><p>srting OrigText;</p><p>bool isRTL;</p><p>string RTLText;</p><p></p><p>When a new text will be added to the screen (For example, in GUIButtonControls.cs on "public string Label") instead of just saving the text this new structure will be used and the text will be tested for the RTL.</p><p>Now in all of the Render and DrawText subs the full structure will be passed and not only the label.</p><p>So at the end, in GUIFont.cs -> DrawText there will be no need to constantly use the HandleRTLText(text) function.</p><p></p><p>I beleve that this will work, my only qestion concerns the plugins for MP.</p><p>If I change the Render subs to use the structure insted of the label will this have an effect on plugins that addes UI (e.g. Moving Pictures)? Or maybe the plugins only uses XML so these changes will have no effect?</p><p></p><p>I hope that my explanations are clear enough.</p><p>I am Wating for a replay from someone from the dev before I start doing this.</p><p></p><p>Bob</p></blockquote><p></p>
[QUOTE="bob987, post: 604908, member: 87778"] I'm thinking about making a patch to the MP source code but I would like to hear what you think about this before I start. When you set on the option general -> skin -> language contains right to left chars, whenever MP renders a text on the screen it will check if this a RTL text and if so it will reorder its characters. Doing so has two disadvantages: a) Because the screen get constantly rendered, and the texts hardly get changed allot of CPU time is wasted on the reordering of the characters. (I have an old pc so I can see the effect of this) b) While scrolling a text with mixed RTL and LTR text the constant reorder makes the text appear in a wrong order. These problems can be solved by checking to see if the text is a RTL only when text is being set or changed. I was thinking to add a new struct to GUIFont.cs which will hold: srting OrigText; bool isRTL; string RTLText; When a new text will be added to the screen (For example, in GUIButtonControls.cs on "public string Label") instead of just saving the text this new structure will be used and the text will be tested for the RTL. Now in all of the Render and DrawText subs the full structure will be passed and not only the label. So at the end, in GUIFont.cs -> DrawText there will be no need to constantly use the HandleRTLText(text) function. I beleve that this will work, my only qestion concerns the plugins for MP. If I change the Render subs to use the structure insted of the label will this have an effect on plugins that addes UI (e.g. Moving Pictures)? Or maybe the plugins only uses XML so these changes will have no effect? I hope that my explanations are clear enough. I am Wating for a replay from someone from the dev before I start doing this. Bob [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
RTL text question before starting a patch
Contact us
RSS
Top
Bottom