~ubuntu-branches/ubuntu/quantal/cjk/quantal

« back to all changes in this revision

Viewing changes to utils/subfonts/vertref.pe

  • Committer: Bazaar Package Importer
  • Author(s): Danai SAE-HAN (韓達耐), README.Debian-msgothic
  • Date: 2008-01-30 18:53:24 UTC
  • mfrom: (1.1.3 upstream) (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080130185324-53m4h647q3v5nlzf
Tags: 4.7.0+git20080122-1
* The "Shoe polish" release.
* Acknowledge the NMU.  Thanks to Lucas Nussbaum.
* New upstream release:
   - a few fixes for PinYin;
   - fix punctuation in GBK and math mode;
   - dvipdfmx can now make use the correct /ToUnicode CMap;
   - fix a few typo's.
* [latex-cjk-japanese.install] Install DNP.sfd in
   /usr/share/texmf/fonts/sfd/.  Thanks to Gernot Hassenpflug
   (Closes: #434478).
* [README.Debian]
   - change 10cyberbit.cfg into 20cyberbit.cfg.
  [README.Debian-msgothic] Add some DIY information how to get the Japanese
   Gothic font from Microsoft working under CJK.  This is largely based on
   Gernot Hassenplug's HOWTO.  This is a work in progress, however, as I've
   stumbled upon a segmentation fault in Fontforge.
* [control]
   - Bump Standards-Version from 3.7.2.0 tp 3.7.3;
   - make latex-cjk-korean depend on "ko.tex-extra-hlfont" instead of
     the old "hlatex-fonts-extra".  Thanks to Changwoo Ryu
     (Closes: #462025).
* [rules]
   - fix bashism: apparently other shells don't understand the accolade.
     Thanks to Mario Bonino for the report and Lucas Nussbaum for the NMU
     which closed #457710;
   - change /usr/bin/rename to /usr/bin/prename;
   - don't install the empty "CEF/" directory in $TEXMF; the
     hbf-* packages will take care of this in the future.
 

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
# $1: The master font (e.g., `bsmi00lp.ttf').
9
9
# $2: The name of the target font (e.g., `bsmilpvr').
10
10
 
11
 
# Copyright (C) 1994-2006  Werner Lemberg <wl@gnu.org>
 
11
# Copyright (C) 1994-2007  Werner Lemberg <wl@gnu.org>
12
12
#
13
13
# This program is free software; you can redistribute it and/or modify
14
14
# it under the terms of the GNU General Public License as published by
25
25
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
26
26
# MA 02110-1301 USA
27
27
 
 
28
if (Strtol($version) < 20071105)
 
29
  Print("Can't use FontForge version before 2007-11-05.  Aborting.";
 
30
  Quit(1);
 
31
endif;
 
32
 
28
33
if ($argc != 3)
29
34
  Print("usage: [fontforge -script] ", $0, " master-font fontname");
30
35
  Quit(1);
37
42
fullname = $fullname + " vertical reference";
38
43
copyright = $copyright \
39
44
            + Chr(10) + Chr(10) \
40
 
            + "Vertical glyph reference font version 2005-07-01.";
 
45
            + "Vertical glyph reference font version " \
 
46
            + Strftime("%F", 1, "C") \
 
47
            + ".";
41
48
SetFontNames(fontname, "", fullname, "", copyright, "");
42
49
 
43
 
SelectByATT("Substitution", "vert", "", 1);
 
50
lookups = GetLookups("GSUB");
 
51
 
 
52
i = 0;
 
53
result = -1;
 
54
while (i < SizeOf(lookups))
 
55
  if (Strstr(lookups[i], "'vert'") >= 0)
 
56
    result = i;
 
57
  endif;
 
58
  i++;
 
59
endloop;
 
60
 
 
61
if (result == -1)
 
62
  Print("This font doesn't contain a GSUB table with a `vert' feature.");
 
63
  Quit(1);
 
64
endif;
 
65
 
 
66
subtables = GetLookupSubtables(lookups[result]);
 
67
 
 
68
i = 0;
 
69
result = -1;
 
70
while (i < SizeOf(subtables))
 
71
  if (Strstr(subtables[i], "'vert'") >= 0)
 
72
    result = i;
 
73
  endif;
 
74
  i++;
 
75
endloop;
 
76
 
 
77
SelectByPosSub(subtables[result], 1);
 
78
 
44
79
SelectInvert();
45
80
DetachAndRemoveGlyphs();
46
81