[mythtv] font char width on some osd lines

Mark Spieth mark at digivation.com.au
Fri Apr 25 01:54:25 UTC 2008


>just tried this and certainly for projectgreyhem-OSD is makes the
>problem worse
>this is on a gentoo system on an amd64 (not that i think that makes a
>difference)

give this a try. I think it works well.
there is also an issue with font height increase if widescreen and display 
is widescreen when this shouldnt happen. not sure how to check for this case 
and not scale the font. i.e. only increase the font height if the height if 
the video window is shorter than the displays or if the aspect of the video 
is greater than that of the display.

mark

--- ttfont.cpp  (revision 17131)
+++ ttfont.cpp  (working copy)
@@ -629,10 +629,17 @@
    }

    loadedfontsize = (int)(fontsize * m_hmult);
-   xdpi = (int)(xdpi * m_wscale);
+   //xdpi = (int)(xdpi * m_wscale);

    FT_Set_Char_Size(face, 0, loadedfontsize * 64, xdpi, ydpi);

+   FT_Matrix tmatrix;
+   tmatrix.xx = (FT_Fixed)(m_wscale * (1<<16));
+   tmatrix.yx = (FT_Fixed)0;
+   tmatrix.xy = (FT_Fixed)0;
+   tmatrix.yy = (FT_Fixed)(1<<16);
+   FT_Set_Transform(face, &tmatrix, 0);
+
    n = face->num_charmaps;

    for (i = 0; i < n; i++)



More information about the mythtv-dev mailing list