Results 1 to 2 of 2

Thread: Getting OpenType support missing for script OUTPUT

  1. #1
    Join Date
    Jun 2014
    Posts
    2
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Windows Android

    Unhappy Getting OpenType support missing for script OUTPUT

    I have a simple QlineEdit on my UI. It allows me to enter Hindi language characters (copy from google translator and paste) - (जॉन) qt_langerror.jpg

    But when I change any of the style using stylesheet, for e.g. color changed to red. Now if I paste the same hindi language text (जॉन) it show cubes (boxes) in place of characters and I get output message "OpenType support missing for script"

    Also I tried this using two edit boxes with one of it having color defined in style sheet, I see boxes on other edit box as well (even though I haven't touched its style at all)

    There is no code required, just create hello world program, in designer add a editbox, defined 1 or more style e.g. color in stylesheet and try paste HINDI language characters "जॉन"

    Could anyone help me on this.

  2. #2
    Join Date
    Jun 2014
    Posts
    2
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Windows Android

    Default Re: Getting OpenType support missing for script OUTPUT

    QStringList fileList;
    fileList<<"akshar.ttf"<<"DroidSansDevanagari-Regular.ttf"<<"aparaj.ttf";
    fileList<<"chandas.ttf"<<"mangal.ttf"<<"Kruti_Dev_ 010.ttf";

    QStringList::const_iterator constIterator;
    for (constIterator = fileList.constBegin(); constIterator != fileList.constEnd(); ++constIterator)
    {
    QFile res(":/new/prefix1/" + *constIterator);

    if (res.open(QIODevice::ReadOnly))
    {
    if (QFontDatabase::addApplicationFontFromData(res.rea dAll()) != -1) {
    qDebug()<<"successfully loaded font " + *constIterator;
    }
    else
    {
    qDebug()<<"failed to load font " + *constIterator;
    }
    }
    else
    {
    QString errMsg;
    errMsg = res.errorString();
    qDebug()<<"font file open failed : = " + errMsg ;
    }
    res.close();

    QFont font;
    font.setFamily("akshar");
    QApplication::setFont(font);
    // QTextCodec::setCodecForLocale(QTextCodec::codecFor Name("UTF-8"));
    }

    ui->lineEdit->setFont(QFont("akshar", 10));
    ui->lineEdit->setFont(QFont("mangal", 10));
    ui->lineEdit->setText(QObject::tr("जॉन"));
    ui->lineEdit->hide();
    }

    This doesnt seem good solution, but for here through some trial and error. I am loading fonts (which to my knowledge Qt already supports) as with hello world program it works well until I add one button to UI.

    What I am doing now ? I am creating lineedit, setting font for it, and then setting a HINDI test on it. Then hide this LineEdit as I dont need it.

    Because of doing all I mentioned above now my UI allows me to paste different language text on to other line edits on same UI screen - see attachment.

    What I discovered seems stupid solution but without this line edit will show boxes for hindi text. I tested difference between my working hello world and non working hello world program using version control there is no difference in code, so somehow QT tool runtime forgets HINDI suddenly and then never understands it. But my work around make UI to understand HINDI and allied languages.

Similar Threads

  1. Qt script combined with java script
    By prachi kamble in forum Newbie
    Replies: 8
    Last Post: 16th April 2015, 13:30
  2. Replies: 5
    Last Post: 30th December 2012, 23:37
  3. Replies: 3
    Last Post: 27th August 2011, 21:44
  4. Replies: 2
    Last Post: 1st May 2010, 14:23
  5. Glyph display using the opentype in the Qt4
    By Gaurav K SIngh in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 6th July 2007, 07:27

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.