Open adals opened 7 years ago
No it does not at the moment, and I personally don't have any plans to add support for it, however I'd be happy to offer whatever guidance I can to anyone who'd like to have a go at adding support for languages with different layouts.
could you guide me if I want to implement it where to start? so i could help
Conrod's text rendering and layout is currently built upon rusttype - it can load fonts and provides an API for retrieving information about glyphs, kerning etc. I'm not sure if rusttype supports languages with layouts other than LTR, so I guess the first step would be to check that it does, or perhaps submit a patch in the case that it does not.
If we can be sure that it is possible to do using rusttype, the next step would be to update conrod's text
module which builds upon rusttype to provide functions and iterators for laying out multi-line text, handle text selection and cursor positioning.
Following this, the Text
and TextEdit
widgets would then likely need to be updated for the changes in the text
logic module.
thanks for information much appreciated
Harfbuzz is probably the best choice to support all languages and is what Mozilla is using:
https://github.com/servo/rust-harfbuzz
adals notifications@github.com escreveu em dom, 20/08/2017 às 16:32 :
thanks for information much appreciated
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/PistonDevelopers/conrod/issues/1049#issuecomment-323592441, or mute the thread https://github.com/notifications/unsubscribe-auth/AVw4yAx_HRyt3JGixoofUpTZ88CKRs18ks5saFF8gaJpZM4O8neH .
thanks but if Mozilla are using rust-harfbuzz why does not Piston use it?
@adals Probably because harfbuzz depends on freetype, and I believe piston aims to keep out c dependencies.
Harfbuzz itself is C I believe. It would be really nice to have a pure Rust equivalent in the future. But it will probably take some time taking in consideration that Harfbuzz itself took more than a decade to be fully implemented (in C).
A possible approach would be to create an Harfbuzz equivalent in Rust (i.e. an OpenType implementation) but start by creating wrappers around Harfbuzz and then replace those wrappers with Rust implementations as time goes by and they are ready for prime time.
Another approach is to start with a very basic subset of OpenType and implement the use cases/languages that have more "demand", but this will probably take longer than just wrapping Harfbuzz. Also Harfbuzz is very fast so it will probably take time to come up with a pure Rust implementation that can compete with Harfbuzz.
@adals Probably because harfbuzz depends on freetype, and I believe piston aims to keep out c dependencies.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
Does conrod support RTL languages like Arabic?