~ubuntu-branches/ubuntu/karmic/openoffice.org-l10n/karmic

« back to all changes in this revision

Viewing changes to ooo-build/bin/.#font-munge.1.11

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2006-04-27 19:29:22 UTC
  • Revision ID: james.westby@ubuntu.com-20060427192922-2dburxv3b63f8v0u
Tags: 2.0.2-2ubuntu5
* Copy of the openoffice.org source.
  - debian/control.in: Change source name.
  - debian/changelog: Change source name.
  - debian/control: Regenerate control file.
* Add kurdish translations exported from Rosetta (2006-04-18).
* Workaround bad message strings in recently included GSI files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl -pi.bak -w
 
2
 
 
3
# This does a partial substitution of the really
 
4
# mechanical bits of our fonts.
 
5
 
 
6
    # make sure that the MS compatible fonts like Albany, Arial are preferred
 
7
    # over the Bitstream Vera fonts
 
8
 
 
9
    s/(Bitstream Vera Sans;.*)Albany;/Albany;$1/;
 
10
    s/(Bitstream Vera Sans;.*)Arial;/Arial;$1/;
 
11
    s/(Bitstream Vera Sans Mono;.*)Cumberland;/Cumberland;$1/;
 
12
    s/(Bitstream Vera Sans Mono;.*)Courier New;/Courier New;$1/;
 
13
    s/(Bitstream Vera Serif;.*)Thorndale;/Thorndale;$1/;
 
14
    s/(Bitstream Vera Serif;.*)Times New Roman;/Times New Roman;$1/;
 
15
 
 
16
    # add AMT fonts
 
17
    s/Albany;/Albany AMT;Albany;/g;
 
18
    s/albany;/albanyamt;albany;/g;
 
19
    s/Thorndale;/Thorndale AMT;Thorndale;/g;
 
20
    s/thorndale;/thorndaleamt;thorndale;/g;
 
21
    s/Cumberland;/Cumberland AMT;Cumberland;/g;
 
22
    s/cumberland;/cumberlandamt;cumberland;/g;
 
23
    s/comicsansms;/andymt;comicsansms;/g;
 
24
    s/kidprint;/andy;kidprint;/g;
 
25
 
 
26
# New bits from SUSE:
 
27
 
 
28
    # add Nimbus fonts
 
29
    s/Arial;/Arial;Nimbus Sans L;/g;
 
30
    s/arial;/arial;nimbussansl;/g;
 
31
    s/Times New Roman;/Times New Roman;Nimbus Roman No9 L;/g;
 
32
    s/timesnewroman;/timesnewroman;nimbusromanno9l;/g;
 
33
    s/Courier New;/Courier New;Nimbus Mono L;/g;
 
34
    s/couriernew;/couriernew;nimbusmonol;/g;
 
35
 
 
36
    # prune duplicates
 
37
    s/nimbussansl;\(.*\)nimbussansl;/nimbussansl;$1/;
 
38
    s/nimbusmonol;\(.*\)nimbusmonol;/nimbusmonol;$1/;
 
39
    s/nimbusromanno9l;\(.*\)nimbusromanno9l;/nimbusromanno9l;$1/;
 
40
 
 
41
# Some RedHat CJK bits
 
42
 
 
43
    # Backups for Sung Ti
 
44
    s/方正宋体;/方正宋体;ZYSong18030;AR PL SungtiL GB;/g;
 
45
    # Backups for Ming Ti
 
46
    s/方正明體;/方正明體;AR PL Mingti2L Big5;/g;
 
47
 
 
48
    # Korean fixes
 
49
    s/SunGulim;/SunGulim;Baekmuk Gulim;/g;
 
50
    s/SunBatang;/SunBatang;Baekmuk Batang;/g;
 
51
    s/SunDotum;/SunDotum;Baekmuk Dotum;/g;
 
52
 
 
53
    # The bitstream fonts never make sense _at all_ they are so metrically odd.
 
54
    s/Bitstream Vera Sans;//g;
 
55
    s/Bitstream Vera Sans Mono;//g;
 
56
    s/Bitstream Vera Serif;//g;
 
57
 
 
58
# Some Ubuntu bits
 
59
 
 
60
    # push SansSerif to the end of the list, some Tamil fonts don't
 
61
    # have all ISO-8859-1 characters defined
 
62
    s/SansSerif;(.*)</$1;SansSerif</;
 
63
 
 
64
    if ($ENV{OOO_VENDOR} =~ /Ubuntu/) {
 
65
      # prefer DejaVu as UI font
 
66
      if ($uisans) { s/<value>/<value>DejaVuSans;/; };
 
67
      if (/UI_SANS/) { $uisans = 1; } else { $uisans = 0; };
 
68
      if ($uifixed) { s/<value>/<value>DejaVuMonoSans;/; };
 
69
      if (/UI_FIXED/) { $uifixed = 1; } else { $uifixed = 0; };
 
70
 
 
71
      # prefer DejaVu for the Help
 
72
      if ($helpsans) { s/font-family: */font-family: DejaVuSans,/; };
 
73
      if (/^body/) { $helpsans = 1; } else { $helpsans = 0; };
 
74
      if ($helpfixed) { s/font-family: */font-family: DejaVuMonoSans,/; };
 
75
      if (/^\.code/) { $helpfixed = 1; } else { $helpfixed = 0; };
 
76
    };