[mythtv-users] Perl script to increase fonts that are too small

Michael T. Dean mtdean at thirdcontact.com
Thu Sep 6 16:37:02 UTC 2007

On 09/06/2007 11:36 AM, Alien Anchor wrote:
> I have been trying to find a way to increase font sizes because they look teeny tiny on my 52" TV. It's pretty obnoxious that the font sizes in the setup->appearances menu

The settings:

"Big" font
"Medium" font
"Small" font

are the sizes of the non-themed fonts.  All other font sizes are
specified by the themes.  The settings:

Font size

in the Theme and OSD Theme settings pages allow you to choose "default",
"small", or "big" fonts.  If you choose "default", the value specified
in the theme with the <size> tag will be used.  If you choose "small",
the size specified with <size:small> will be used.  If you choose "big",
the size specified with <size:big> will be used.

Unfortunately, these settings often seem to "do nothing."  The reason
for this is because /many/ of the themes have only specified the <size>
element and do not specify <size:small> and/or <size:big>.

>  only effect the setup menus. I wish the myth developers would make some kind of option to scale the fonts in the themes.

There's a new setting that will be in 0.21, "Fine tune font size (%),"
that does this.

> So, I created a script to increase the font sizes in a theme. (It's attached.) I recursively copied the theme directory of my choice, and then ran this script and copied the output back over the appropriate file. It defaults to doubling the font size, but if you just change the $scale variable, you can scale the fonts as much as you want. You can even use decimal numbers.
> Here's how I used it:
> root at mythtv# cd /usr/share/mythtv/themes/
> root at mythtv# cp -a MythCenter-wide MythCenter-wide-large
> root at mythtv# cd MythCenter-wide-large
> root at mythtv# mv ui.xml ui.xml.orig
> root at mythtv# perl ~/scale-theme-fonts.pl ui.xml.orig > ui.xml
> Then go back into Myth (you may have to restart the frontend) and select your new theme (based on the directory name). It worked perfectly for me. Hopefully you'll have as much luck.

This may be a good start toward a script that would add <size:small> and
<size:big> fonts where they don't currently exist.  Perhaps a  +/- 12.5%
- 20% difference in font size from the default size would make an easy
"quick" change for users.

The downside is that it would also require 3x the testing for theme
developers.  Therefore, before doing any work based on my suggestion,
you may want to talk to Justin Hornsby about his preferences.  It's
possible he may want to just remove the support for <size:small> and
<size:big> and allow users to just modify font sizes with "Fine tune
font size" or by direct editing of the XML, as you've done.

Thanks for writing the script and making it available to the list.


More information about the mythtv-users mailing list