[Rt-commit] rt branch, 3.8-trunk, updated. rt-3.8.7-293-g4e08424

? sunnavy sunnavy at bestpractical.com
Mon Mar 29 09:03:35 EDT 2010


The branch, 3.8-trunk has been updated
       via  4e084240816cd4865c0d5b179e8e2b803e868d5f (commit)
       via  56e5da5ff661fba61a4e342e3442e12aaca4ddb1 (commit)
       via  f4b65d5140e9db5d30464bfad83ca00e546356ab (commit)
      from  9ec507e62ecea047bdbc9792f3274c248a2a2626 (commit)

Summary of changes:
 Makefile.in               |   14 ++++++++++++--
 aclocal.m4                |    3 ++-
 config.layout             |    9 ++++++++-
 configure.ac              |    3 +++
 etc/RT_Config.pm.in       |   10 ++++++++--
 m4/rt_layout.m4           |    3 ++-
 share/fonts/DroidSans.ttf |  Bin 0 -> 149076 bytes
 share/html/Search/Chart   |    4 +++-
 8 files changed, 38 insertions(+), 8 deletions(-)
 create mode 100755 share/fonts/DroidSans.ttf

- Log -----------------------------------------------------------------
commit f4b65d5140e9db5d30464bfad83ca00e546356ab
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Mon Mar 29 17:22:50 2010 +0800

    add DroidSans.ttf

diff --git a/share/fonts/DroidSans.ttf b/share/fonts/DroidSans.ttf
new file mode 100755
index 0000000..458ba59
Binary files /dev/null and b/share/fonts/DroidSans.ttf differ

commit 56e5da5ff661fba61a4e342e3442e12aaca4ddb1
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Mon Mar 29 17:24:00 2010 +0800

    change ChartFont config to a hash

diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index 24fdc4e..4ad1411 100755
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -1453,7 +1453,7 @@ ticket searches.
 
 Set($DontSearchFileAttachments, undef);
 
-=item C<$ChartFont>
+=item C<%ChartFont>
 
 The L<GD> module (which RT uses for graphs) uses a builtin font that doesn't
 have full Unicode support. You can use a particular TrueType font by setting
@@ -1462,7 +1462,13 @@ support for TrueType fonts to use this option.
 
 =cut
 
-Set($ChartFont, "$RT::BasePath/share/fonts/DroidSansFallback.ttf");
+Set(
+    %ChartFont,
+    'zh-cn'  => "$RT::BasePath/share/fonts/DroidSansFallback.ttf",
+    'zh-tw'  => "$RT::BasePath/share/fonts/DroidSansFallback.ttf",
+    'ja'     => "$RT::BasePath/share/fonts/DroidSansFallback.ttf",
+    'others' => "$RT::BasePath/share/fonts/DroidSans.ttf",
+);
 
 =item C<@Active_MakeClicky>
 
