[mythtv-commits] Ticket #3604: Right To Left Text is reversed in OSD

MythTV mythtv at cvs.mythtv.org
Tue Jun 12 07:37:53 UTC 2007


#3604: Right To Left Text is reversed in OSD
-----------------------+----------------------------------------------------
 Reporter:  anonymous  |       Owner:  ijr    
     Type:  defect     |      Status:  new    
 Priority:  minor      |   Milestone:  unknown
Component:  mythtv     |     Version:  unknown
 Severity:  medium     |     Mlocked:  0      
-----------------------+----------------------------------------------------
 Hello,

 Would it be possible to include RTL langauge support in the OSD?
 it works fine in any other module.

 Currently the text is simply reveresed and starts in the left side and not
 on the right side.

 I know there is a "stupid" patch running around:

 diff -u new/osdtypes.cpp old/osdtypes.cpp
 --- new/osdtypes.cpp    2005-02-26 01:32:07.000000000 +0200
 +++ old/osdtypes.cpp    2005-02-05 11:06:56.000000000 +0200
 @@ -3,9 +3,6 @@
  #include <qregexp.h>
  #include <math.h>

 -// erez
 -#include <qtextcodec.h>
 -
  #include <iostream>
  using namespace std;

 @@ -645,18 +642,6 @@
          DrawString(surface, m_displaysize, m_message, fade, maxfade,
 xoff,
                     yoff);
  }
 -
 -const QString HebrewReverse(const QString text) // erez
 -{
 -  static QTextCodec *codec =NULL;
 -  static QTextCodec *codeci =NULL;
 -  if (codeci==NULL) codeci = QTextCodec::codecForName("ISO8859-8I");
 -  if (codec==NULL) codec = QTextCodec::codecForName("ISO8859-8");
 -
 -  const QString text2=codeci->toUnicode(codec->fromUnicode(text));
 -  return text2;
 -}
 -

  void OSDTypeText::DrawString(OSDSurface *surface, QRect rect,
                               const QString &text, int fade, int maxfade,
 @@ -697,8 +682,7 @@
      if (m_usingalt && m_altfont)
          font = m_altfont;

 -    // erez font->DrawString(surface, x, y, text, maxx, maxy, alphamod);
 -    font->DrawString(surface, x, y, HebrewReverse(text), maxx, maxy,
 alphamod); // erez
 +    font->DrawString(surface, x, y, text, maxx, maxy, alphamod);
  }

 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/3604>
MythTV <http://svn.mythtv.org/trac>
MythTV


More information about the mythtv-commits mailing list