Indic Text is broken in Edit Verse window

Hi,

While trying to edit songs in Indic text, the Edit Verse window is displaying the text with a lot of dotted circles (0x25CC). Compare the same text in Notepad in the image below. The Thai Text is (apparently) displayed correctly. Could you please look into this issue?
image

Comments

  • This is the font set by your operating system. You'll notice the font in Notepad is different to OpenLP. Change the display font for your operating system.
  • edited December 2017
    Raoul,
    Thanks for the quick reply :smile:
    Is it really a display font issue. Please see font in other windows of OpenLP. It is broken only in the Edit Verse window. It looks to me like a rendering issue. I downloaded the source code and will try to see if I could throw any further light to it. In the mean time can you please check if the widget/tool that display text on Edit Verse window is any different from the tool you use in other places. Thanks in advance,

  • ...hmm.
    On my linux box Indic text appears correctly. So it's could be a display font issue. 
  • It's not different. We leave the font entirely up to the operating system.
  • edited December 2017

    I tried on another Windows machine and the text is broken there as well (This time the display font is different). So I'm inclined to believe that it's a rendering related issue there's something that can be addressed. OpenLP uses ICU5.x for rendering right? I'm looking into the code and will get back to you if I see anything interesting.
  • OpenLP uses Qt. Qt implements the platform's native rendering.
  • Thank you and I've noticed that OpenLP is using Qt. I never worked on Qt before. But going through the code, I had a feeling that it has to do something with Qt's QPlainTextEdit widget. So I tried making a quick text editor (by adapting an example script I found online) and ran the same from the same venv as openlp's and found that the text is rendered correctly. I couldn't run OpenLP from the source as it was throwing an ImportError: cannot import name 'QtWebKit'. I didn't bother to dig into it to solve that issue.

    Here's the code that I tried,
    import sys
    from PyQt5.QtWidgets import QPlainTextEdit, QApplication, QTextEdit, QWidget, QPushButton, QVBoxLayout
    
    class Notepad(QWidget):
        def __init__(self):
            super(Notepad, self).__init__()
            self.text = QPlainTextEdit(self)
            self.clr_btn = QPushButton('clear')
    
            self.init_ui()
    
        def init_ui(self):
            layout = QVBoxLayout()
            layout.addWidget(self.text)
            layout.addWidget(self.clr_btn)
    
            self.setLayout(layout)
            self.setWindowTitle("QPlainTextEditor")
    
            self.show()
    
    app = QApplication(sys.argv)
    writer = Notepad()
    sys.exit(app.exec_())
    
  • Which version of Qt and PyQt5 are you using? We were using an older version of Qt (hence why you get a missing QtWebKit), and the display bug might have been fixed in a newer version of Qt.
  • Also those warning messages seem to indicate that Qt is trying to load OpenType fonts but only getting TrueType
    (or something like that). We'll have to investigate that.
  • edited September 29
    > Which version of Qt and PyQt5 are you using? 

    PYQT_VERSION = 329216
    PYQT_VERSION_STR = '5.6'
    QT_VERSION = 329218
    QT_VERSION_STR = '5.6.2'

    > We were using an older version of Qt (hence why you get a missing QtWebKit), and the display bug might have been fixed in a newer version of Qt.
    Aha, that explains. What would you suggest in this case? I don't know how many users you have from this part of the world, hence how important/feasible it for you to address this issue by upgrading the toolkit. 

    A possible workaround
    Your users can edit the song in an external plain text editor and then copy and paste the songs into the song edit window. Or you can suggest other Open Lyrics editors for editing songs and then import them into OpenLP. 

    Btw, if you want to bundle/distribute/point some Indian (Malayalam) songs, my collection is here: https://github.com/beniza/malayalam_songbook_openlyrics
  • Well, the next release of OpenLP will have an updated Qt5 (it should ship with 5.11).

    Are your songs public domain? Are there any copyrights on those songs?
  • edited October 29
    > Well, the next release of OpenLP will have an updated Qt5 (it should ship with 5.11).
    That a great and exciting news... Thank you for listening! Have you decide on the release date? I'm happy to test a beta version if that helps. Please do let me know. (b e n i z a  [a t] g m a i l)

    > Are your songs public domain? Are there any copyrights on those songs?
    Many are, but some are still copyrighted. Although it's not a big deal in this part of the deal, I think it's better for you to include only the public domain songs in the official bundle.

    I also have Public Domain Bible text (in USFM format) with me. Can OpenLP import USFM/OSIS? If not, I'll have to look for a way to convert the Bibles into the OpenLP native/supported format.

    TIA,
    Benjamin
  • We don't have a release date yet, there's been some big changes, and we're trying to get them done between all our other commitments.

    We'd need permission from the copyright holder(s) to distribute the copyrighted songs, so just the public domain songs would be the only ones we are legally allowed to distribute without permission.

    OpenLP imports from OSIS. If you can convert the USFM into OSIS, then OpenLP should be able to import it.
  • Okay... and appreciate all your efforts. Hope and pray that all those who are part of the dev team may able to find time to make the *big changes*.

    I'll release a separate bundle with only Public Domain songs, that can be packaged for OpenLP. In that way you can be free of Copyright related issues.

    I'll convert my USFM to OSIS and send you the files.
Sign In or Register to comment.