[mythtv] Caption font problem

Jim Stichnoth stichnot at gmail.com
Sat Jul 17 06:16:27 UTC 2010


On Fri, Jul 16, 2010 at 1:00 AM, Mark Kendall <mark.kendall at gmail.com> wrote:
> On 16 Jul 2010, at 07:57, Jim Stichnoth <stichnot at gmail.com> wrote:
>
>> In SubtitleScreen::InitialiseFont(), the caption/subtitle font is
>> hard-coded to FreeMono.  On my system at least, FreeMono.ttf has a
>> problem where the 2-character sequence "st" appears as just "t", maybe
>> with a tiny bit of extra space before the "t".  I guess this is a
>> strange example of kerning or ligatures.  Other sequences like "ff" or
>> "fi" also display with kerning.  I see this with EIA-608 closed
>> captions, and also with text subtitles like .srt files.
>>
>> First, why is a monospaced font using kerning?  In InitialiseFont(), I
>> tried adding "newfont.setKerning(false);" and
>> "newfont.setFixedPitch(true);", but to no effect.
>>
>> Second, I tried switching the hard-coded font to "VeraMono" which is
>> present in my system.  Apparently it couldn't be found, even after
>> copying VeraMono.ttf into the same directories as FreeMono.ttf and
>> running "fc-cache -f", because captions were now displayed in some
>> proportional system default font.  I guess I don't know how to manage
>> fonts in Linux.
>>
>> Any ideas on how to disable kerning of FreeMono, or how to get Myth to
>> use a different font
>
> Jim
>
> Have a look at r25086. Setting the fonts is currently not working - if you could find out why, that would much appreciated:)
>
> Regards
> Mark

Looks like it's because the settings table has entries like
FreeMono.ttf that correspond to filenames, whereas the QFont
constructor wants a font family.  So using a font string like "DejaVu
Sans Mono" works and uses a monospaced font.

I've gotten used to FreeMono.ttf, though, and I was able to "solve"
the kerning problem by downgrading all my copies of FreeMono.ttf to
the 2008-03-23 version
(http://ftp.gnu.org/gnu/freefont/freefont-ttf-20080323.tar.gz) that
predates kerning.

Is this the information you need for dealing with r25086?  Or are you
trying to figure out how to construct a QFont from a font filename
rather than font family?

Jim


More information about the mythtv-dev mailing list