diff --git a/share/html/Search/Chart b/share/html/Search/Chart
index 19bd310..06d634e 100644
--- a/share/html/Search/Chart
+++ b/share/html/Search/Chart
@@ -126,7 +126,9 @@ unless (keys %data) {
 
 my $chart = $chart_class->new( 600 => 400 );
 $chart->set( pie_height => 60 ) if $chart_class eq 'GD::Graph::pie';
-my $font = RT->Config->Get('ChartFont');
+my %font_config = RT->Config->Get('ChartFont');
+my $font = $font_config{ $session{CurrentUser}->UserObj->Lang || '' }
+  || $font_config{'others'};
 $chart->set_title_font( $font, 16 ) if $chart->can('set_title_font');
 $chart->set_legend_font( $font, 16 ) if $chart->can('set_legend_font');
 $chart->set_x_label_font( $font, 14 ) if $chart->can('set_x_label_font');

commit 4e084240816cd4865c0d5b179e8e2b803e868d5f
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Mon Mar 29 21:01:21 2010 +0800

    to install share/fonts

diff --git a/Makefile.in b/Makefile.in
index b96d8f3..898dc8a 100755
--- a/Makefile.in
+++ b/Makefile.in
@@ -106,6 +106,7 @@ RT_LIB_PATH		=	@RT_LIB_PATH_R@
 RT_MAN_PATH		=	@RT_MAN_PATH_R@
 RT_VAR_PATH		=	@RT_VAR_PATH_R@
 RT_DOC_PATH		=	@RT_DOC_PATH_R@
+RT_FONT_PATH		=	@RT_FONT_PATH_R@
 RT_LOCAL_PATH		=	@RT_LOCAL_PATH_R@
 LOCAL_PLUGIN_PATH	=	@RT_LOCAL_PATH_R@/plugins
 LOCAL_ETC_PATH		=	@LOCAL_ETC_PATH_R@
@@ -287,7 +288,7 @@ upgrade-instruct:
 
 upgrade: testdeps config-install dirs files-install fixperms upgrade-instruct
 
-upgrade-noclobber: config-install dirs libs-install html-install bin-install local-install doc-install fixperms
+upgrade-noclobber: config-install dirs libs-install html-install bin-install local-install doc-install font-install fixperms
 
 
 # {{{ dependencies
@@ -352,6 +353,7 @@ fixperms:
 # {{{ dirs
 dirs:
 	$(INSTALL) -m 0755 -d $(DESTDIR)$(RT_LOG_PATH)
+	$(INSTALL) -m 0755 -d $(DESTDIR)$(RT_FONT_PATH)
 	$(INSTALL) -m 0770 -d $(DESTDIR)$(MASON_DATA_PATH)
 	$(INSTALL) -m 0770 -d $(DESTDIR)$(MASON_DATA_PATH)/cache
 	$(INSTALL) -m 0770 -d $(DESTDIR)$(MASON_DATA_PATH)/etc
@@ -367,7 +369,7 @@ dirs:
 
 install: testdeps config-install dirs files-install fixperms instruct
 
-files-install: libs-install etc-install config-install bin-install sbin-install html-install local-install doc-install
+files-install: libs-install etc-install config-install bin-install sbin-install html-install local-install doc-install font-install
 
 config-install:
 @COMMENT_INPLACE_LAYOUT@	$(INSTALL) -m 0755 -o $(BIN_OWNER) -g $(RTGROUP) -d $(DESTDIR)$(CONFIG_FILE_PATH)
@@ -426,6 +428,14 @@ html-install:
 @COMMENT_INPLACE_LAYOUT@	done
 # }}}
 
+# {{{ font-install
+font-install:
+ at COMMENT_INPLACE_LAYOUT@	[ -d $(DESTDIR)$(RT_FONT_PATH) ] || $(INSTALL) -m 0755 -d $(DESTDIR)$(RT_FONT_PATH)
+ at COMMENT_INPLACE_LAYOUT@	-( cd share/fonts && find . -type f -print ) | while read file ; do \
+ at COMMENT_INPLACE_LAYOUT@	    $(INSTALL) -m 0644 "share/fonts/$$file" "$(DESTDIR)$(RT_FONT_PATH)/$$file" ; \
+ at COMMENT_INPLACE_LAYOUT@	done
+# }}}
+
 # {{{ doc-install
 doc-install:
 @COMMENT_INPLACE_LAYOUT@	# RT 3.0.0 - RT 3.0.2 would accidentally create a file instead of a dir
diff --git a/aclocal.m4 b/aclocal.m4
index 0e041b6..044af5a 100755
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -90,7 +90,7 @@ AC_DEFUN([RT_LAYOUT],[
 			. $pldconf
 			changequote({,})
 			for var in prefix exec_prefix bindir sbindir \
-				 sysconfdir mandir libdir datadir htmldir \
+				 sysconfdir mandir libdir datadir htmldir fontdir\
 				 localstatedir logfiledir masonstatedir \
 				 sessionstatedir customdir custometcdir customhtmldir \
 				 customlexdir customlibdir manualdir; do
@@ -115,6 +115,7 @@ AC_DEFUN([RT_LAYOUT],[
 	RT_SUBST_EXPANDED_ARG(libdir)
 	RT_SUBST_EXPANDED_ARG(datadir)
 	RT_SUBST_EXPANDED_ARG(htmldir)
+	RT_SUBST_EXPANDED_ARG(fontdir)
 	RT_SUBST_EXPANDED_ARG(manualdir)
 	RT_SUBST_EXPANDED_ARG(plugindir)
 	RT_SUBST_EXPANDED_ARG(localstatedir)
diff --git a/config.layout b/config.layout
index 52fcef1..87078a1 100755
--- a/config.layout
+++ b/config.layout
@@ -10,7 +10,7 @@
 ##
 ##  The following variables must _all_ be set:
 ##	prefix exec_prefix bindir sbindir sysconfdir mandir libdir
-##	datadir htmldir localstatedir logfiledir masonstatedir
+##	datadir htmldir localstatedir logfiledir masonstatedir fontdir
 ##	sessionstatedir customdir customhtmldir customlexdir
 ##  (This can be seen in m4/rt_layout.m4.)
 ##
@@ -27,6 +27,7 @@
   libdir:		${prefix}/lib
   datadir:		${prefix}/share
   htmldir:		${datadir}/html
+  fontdir:		${datadir}/fonts
   manualdir:		${datadir}/doc
   localstatedir:	${prefix}/var
   logfiledir:		${localstatedir}/log
@@ -49,6 +50,7 @@
   libdir:		${prefix}/lib
   datadir:		${prefix}/share
   htmldir:		${datadir}/html
+  fontdir:		${datadir}/fonts
   manualdir:		${datadir}/doc
   localstatedir:	${prefix}/var
   logfiledir:		${localstatedir}/log
@@ -74,6 +76,7 @@
 # FIXME: no such directory in FHS; shouldn't go to somewhere in "${datadir}/rt/"?
   plugindir:		${datadir}/plugins
   htmldir:		${datadir}/html
+  fontdir:		${datadir}/fonts
   manualdir:		${datadir}/doc
   localstatedir:	/var
   logfiledir:		${localstatedir}/log
@@ -98,6 +101,7 @@
   libdir:		${prefix}/lib+
   datadir:		${prefix}/share+
   htmldir:		${datadir}/html
+  fontdir:		${datadir}/fonts
   manualdir:		${prefix}/share/doc+
   logfiledir:		/var/log
   localstatedir:	/var/run+
@@ -121,6 +125,7 @@
   libdir:		${prefix}/lib
   datadir:		${prefix}
   htmldir:		${datadir}/html
+  fontdir:		${datadir}/fonts
   manualdir:		${datadir}/doc
   localstatedir:	${prefix}/var
   logfiledir:		${localstatedir}/log
@@ -144,6 +149,7 @@
   libdir:		${prefix}/lib/rt
   datadir:		/var/rt
   htmldir:		${datadir}/html
+  fontdir:		${datadir}/fonts
   manualdir:		${datadir}/doc
   plugindir:		${datadir}/plugins
   localstatedir:	/var
@@ -168,6 +174,7 @@
   libdir:		lib
   datadir:		share
   htmldir:		${datadir}/html
+  fontdir:		${datadir}/fonts
   manualdir:	${datadir}/doc
   localstatedir:	var
   logfiledir:		${localstatedir}/log
diff --git a/configure.ac b/configure.ac
index 37f0a6c..7e6d757 100755
--- a/configure.ac
+++ b/configure.ac
@@ -334,6 +334,7 @@ AC_SUBST([RT_BIN_PATH],			${exp_bindir})
 AC_SUBST([RT_SBIN_PATH],		${exp_sbindir})
 AC_SUBST([RT_VAR_PATH],			${exp_localstatedir})
 AC_SUBST([RT_MAN_PATH],			${exp_mandir})
+AC_SUBST([RT_FONT_PATH],			${exp_fontdir})
 AC_SUBST([RT_PLUGIN_PATH],			${exp_plugindir})
 AC_SUBST([MASON_DATA_PATH],		${exp_masonstatedir})
 AC_SUBST([MASON_SESSION_PATH],		${exp_sessionstatedir})
@@ -355,6 +356,7 @@ AC_SUBST([RT_BIN_PATH_R],			${exp_prefix}/${exp_bindir})
 AC_SUBST([RT_SBIN_PATH_R],		${exp_prefix}/${exp_sbindir})
 AC_SUBST([RT_VAR_PATH_R],			${exp_prefix}/${exp_localstatedir})
 AC_SUBST([RT_MAN_PATH_R],			${exp_prefix}/${exp_mandir})
+AC_SUBST([RT_FONT_PATH_R],			${exp_prefix}/${exp_fontdir})
 AC_SUBST([RT_PLUGIN_PATH_R],		${exp_prefix}/${exp_plugindir})
 AC_SUBST([MASON_DATA_PATH_R],		${exp_prefix}/${exp_masonstatedir})
 AC_SUBST([MASON_SESSION_PATH_R],		${exp_prefix}/${exp_sessionstatedir})
@@ -376,6 +378,7 @@ AC_SUBST([RT_BIN_PATH_R],			${exp_bindir})
 AC_SUBST([RT_SBIN_PATH_R],		${exp_sbindir})
 AC_SUBST([RT_VAR_PATH_R],			${exp_localstatedir})
 AC_SUBST([RT_MAN_PATH_R],			${exp_mandir})
+AC_SUBST([RT_FONT_PATH_R],			${exp_fontdir})
 AC_SUBST([MASON_DATA_PATH_R],		${exp_masonstatedir})
 AC_SUBST([MASON_SESSION_PATH_R],		${exp_sessionstatedir})
 AC_SUBST([MASON_HTML_PATH_R],		${exp_htmldir})
diff --git a/m4/rt_layout.m4 b/m4/rt_layout.m4
index fbb2890..bdc4b2c 100755
--- a/m4/rt_layout.m4
+++ b/m4/rt_layout.m4
@@ -37,7 +37,7 @@ AC_DEFUN([RT_LAYOUT],[
 			. $pldconf
 			changequote({,})
 			for var in prefix exec_prefix bindir sbindir \
-				 sysconfdir mandir libdir datadir htmldir \
+				 sysconfdir mandir libdir datadir htmldir fontdir \
 				 localstatedir logfiledir masonstatedir plugindir \
 				 sessionstatedir customdir custometcdir customhtmldir \
 				 customlexdir customlibdir manualdir; do
@@ -62,6 +62,7 @@ AC_DEFUN([RT_LAYOUT],[
 	RT_SUBST_EXPANDED_ARG(libdir)
 	RT_SUBST_EXPANDED_ARG(datadir)
 	RT_SUBST_EXPANDED_ARG(htmldir)
+	RT_SUBST_EXPANDED_ARG(fontdir)
 	RT_SUBST_EXPANDED_ARG(manualdir)
 	RT_SUBST_EXPANDED_ARG(plugindir)
 	RT_SUBST_EXPANDED_ARG(localstatedir)

-----------------------------------------------------------------------


More information about the Rt-commit mailing list