Coder Social home page Coder Social logo

Support for RTL languages about libschrift HOT 3 OPEN

tomolt avatar tomolt commented on June 14, 2024
Support for RTL languages

from libschrift.

Comments (3)

tomolt avatar tomolt commented on June 14, 2024

Yes, RTL languages are something that I want to support, but I'm not sure when I'll get around to it.

I will have to do more research on how they are implemented in TrueType first.
But, if they work the way I think they do, then there will be no changes to libschrift necessary -
It is likely just sftdemo (and any other application that uses libschrift) that has to be changed.

Things get complicated though if an application wishes to support mixed LTR and RTL text (which is very likely).
Then they will need an algorithm that swaps characters around until the entire text is completely LTR (or RTL).
For Unicode, this "BiDi" algorithm is standardized.
But just the reference implementation of that algorithm is two times as large as the entirety of libschrift...

By the way, thanks for the sample text.

from libschrift.

deltabeard avatar deltabeard commented on June 14, 2024

Thank you for your reply and for your great work so far. I'm personally not bothered about LTR and RTL being mixed within the same text. But I wonder if that issue applies to numbers in Persian, which are written LTR within text that is RTL, as shown below.

بیش از ۹۰۰۰ است

The sample text is the poem Bani Adam written by Iranian poet Saadi in 1258. I sourced the text from https://en.wikipedia.org/wiki/Bani_Adam 🙂

from libschrift.

maandree avatar maandree commented on June 14, 2024

When you say disjoined, you mean that text shaping is missing right? Which instead really an RTL issue. RTL, without bidirectional text support, is simply solved by mirroring text without mirroring the glyphs (I think there are some glyphs you have to substitute for mirrored versions, such as brackets), but text shaping is more involved.

from libschrift.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.