From e1dfd65ca22563e4f86a508b27410b6e4de858f4 Mon Sep 17 00:00:00 2001 From: Gregor Fuis Date: Sun, 26 Aug 2012 17:46:48 +0200 Subject: [PATCH] fontconfig: generate fontconfig cache on boot and move hack to support user installed fonts form xbmc init --- .../mediacenter/xbmc-frodo/init.d/93_xbmc | 10 ----- packages/mediacenter/xbmc-rpi/init.d/93_xbmc | 0 packages/mediacenter/xbmc/init.d/93_xbmc | 10 ----- .../x11/other/fontconfig/init.d/35_fontconfig | 43 +++++++++++++++++++ 4 files changed, 43 insertions(+), 20 deletions(-) create mode 100644 packages/mediacenter/xbmc-rpi/init.d/93_xbmc create mode 100644 packages/x11/other/fontconfig/init.d/35_fontconfig diff --git a/packages/mediacenter/xbmc-frodo/init.d/93_xbmc b/packages/mediacenter/xbmc-frodo/init.d/93_xbmc index 6fb03041e9..d33fb5ff40 100644 --- a/packages/mediacenter/xbmc-frodo/init.d/93_xbmc +++ b/packages/mediacenter/xbmc-frodo/init.d/93_xbmc @@ -36,16 +36,6 @@ fi # hack: make addon-bins executable chmod +x /storage/.xbmc/addons/*/bin/* > /dev/null 2>&1 -# hack to support user installed fonts - SUBFONTS="/storage/.xbmc/userdata/fonts" - if [ -d "$SUBFONTS" ]; then - files=$(ls $SUBFONTS/*.[tT][tT][fF] 2>/dev/null | wc -l) - if [ "$files" = "0" ]; then - cp /usr/share/xbmc/media/Fonts/*.[tT][tT][fF] $SUBFONTS/ - fi - mount --bind $SUBFONTS /usr/share/xbmc/media/Fonts/ - fi - # starting autostart script (will be removed later again, dont use it!!!) AUTOSTART="/storage/.config/autostart.sh" if [ -f $AUTOSTART ]; then diff --git a/packages/mediacenter/xbmc-rpi/init.d/93_xbmc b/packages/mediacenter/xbmc-rpi/init.d/93_xbmc new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/mediacenter/xbmc/init.d/93_xbmc b/packages/mediacenter/xbmc/init.d/93_xbmc index 6fb03041e9..d33fb5ff40 100644 --- a/packages/mediacenter/xbmc/init.d/93_xbmc +++ b/packages/mediacenter/xbmc/init.d/93_xbmc @@ -36,16 +36,6 @@ fi # hack: make addon-bins executable chmod +x /storage/.xbmc/addons/*/bin/* > /dev/null 2>&1 -# hack to support user installed fonts - SUBFONTS="/storage/.xbmc/userdata/fonts" - if [ -d "$SUBFONTS" ]; then - files=$(ls $SUBFONTS/*.[tT][tT][fF] 2>/dev/null | wc -l) - if [ "$files" = "0" ]; then - cp /usr/share/xbmc/media/Fonts/*.[tT][tT][fF] $SUBFONTS/ - fi - mount --bind $SUBFONTS /usr/share/xbmc/media/Fonts/ - fi - # starting autostart script (will be removed later again, dont use it!!!) AUTOSTART="/storage/.config/autostart.sh" if [ -f $AUTOSTART ]; then diff --git a/packages/x11/other/fontconfig/init.d/35_fontconfig b/packages/x11/other/fontconfig/init.d/35_fontconfig new file mode 100644 index 0000000000..639deeda32 --- /dev/null +++ b/packages/x11/other/fontconfig/init.d/35_fontconfig @@ -0,0 +1,43 @@ +################################################################################ +# Copyright (C) 2009-2010 OpenELEC.tv +# http://www.openelec.tv +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +# start Avahi Daemon +# +# runlevels: openelec, textmode + + +FC_CACHE_DIRS="/usr/share/fonts/ /usr/share/xbmc/media/Fonts/" + +# hack to support user installed fonts + SUBFONTS="/storage/.xbmc/userdata/fonts" + if [ -d "$SUBFONTS" ]; then + files=$(ls $SUBFONTS/*.[tT][tT][fF] 2>/dev/null | wc -l) + if [ "$files" = "0" ]; then + cp /usr/share/xbmc/media/Fonts/*.[tT][tT][fF] $SUBFONTS/ + fi + mount --bind $SUBFONTS /usr/share/xbmc/media/Fonts/ + fi + + +( + progress "Creating fontconfig cache" + fc-cache $FC_CACHE_DIRS +)& +