question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Arabic and Persian scripts not rendered in italic

See original GitHub issue

Wikicode:

De l’{{étyl|ar|fr|mot=طس|tr=tass|sens=[[coupe]], [[écuelle]]}}, lui-même, selon certains, [[emprunté]] au {{étyl|fa|fr|mot=تشت|tr=tašt|sens=tasse}}, [[soucoupe]], ce qui serait inexact selon {{w|Henri Lammens|Lammens}}. Les dérivés''تشت tašt'' et ''طست tast'', respectivement persan et arabe, sont du même radical « de haute antiquité » arabe: ''طس tas'''.

Here, arabic characters are well printed when they are handled by the étyl template. But when those characters are part of the “normal” text, their representation is broken. I mean:

# OK
{{étyl|ar|fr|mot=طس|tr=tass|sens=[[coupe]], [[écuelle]]}}

# BAD
''طس tas''

I will post a screenshot in coming days to demonstrate the issue.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
lasconiccommented, Feb 4, 2021

I could detect a few: https://gist.github.com/lasconic/56762057597b1eaa8c0465ab89c4dc22

added the following in parse_word in render.py and ran --render

    
    regex = r"<i>[^<]*([\u0627-\u064a]+)[^<]*</i>"
    def check_arabic(definition: str):
        matches = re.findall(regex, definition)
        if matches:
            print("####ERROR arabic in italic in definition :" + word, flush=True)
            print(definition, flush=True)
            print(matches, flush=True)
    
    for definition in definitions:
        if isinstance(definition, tuple):
            for subdef in definition:
                if isinstance(subdef, tuple):
                    for subsubdef in subdef:
                        check_arabic(subsubdef)
                else:
                    check_arabic(subdef)
        else:
            check_arabic(definition)
            
    if etymology:
        matches = re.findall(regex, etymology)
        if matches:
            print("####ERROR arabic in italic in etymology :" + word, flush=True)
            print(etymology, flush=True)
            print(matches, flush=True)
1reaction
BoboTiGcommented, Feb 3, 2021

--gen-dict is a killer feature, what an idea! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Where is Arabic Italic originating from? - TypeDrawers
Italic is not only slanted, it's another construction model. Arabic has many different construction models. They don't have to be called italic.
Read more >
T301157 The icon used for italics font in Persian is not italicized
I understand that the file behind the new icon is located at themes/wikimediaui/images/icons/italic-arab-keheh-jeem.svg and is rendered into the CSS as ...
Read more >
Text Layout Requirements for the Arabic Script - W3C
Currently the document focuses on Standard Arabic and Persian. ... Rendering of letters depends not only on their place in the word (initial ......
Read more >
italic or iranic style? - Google Groups
the italic to the left. While there are styles of Perso-Arabic script in which some letters have a noticeable lean to the right,...
Read more >
If non-Latin fonts don't appear correctly on Mac - Apple Support
The Arabic script is used by many languages, but different countries or ... For example, when Urdu is higher than Persian, Arabic characters...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found