Skip to content

Incorrect Handling of Specific Kurdish Characters in Dart Bidi Package #10

@hamreen

Description

@hamreen

I am facing an issue with the Dart Bidi package related to the incorrect handling and rendering of specific Kurdish characters. The issue arises when using the Bidi algorithm to manage and display text that contains these characters:

U+06B5 (Kurdish LAM WITH SMALL V: ڵ)
U+06CE (Kurdish FARSI YEH WITH THREE DOTS BELOW: ێ)
U+06D5 (Kurdish AE: ە)

Untitled

Context

I have used several fonts that support Kurdish, including NotoSansArabic and NotoSansKurdish. These fonts work perfectly in the FlutterFlow UI and in other environments like MS Word.

Initially, I suspected that the problem was related to the dart_pdf package, and I spent considerable time investigating and debugging the issue. After cloning the dart_pdf repository and reviewing the code extensively, I found that the bug was not in dart_pdf itself, but in the Dart Bidi package, specifically in how the bidi algorithm processes these Kurdish characters.

Additionally, I discovered a related issue on the dart_pdf GitHub repository from 2013 (Issue #1408: Bug in bidi text rendering), which describes a similar problem with the Bidi algorithm not handling certain character sets correctly. This bug still affects current projects, and it is essential for this issue to be addressed.

What I Have Tried
Cloned and investigated dart_pdf: I initially thought the issue was due to dart_pdf. After spending time cloning the repository and reviewing the Bidi implementation within dart_pdf, I realized that the root of the problem was in how the Dart Bidi package processes these Kurdish characters. Because i found that dart_pdf Applies THE BIDIRECTIONAL ALGORITHM using (https://pub.dev/packages/bidi)
4f

Modified various Bidi settings: I experimented with different configurations within the dart_bidi package, including altering character shaping logic and adjusting text handling strategies. However, the incorrect shaping of Kurdish characters persisted.

Despite these efforts, I have been unable to find a solution to this issue, and it appears to be a bug within the dart_bidi package itself.

Similar Issues:
I noticed that similar issues have been reported in other frameworks, which may help better understand the problem because they are exactly the same. (e.g., Stimulsoft and Aspose), so it seems like a broader Unicode rendering issue.

Just for making the problem easier to fix:
In kurdish ڵ is just treated as ل in arabic
In kurdish ێ is just treated as ئ in arabic
In kurdish ە is just treated as ة in arabic

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions