Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Commits

mythtv commit: r23594 by mdean

 

 

MythTV commits RSS feed   Index | Next | Previous | View Threaded


mythtv at cvs

Feb 23, 2010, 11:41 PM

Post #1 of 1 (379 views)
Permalink
mythtv commit: r23594 by mdean

Author: mdean
Date: 2010-02-24 07:41:32 +0000 (Wed, 24 Feb 2010)
New Revision: 23594
Changeset: http://svn.mythtv.org/trac/changeset/23594

Added:

trunk/mythtv/libs/libmythui/mythfontmanager.cpp
trunk/mythtv/libs/libmythui/mythfontmanager.h

Modified:

trunk/mythtv/libs/libmythui/libmythui.pro
trunk/mythtv/libs/libmythui/myththemebase.cpp

Log:

Since Qt4.2, Qt has supported loading fonts that are not installed on the system, so now we can load theme-provided fonts for UI themes.

This change adds a new class, MythFontManager, to manage font file loading and adds calls to ensure we scan theme directories for font files before loading the theme and that we unload no-longer-necessary font files when unloading the theme.

For themers, simply ensure you place (redistributable) TrueType font (.ttf), OpenType font (.otf), or TrueType font collection (.ttc) files anywhere within the theme directory structure, specify the font face within the theme XML as before, and the fonts will be used--whether they're installed on the system or not. No changes to theme files are required.

Thanks to Chris Pinkham for tracking down the Qt QFontDatabase class and its ability to load application fonts--for providing the idea on which this patch is based.



_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-commits

MythTV commits RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.