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 2
Feature Requests
Adding support for Right-to-left languages (Hebrew, Arabic...)
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="morpheus_xx" data-source="post: 1106875" data-attributes="member: 48495"><p>I spent some more hours in testing of algorithmen, none was perfect (no surprise though!). So back to start. </p><p></p><p>As I've read about DirectWrite, I digged more into the API description and found very useful things for our task:</p><ul> <li data-xf-list-type="ul"><a href="http://sharpdx.org/documentation/api/t-sharpdx-directwrite-textlayout" target="_blank">http://sharpdx.org/documentation/api/t-sharpdx-directwrite-textlayout</a></li> <li data-xf-list-type="ul"><a href="http://sharpdx.org/documentation/api/m-sharpdx-directwrite-bitmaprendertarget-drawglyphrun-1" target="_blank">http://sharpdx.org/documentation/api/m-sharpdx-directwrite-bitmaprendertarget-drawglyphrun-1</a></li> </ul><p>TextLayout does everything which I tried to implement manually. In combination with a custom renderer this brings us much further now. I implemented a custom renderer, which now takes the "pre-processed" textparts, along with position info and an RTL/LTR indicator.</p><p>My current logic still tries to bring string into matching order. This will have issues and is only temporary.</p><p></p><p>The final solution will be to let the custom renderer directly create the BitmapCharacters and their positions. Once this is done, we should have correct support for LTR, RTL and mixed contents.</p><p></p><p>For code look at: <a href="https://github.com/morpheusxx/MediaPortal-2/blob/781b4f6771521d60b211613ed2ed62fd058037f9/MediaPortal/Source/UI/SkinEngine/ContentManagement/AssetCore/TextRenderOrderProcessor.cs#L43-L63" target="_blank">https://github.com/morpheusxx/MediaPortal-2/blob/781b4f6771521d60b211613ed2ed62fd058037f9/MediaPortal/Source/UI/SkinEngine/ContentManagement/AssetCore/TextRenderOrderProcessor.cs#L43-L63</a></p></blockquote><p></p>
[QUOTE="morpheus_xx, post: 1106875, member: 48495"] I spent some more hours in testing of algorithmen, none was perfect (no surprise though!). So back to start. As I've read about DirectWrite, I digged more into the API description and found very useful things for our task: [LIST] [*][url]http://sharpdx.org/documentation/api/t-sharpdx-directwrite-textlayout[/url] [*][url]http://sharpdx.org/documentation/api/m-sharpdx-directwrite-bitmaprendertarget-drawglyphrun-1[/url] [/LIST] TextLayout does everything which I tried to implement manually. In combination with a custom renderer this brings us much further now. I implemented a custom renderer, which now takes the "pre-processed" textparts, along with position info and an RTL/LTR indicator. My current logic still tries to bring string into matching order. This will have issues and is only temporary. The final solution will be to let the custom renderer directly create the BitmapCharacters and their positions. Once this is done, we should have correct support for LTR, RTL and mixed contents. For code look at: [url]https://github.com/morpheusxx/MediaPortal-2/blob/781b4f6771521d60b211613ed2ed62fd058037f9/MediaPortal/Source/UI/SkinEngine/ContentManagement/AssetCore/TextRenderOrderProcessor.cs#L43-L63[/url] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Feature Requests
Adding support for Right-to-left languages (Hebrew, Arabic...)
Contact us
RSS
Top
Bottom