[ooo-build-commit] .: bin/help-font-munge bin/help-font-munge.in configure.in
Thomas Klausner
tklausner at kemper.freedesktop.org
Mon Oct 4 01:52:47 PDT 2010
bin/help-font-munge | 2 -
bin/help-font-munge.in | 78 +++++++++++++++++++++++++++++++++++++++++++++++++
configure.in | 1
3 files changed, 80 insertions(+), 1 deletion(-)
New commits:
commit cc741a7e18b4b66eff53990013b6fbb1d9279a90
Author: Thomas Klausner <wiz at NetBSD.org>
Date: Mon Oct 4 10:51:22 2010 +0200
Handle help-font-munge perl interpreter replacement as font-munge.
diff --git a/bin/help-font-munge b/bin/help-font-munge
index 96da613..315c612 100755
--- a/bin/help-font-munge
+++ b/bin/help-font-munge
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -pi.bak -w
+#!/usr/pkg/bin/perl -pi.bak -w
BEGIN { $ENV{OOO_VENDOR} ||= "unknown"; $helpsans = 0; $helpfixed = 0; }
diff --git a/bin/help-font-munge.in b/bin/help-font-munge.in
new file mode 100755
index 0000000..67e1871
--- /dev/null
+++ b/bin/help-font-munge.in
@@ -0,0 +1,78 @@
+#!@PERL@ -pi.bak -w
+
+BEGIN { $ENV{OOO_VENDOR} ||= "unknown"; $helpsans = 0; $helpfixed = 0; }
+
+# This does a partial substitution of the really
+# mechanical bits of our fonts in help content.
+
+ # move Bitstream Vera fonts after better fonts
+ s/\"Bitstream Vera Sans\"\,(.*Albany\,)/$1\"Bitstream Vera Sans\"\,/;
+ s/\"Bitstream Vera Sans\"\,(.*\"Albany AMT\"\,)/$1\"Bitstream Vera Sans\"\,/;
+ s/\"Bitstream Vera Sans\"\,(.*Arial\,)/$1\"Bitstream Vera Sans\"\,/;
+ s/\"Bitstream Vera Sans\"\,(.*\"Nimbus Sans L\"\,)/$1\"Bitstream Vera Sans\"\,/;
+
+ s/\"Bitstream Vera Sans Mono\"\,(.*Cumberland\,)/$1\"Bitstream Vera Sans Mono\"\,/;
+ s/\"Bitstream Vera Sans Mono\"\,(.*\"Courier New\"\,)/$1\"Bitstream Vera Sans Mono\"\,/;
+ s/\"Bitstream Vera Sans Mono\"\,(.*\"Cumberland AMT\"\,)/$1\"Bitstream Vera Sans Mono\"\,/;
+ s/\"Bitstream Vera Sans Mono\"\,(.*\"Nimbus Mono L\"\,)/$1\"Bitstream Vera Sans Mono\"\,/;
+
+ s/\"Bitstream Vera Serif\"\,(.*Thorndale\,)/$1\"Bitstream Vera Serif\"\,/;
+ s/\"Bitstream Vera Serif\"\,(.*\"Thorndale AMT\"\,)/$1\"Bitstream Vera Serif\"\,/;
+ s/\"Bitstream Vera Serif\"\,(.*\"Times New Roman\"\,)/$1\"Bitstream Vera Serif\"\,/;
+ s/\"Bitstream Vera Serif\"\,(.*\"Nimbus Roman No9 L\"\,)/$1\"Bitstream Vera Serif\"\,/;
+
+ # make sure Albany, Cumberland, and Thorndale are there
+ (m/Albany,/) || s/Arial,/Albany,Arial,/g;
+ (m/Cumberland,/) || s/\"Courier New\",/Cumberland,\"Courier New\",/g;
+ (m/Thorndale,/) || s/\"Times New Roman\",/Thorndale,\"Times New Roman\",/g;
+
+ # add AMT fonts
+ (m/\"Albany AMT\",/) || s/Albany,/\"Albany AMT\",Albany,/g;
+ (m/\"Cumberland AMT\",/) || s/Cumberland,/\"Cumberland AMT\",Cumberland,/g;
+ (m/\"Thorndale AMT\",/) || s/Thorndale,/\"Thorndale AMT\",Thorndale,/g;
+
+ # add URW fonts
+ (m/\"Nimbus Sans L\",/) || s/Arial,/Arial,\"Nimbus Sans L\",/g;
+ (m/\"Nimbus Mono L\",/) || s/\"Courier New\",/\"Courier New\",\"Nimbus Mono L\",/g;
+ (m/\"Nimbus Roman No9 L\",/) || s/\"Times New Roman\",/\"Times New Roman\",\"Nimbus Roman No9 L\",/g;
+
+ # prune duplicates
+ s/Albany,(.*)Albany,/Albany,$1/;
+ s/Cumberland,(.*)Cumberland,/Cumberland,$1/;
+ s/Thorndale,(.*)Thorndale,/Thorndale,$1/;
+
+ s/\"Albany AMT\",(.*)\"Albany AMT\",/\"Albany AMT\",$1/;
+ s/\"Cumberland AMT\",(.*)\"Cumberland AMT\",/\"Cumberland AMT\",$1/;
+ s/\"Thorndale AMT\",(.*)\"Thorndale AMT\",/\"Thorndale AMT\",$1/;
+
+ s/\"Nimbus Sans L\",(.*)\"Nimbus Sans L\",/\"Nimbus Sans L\",$1/;
+ s/\"Nimbus Mono L\",(.*)\"Nimbus Mono L\",/\"Nimbus Mono L\",$1/;
+ s/\"Nimbus Roman No9 L\",(.*)\"Nimbus Roman No9 L\",/\"Nimbus Roman No9 L\",$1/;
+
+ # sort fonts AMT over Albany... over MS over Nimbus over bitmap
+ s/(Helvetica\,.*)\"Nimbus Sans L\"\,/\"Nimbus Sans L\"\,$1/;
+ s/(\"Nimbus Sans L\"\,.*)Arial\,/Arial\,$1/;
+ s/(Arial\,.*)Albany\,/Albany\,$1/;
+ s/(Albany\,.*)\"Albany AMT\"\,/\"Albany AMT\"\,$1/;
+
+ s/(Times\,.*)\"Nimbus Roman No9 L\"\,/\"Nimbus Roman No9 L\"\,$1/;
+ s/(\"Nimbus Roman No9 L\"\,.*)\"Times New Roman\"\,/\"Times New Roman\"\,$1/;
+ s/(\"Times New Roman\"\,.*)Thorndale\,/Thorndale\,$1/;
+ s/(Thorndale\,.*)\"Thorndale AMT\"\,/\"Thorndale AMT\"\,$1/;
+
+ s/(Courier\,.*)\"Nimbus Mono L\"\,/\"Nimbus Mono L\"\,$1/;
+ s/(\"Nimbus Mono L\"\,.*)\"Courier New\"\,/\"Courier New\"\,$1/;
+ s/(\"Courier New\"\,.*)Cumberland\,/Cumberland\,$1/;
+ s/(Cumberland\,.*)\"Cumberland AMT\"\,/\"Cumberland AMT\"\,$1/;
+
+ # push SansSerif to the end of the list, some Tamil fonts don't
+ # have all ISO-8859-1 characters defined
+ s/sans-serif,(.*);/$1,sans-serif;/;
+
+ if ($ENV{OOO_VENDOR} =~ /buntu/) {
+ # prefer DejaVu for the Help
+ if ($helpsans) { s/font-family: */font-family: DejaVuSans,/; };
+ if (/^body/) { $helpsans = 1; } else { $helpsans = 0; };
+ if ($helpfixed) { s/font-family: */font-family: DejaVuMonoSans,/; };
+ if (/^\.code/) { $helpfixed = 1; } else { $helpfixed = 0; };
+ };
diff --git a/configure.in b/configure.in
index 312c430..b1df923 100644
--- a/configure.in
+++ b/configure.in
@@ -1630,6 +1630,7 @@ AC_SUBST(OOO_ADDITIONAL_SECTIONS)
AC_CONFIG_FILES([bin/font-munge], [chmod +x bin/font-munge])
+AC_CONFIG_FILES([bin/help-font-munge], [chmod +x bin/help-font-munge])
AC_CONFIG_FILES([download], [chmod +x download])
AC_CONFIG_FILES([scratch/place], [chmod +x scratch/place])
AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update], [chmod +x intltool*])
More information about the ooo-build-commit
mailing list