[ooo-build-commit] .: bin/font-munge bin/font-munge.in configure.in
David Tardon
dtardon at kemper.freedesktop.org
Sun Oct 3 23:37:51 PDT 2010
bin/font-munge | 164 ------------------------------------------------------
bin/font-munge.in | 164 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
configure.in | 1
3 files changed, 165 insertions(+), 164 deletions(-)
New commits:
commit 06fe4522138b362c1152c056b59d8d08a3fc97ea
Author: David Tardon <dtardon at redhat.com>
Date: Mon Oct 4 08:30:45 2010 +0200
avoid hardcoded !#/usr/bin/perl
diff --git a/bin/font-munge b/bin/font-munge
deleted file mode 100755
index bc310ef..0000000
--- a/bin/font-munge
+++ /dev/null
@@ -1,164 +0,0 @@
-#!/usr/bin/perl -pi.bak -w
-
-BEGIN { $ENV{OOO_VENDOR} ||= "unknown"; $uisans = 0; $uifixed = 0; }
-
-# This does a partial substitution of the really
-# mechanical bits of our fonts.
-
- # make sure that the MS compatible fonts like Albany, Arial are preferred
- # over the Bitstream Vera fonts
-
- s/(Bitstream Vera Sans;.*)Albany;/Albany;$1/;
- s/(Bitstream Vera Sans;.*)Arial;/Arial;$1/;
- s/(Bitstream Vera Sans Mono;.*)Cumberland;/Cumberland;$1/;
- s/(Bitstream Vera Sans Mono;.*)Courier New;/Courier New;$1/;
- s/(Bitstream Vera Serif;.*)Thorndale;/Thorndale;$1/;
- s/(Bitstream Vera Serif;.*)Times New Roman;/Times New Roman;$1/;
-
- # Add the Indic fonts bundled with Windows XP. They are preferred
- # to Arial Unicode MS which doesn't even come with Windows, but with
- # Office, so how would typical OOo users have it?
- # The fonts:
- # Gautami, for Telugu
- # Kartika, for Malayalam
- # Tunga, for Kannada
- # are not added because the languages that the corresponding
- # scripts aren't mentioned in VCL.xcu.
-
- # Mangal is for the Devanagari script, VCL.xcu has only Hindi of
- # the languages that are written in Devanagari
- (m/Mangal;/) || s/Lohit Hindi;/Mangal;Lohit Hindi;/;
- # Shruti is for Gujarati
- (m/Shruti;/) || s/Lohit Gujarati;/Shruti;Lohit Gujarati;/;
- # Latha is for Tamil
- (m/Latha;/) || s/Lohit Tamil;/Latha;Lohit Tamil;/;
- # Raavi is for the Gurmukhi script, in which Punjabi is written in
- # India
- (m/Raavi;/) || s/Lohit Punjabi;/Raavi;Lohit Punjabi;/;
- # Vrinda is for Bengali
- (m/Vrinda;/) || s/Lohit Bengali;/Vrinda;Lohit Bengali;/;
-
- # add Albany, Cumberland, and Thorndale
- (m/Albany;/) || s/Arial;/Albany;Arial;/g;
- (m/albany;/) || s/arial;/albany;arial;/g;
- (m/Thorndale;/) || s/Times New Roman;/Thorndale;Times New Roman;/g;
- (m/thorndale;/) || s/timesnewroman;/thorndale;timesnewroman;/g;
- (m/Cumberland;/) || s/Courier New;/Cumberland;Courier New;/g;
- (m/cumberland;/) || s/couriernew;/cumberland;couriernew;/g;
-
- # add AMT fonts
- (m/Albany AMT;/) || s/Albany;/Albany AMT;Albany;/g;
- (m/albanyamt;/) || s/albany;/albanyamt;albany;/g;
- (m/Thorndale AMT;/) || s/Thorndale;/Thorndale AMT;Thorndale;/g;
- (m/thorndaleamt;/) || s/thorndale;/thorndaleamt;thorndale;/g;
- (m/Cumberland AMT;/) || s/Cumberland;/Cumberland AMT;Cumberland;/g;
- (m/cumberlandamt;/) || s/cumberland;/cumberlandamt;cumberland;/g;
- (m/andymt;/) || s/comicsansms;/andymt;comicsansms;/g;
- (m/andy;/) || s/kidprint;/andy;kidprint;/g;
-
-# New bits from SUSE:
-
- # add Nimbus fonts
- (m/Nimbus Sans L;/) || s/Arial;/Arial;Nimbus Sans L;/g;
- (m/nimbussansl;/) || s/arial;/arial;nimbussansl;/g;
- (m/Nimbus Roman No9 L;/) || s/Times New Roman;/Times New Roman;Nimbus Roman No9 L;/g;
- (m/nimbusromanno9l;/) || s/timesnewroman;/timesnewroman;nimbusromanno9l;/g;
- (m/Nimbus Mono L;/) || s/Courier New;/Courier New;Nimbus Mono L;/g;
- (m/nimbusmonol;/) || s/couriernew;/couriernew;nimbusmonol;/g;
-
-
-# prune duplicates
-
- s/Albany AMT;(.*)Albany AMT;/Albany AMT;$1/;
- s/Albany;(.*)Albany;/Albany;$1/;
- s/Arial;(.*)Arial;/Arial;$1/;
- s/Nimbus Sans L;(.*)Nimbus Sans L;/Nimbus Sans L;$1/;
-
- s/albanyamt;(.*)albanyamt;/albanyamt;$1/;
- s/albany;(.*)albany;/albany;$1/;
- s/arial;(.*)arial;/arial;$1/;
- s/nimbussansl;(.*)nimbussansl;/nimbussansl;$1/;
-
- s/Thorndale AMT;(.*)Thorndale AMT;/Thorndale AMT;$1/;
- s/Thorndale;(.*)Thorndale;/Thorndale;$1/;
- s/Times New Roman;(.*)Times New Roman;/Times New Roman;$1/;
- s/Nimbus Roman No9 L;(.*)Nimbus Roman No9 L;/Nimbus Roman No9 L;$1/;
-
- s/thorndaleamt;(.*)thorndaleamt;/thorndaleamt;$1/;
- s/thorndale;(.*)thorndale;/thorndale;$1/;
- s/timesnewroman;(.*)timesnewroman;/timesnewroman;$1/;
- s/nimbusromanno9l;(.*)nimbusromanno9l;/nimbusromanno9l;$1/;
-
- s/Cumberland AMT;(.*)Cumberland AMT;/Cumberland AMT;$1/;
- s/Cumberland;(.*)Cumberland;/Cumberland;$1/;
- s/Courier New;(.*)Courier New;/Courier New;$1/;
- s/Nimbus Mono L;(.*)Nimbus Mono L;/Nimbus Mono L;$1/;
-
- s/cumberlandamt;(.*)cumberlandamt;/cumberlandamt;$1/;
- s/cumberland;(.*)cumberland;/cumberland;$1/;
- s/couriernew;(.*)couriernew;/couriernew;$1/;
- s/nimbusmonol;(.*)nimbusmonol;/nimbusmonol;$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/(helvetica;.*)nimbussansl;/nimbussansl;$1/;
- s/(nimbussansl;.*)arial;/arial;$1/;
- s/(arial;.*)albany;/albany;$1/;
- s/(albany;.*)albanyamt;/albanyamt;$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/(times;.*)nimbusromanno9l;/nimbusromanno9l;$1/;
- s/(nimbusromanno9l;.*)timesnewroman;/timesnewroman;$1/;
- s/(timesnewroman;.*)thorndale;/thorndale;$1/;
- s/(thorndale;.*)thorndaleamt;/thorndaleamt;$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/;
-
- s/(courier;.*)nimbusmonol;/nimbusmonol;$1/;
- s/(nimbusmonol;.*)couriernew;/couriernew;$1/;
- s/(couriernew;.*)cumberland;/cumberland;$1/;
- s/(cumberland;.*)cumberlandamt;/cumberlandamt;$1/;
-
-# Some RedHat CJK bits
-
- # Backups for Sung Ti
- s/æ¹æ£å®ä½;/æ¹æ£å®ä½;ZYSong18030;AR PL SungtiL GB;/g;
- # Backups for Ming Ti
- s/æ¹æ£æé«;/æ¹æ£æé«;AR PL Mingti2L Big5;/g;
-
- # Korean fixes
- s/SunGulim;/SunGulim;Baekmuk Gulim;/g;
- s/SunBatang;/SunBatang;Baekmuk Batang;/g;
- s/SunDotum;/SunDotum;Baekmuk Dotum;/g;
-
- # The bitstream fonts never make sense _at all_ they are so metrically odd.
- s/Bitstream Vera Sans;//g;
- s/Bitstream Vera Sans Mono;//g;
- s/Bitstream Vera Serif;//g;
-
-# Some Ubuntu bits
-
- # push SansSerif to the end of the list, some Tamil fonts don't
- # have all ISO-8859-1 characters defined
- s/SansSerif;(.*)</$1;SansSerif</;
-
- if ($ENV{OOO_VENDOR} =~ /buntu/) {
- # prefer DejaVu as UI font
- if ($uisans) { s/<value>/<value>DejaVuSans;/; };
- if (/UI_SANS/) { $uisans = 1; } else { $uisans = 0; };
- if ($uifixed) { s/<value>/<value>DejaVuMonoSans;/; };
- if (/UI_FIXED/) { $uifixed = 1; } else { $uifixed = 0; };
- };
diff --git a/bin/font-munge.in b/bin/font-munge.in
new file mode 100644
index 0000000..067c601
--- /dev/null
+++ b/bin/font-munge.in
@@ -0,0 +1,164 @@
+#!@PERL@ -pi.bak -w
+
+BEGIN { $ENV{OOO_VENDOR} ||= "unknown"; $uisans = 0; $uifixed = 0; }
+
+# This does a partial substitution of the really
+# mechanical bits of our fonts.
+
+ # make sure that the MS compatible fonts like Albany, Arial are preferred
+ # over the Bitstream Vera fonts
+
+ s/(Bitstream Vera Sans;.*)Albany;/Albany;$1/;
+ s/(Bitstream Vera Sans;.*)Arial;/Arial;$1/;
+ s/(Bitstream Vera Sans Mono;.*)Cumberland;/Cumberland;$1/;
+ s/(Bitstream Vera Sans Mono;.*)Courier New;/Courier New;$1/;
+ s/(Bitstream Vera Serif;.*)Thorndale;/Thorndale;$1/;
+ s/(Bitstream Vera Serif;.*)Times New Roman;/Times New Roman;$1/;
+
+ # Add the Indic fonts bundled with Windows XP. They are preferred
+ # to Arial Unicode MS which doesn't even come with Windows, but with
+ # Office, so how would typical OOo users have it?
+ # The fonts:
+ # Gautami, for Telugu
+ # Kartika, for Malayalam
+ # Tunga, for Kannada
+ # are not added because the languages that the corresponding
+ # scripts aren't mentioned in VCL.xcu.
+
+ # Mangal is for the Devanagari script, VCL.xcu has only Hindi of
+ # the languages that are written in Devanagari
+ (m/Mangal;/) || s/Lohit Hindi;/Mangal;Lohit Hindi;/;
+ # Shruti is for Gujarati
+ (m/Shruti;/) || s/Lohit Gujarati;/Shruti;Lohit Gujarati;/;
+ # Latha is for Tamil
+ (m/Latha;/) || s/Lohit Tamil;/Latha;Lohit Tamil;/;
+ # Raavi is for the Gurmukhi script, in which Punjabi is written in
+ # India
+ (m/Raavi;/) || s/Lohit Punjabi;/Raavi;Lohit Punjabi;/;
+ # Vrinda is for Bengali
+ (m/Vrinda;/) || s/Lohit Bengali;/Vrinda;Lohit Bengali;/;
+
+ # add Albany, Cumberland, and Thorndale
+ (m/Albany;/) || s/Arial;/Albany;Arial;/g;
+ (m/albany;/) || s/arial;/albany;arial;/g;
+ (m/Thorndale;/) || s/Times New Roman;/Thorndale;Times New Roman;/g;
+ (m/thorndale;/) || s/timesnewroman;/thorndale;timesnewroman;/g;
+ (m/Cumberland;/) || s/Courier New;/Cumberland;Courier New;/g;
+ (m/cumberland;/) || s/couriernew;/cumberland;couriernew;/g;
+
+ # add AMT fonts
+ (m/Albany AMT;/) || s/Albany;/Albany AMT;Albany;/g;
+ (m/albanyamt;/) || s/albany;/albanyamt;albany;/g;
+ (m/Thorndale AMT;/) || s/Thorndale;/Thorndale AMT;Thorndale;/g;
+ (m/thorndaleamt;/) || s/thorndale;/thorndaleamt;thorndale;/g;
+ (m/Cumberland AMT;/) || s/Cumberland;/Cumberland AMT;Cumberland;/g;
+ (m/cumberlandamt;/) || s/cumberland;/cumberlandamt;cumberland;/g;
+ (m/andymt;/) || s/comicsansms;/andymt;comicsansms;/g;
+ (m/andy;/) || s/kidprint;/andy;kidprint;/g;
+
+# New bits from SUSE:
+
+ # add Nimbus fonts
+ (m/Nimbus Sans L;/) || s/Arial;/Arial;Nimbus Sans L;/g;
+ (m/nimbussansl;/) || s/arial;/arial;nimbussansl;/g;
+ (m/Nimbus Roman No9 L;/) || s/Times New Roman;/Times New Roman;Nimbus Roman No9 L;/g;
+ (m/nimbusromanno9l;/) || s/timesnewroman;/timesnewroman;nimbusromanno9l;/g;
+ (m/Nimbus Mono L;/) || s/Courier New;/Courier New;Nimbus Mono L;/g;
+ (m/nimbusmonol;/) || s/couriernew;/couriernew;nimbusmonol;/g;
+
+
+# prune duplicates
+
+ s/Albany AMT;(.*)Albany AMT;/Albany AMT;$1/;
+ s/Albany;(.*)Albany;/Albany;$1/;
+ s/Arial;(.*)Arial;/Arial;$1/;
+ s/Nimbus Sans L;(.*)Nimbus Sans L;/Nimbus Sans L;$1/;
+
+ s/albanyamt;(.*)albanyamt;/albanyamt;$1/;
+ s/albany;(.*)albany;/albany;$1/;
+ s/arial;(.*)arial;/arial;$1/;
+ s/nimbussansl;(.*)nimbussansl;/nimbussansl;$1/;
+
+ s/Thorndale AMT;(.*)Thorndale AMT;/Thorndale AMT;$1/;
+ s/Thorndale;(.*)Thorndale;/Thorndale;$1/;
+ s/Times New Roman;(.*)Times New Roman;/Times New Roman;$1/;
+ s/Nimbus Roman No9 L;(.*)Nimbus Roman No9 L;/Nimbus Roman No9 L;$1/;
+
+ s/thorndaleamt;(.*)thorndaleamt;/thorndaleamt;$1/;
+ s/thorndale;(.*)thorndale;/thorndale;$1/;
+ s/timesnewroman;(.*)timesnewroman;/timesnewroman;$1/;
+ s/nimbusromanno9l;(.*)nimbusromanno9l;/nimbusromanno9l;$1/;
+
+ s/Cumberland AMT;(.*)Cumberland AMT;/Cumberland AMT;$1/;
+ s/Cumberland;(.*)Cumberland;/Cumberland;$1/;
+ s/Courier New;(.*)Courier New;/Courier New;$1/;
+ s/Nimbus Mono L;(.*)Nimbus Mono L;/Nimbus Mono L;$1/;
+
+ s/cumberlandamt;(.*)cumberlandamt;/cumberlandamt;$1/;
+ s/cumberland;(.*)cumberland;/cumberland;$1/;
+ s/couriernew;(.*)couriernew;/couriernew;$1/;
+ s/nimbusmonol;(.*)nimbusmonol;/nimbusmonol;$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/(helvetica;.*)nimbussansl;/nimbussansl;$1/;
+ s/(nimbussansl;.*)arial;/arial;$1/;
+ s/(arial;.*)albany;/albany;$1/;
+ s/(albany;.*)albanyamt;/albanyamt;$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/(times;.*)nimbusromanno9l;/nimbusromanno9l;$1/;
+ s/(nimbusromanno9l;.*)timesnewroman;/timesnewroman;$1/;
+ s/(timesnewroman;.*)thorndale;/thorndale;$1/;
+ s/(thorndale;.*)thorndaleamt;/thorndaleamt;$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/;
+
+ s/(courier;.*)nimbusmonol;/nimbusmonol;$1/;
+ s/(nimbusmonol;.*)couriernew;/couriernew;$1/;
+ s/(couriernew;.*)cumberland;/cumberland;$1/;
+ s/(cumberland;.*)cumberlandamt;/cumberlandamt;$1/;
+
+# Some RedHat CJK bits
+
+ # Backups for Sung Ti
+ s/æ¹æ£å®ä½;/æ¹æ£å®ä½;ZYSong18030;AR PL SungtiL GB;/g;
+ # Backups for Ming Ti
+ s/æ¹æ£æé«;/æ¹æ£æé«;AR PL Mingti2L Big5;/g;
+
+ # Korean fixes
+ s/SunGulim;/SunGulim;Baekmuk Gulim;/g;
+ s/SunBatang;/SunBatang;Baekmuk Batang;/g;
+ s/SunDotum;/SunDotum;Baekmuk Dotum;/g;
+
+ # The bitstream fonts never make sense _at all_ they are so metrically odd.
+ s/Bitstream Vera Sans;//g;
+ s/Bitstream Vera Sans Mono;//g;
+ s/Bitstream Vera Serif;//g;
+
+# Some Ubuntu bits
+
+ # push SansSerif to the end of the list, some Tamil fonts don't
+ # have all ISO-8859-1 characters defined
+ s/SansSerif;(.*)</$1;SansSerif</;
+
+ if ($ENV{OOO_VENDOR} =~ /buntu/) {
+ # prefer DejaVu as UI font
+ if ($uisans) { s/<value>/<value>DejaVuSans;/; };
+ if (/UI_SANS/) { $uisans = 1; } else { $uisans = 0; };
+ if ($uifixed) { s/<value>/<value>DejaVuMonoSans;/; };
+ if (/UI_FIXED/) { $uifixed = 1; } else { $uifixed = 0; };
+ };
diff --git a/configure.in b/configure.in
index ea6bcab..37c724c 100644
--- a/configure.in
+++ b/configure.in
@@ -1623,6 +1623,7 @@ AC_MSG_RESULT([$OOO_ADDITIONAL_SECTIONS])
AC_SUBST(OOO_ADDITIONAL_SECTIONS)
+AC_CONFIG_FILES([bin/font-munge], [chmod +x bin/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