1#!/usr/bin/env perl
2#
3# cjk-gs-integrate - setup ghostscript for CID/TTF CJK fonts
4#
5# Copyright 2015 by Norbert Preining
6#
7# Based on research and work by Yusuke Kuroki, Bruno Voisin, Munehiro Yamamoto
8# and the TeX Q&A wiki page
9#
10# This file is licensed under GPL version 3 or any later version.
11# For copyright statements see end of file.
12#
13# For development see
14#  https://github.com/norbusan/cjk-gs-support
15#
16# TODO:
17# - how to deal with MacTeX pre-shipped configuration files?
18# - interoperability with updmap-config-kanji
19# - input from CK about font priorities
20#
21
22$^W = 1;
23use Getopt::Long qw(:config no_autoabbrev ignore_case_always);
24use File::Basename;
25use strict;
26
27(my $prg = basename($0)) =~ s/\.pl$//;
28my $version = '20150506.1';
29
30if (win32()) {
31  print_error("Sorry, currently not supported on Windows!\n");
32  exit(1);
33}
34
35my %encode_list = (
36  Japan => [ qw/
37    78-EUC-H
38    78-EUC-V
39    78-H
40    78-RKSJ-H
41    78-RKSJ-V
42    78-V
43    78ms-RKSJ-H
44    78ms-RKSJ-V
45    83pv-RKSJ-H
46    90ms-RKSJ-H
47    90ms-RKSJ-V
48    90msp-RKSJ-H
49    90msp-RKSJ-V
50    90pv-RKSJ-H
51    90pv-RKSJ-V
52    Add-H
53    Add-RKSJ-H
54    Add-RKSJ-V
55    Add-V
56    Adobe-Japan1-0
57    Adobe-Japan1-1
58    Adobe-Japan1-2
59    Adobe-Japan1-3
60    Adobe-Japan1-4
61    Adobe-Japan1-5
62    Adobe-Japan1-6
63    EUC-H
64    EUC-V
65    Ext-H
66    Ext-RKSJ-H
67    Ext-RKSJ-V
68    Ext-V
69    H
70    Hankaku
71    Hiragana
72    Identity-H
73    Identity-V
74    Katakana
75    NWP-H
76    NWP-V
77    RKSJ-H
78    RKSJ-V
79    Roman
80    UniJIS-UCS2-H
81    UniJIS-UCS2-HW-H
82    UniJIS-UCS2-HW-V
83    UniJIS-UCS2-V
84    UniJIS-UTF16-H
85    UniJIS-UTF16-V
86    UniJIS-UTF32-H
87    UniJIS-UTF32-V
88    UniJIS-UTF8-H
89    UniJIS-UTF8-V
90    UniJIS2004-UTF16-H
91    UniJIS2004-UTF16-V
92    UniJIS2004-UTF32-H
93    UniJIS2004-UTF32-V
94    UniJIS2004-UTF8-H
95    UniJIS2004-UTF8-V
96    UniJISPro-UCS2-HW-V
97    UniJISPro-UCS2-V
98    UniJISPro-UTF8-V
99    UniJISX0213-UTF32-H
100    UniJISX0213-UTF32-V
101    UniJISX02132004-UTF32-H
102    UniJISX02132004-UTF32-V
103    V
104    WP-Symbol/ ],
105  GB => [ qw/
106    Adobe-GB1-0
107    Adobe-GB1-1
108    Adobe-GB1-2
109    Adobe-GB1-3
110    Adobe-GB1-4
111    Adobe-GB1-5
112    GB-EUC-H
113    GB-EUC-V
114    GB-H
115    GB-RKSJ-H
116    GB-V
117    GBK-EUC-H
118    GBK-EUC-V
119    GBK2K-H
120    GBK2K-V
121    GBKp-EUC-H
122    GBKp-EUC-V
123    GBT-EUC-H
124    GBT-EUC-V
125    GBT-H
126    GBT-RKSJ-H
127    GBT-V
128    GBTpc-EUC-H
129    GBTpc-EUC-V
130    GBpc-EUC-H
131    GBpc-EUC-V
132    Identity-H
133    Identity-V
134    UniGB-UCS2-H
135    UniGB-UCS2-V
136    UniGB-UTF16-H
137    UniGB-UTF16-V
138    UniGB-UTF32-H
139    UniGB-UTF32-V
140    UniGB-UTF8-H
141    UniGB-UTF8-V/ ],
142  CNS => [ qw/
143    Adobe-CNS1-0
144    Adobe-CNS1-1
145    Adobe-CNS1-2
146    Adobe-CNS1-3
147    Adobe-CNS1-4
148    Adobe-CNS1-5
149    Adobe-CNS1-6
150    B5-H
151    B5-V
152    B5pc-H
153    B5pc-V
154    CNS-EUC-H
155    CNS-EUC-V
156    CNS1-H
157    CNS1-V
158    CNS2-H
159    CNS2-V
160    ETHK-B5-H
161    ETHK-B5-V
162    ETen-B5-H
163    ETen-B5-V
164    ETenms-B5-H
165    ETenms-B5-V
166    HKdla-B5-H
167    HKdla-B5-V
168    HKdlb-B5-H
169    HKdlb-B5-V
170    HKgccs-B5-H
171    HKgccs-B5-V
172    HKm314-B5-H
173    HKm314-B5-V
174    HKm471-B5-H
175    HKm471-B5-V
176    HKscs-B5-H
177    HKscs-B5-V
178    Identity-H
179    Identity-V
180    UniCNS-UCS2-H
181    UniCNS-UCS2-V
182    UniCNS-UTF16-H
183    UniCNS-UTF16-V
184    UniCNS-UTF32-H
185    UniCNS-UTF32-V
186    UniCNS-UTF8-H
187    UniCNS-UTF8-V/ ],
188  Korea => [ qw/
189    Adobe-Korea1-0
190    Adobe-Korea1-1
191    Adobe-Korea1-2
192    Identity-H
193    Identity-V
194    KSC-EUC-H
195    KSC-EUC-V
196    KSC-H
197    KSC-Johab-H
198    KSC-Johab-V
199    KSC-RKSJ-H
200    KSC-V
201    KSCms-UHC-H
202    KSCms-UHC-HW-H
203    KSCms-UHC-HW-V
204    KSCms-UHC-V
205    KSCpc-EUC-H
206    KSCpc-EUC-V
207    UniKS-UCS2-H
208    UniKS-UCS2-V
209    UniKS-UTF16-H
210    UniKS-UTF16-V
211    UniKS-UTF32-H
212    UniKS-UTF32-V
213    UniKS-UTF8-H
214    UniKS-UTF8-V/ ] );
215
216my $dry_run = 0;
217my $opt_help = 0;
218my $opt_quiet = 0;
219my $opt_debug = 0;
220my $opt_listaliases = 0;
221my $opt_listallaliases = 0;
222my $opt_listfonts = 0;
223my $opt_info = 0;
224my $opt_fontdef;
225my $opt_output;
226my @opt_aliases;
227my $opt_only_aliases = 0;
228my $opt_machine = 0;
229my $opt_filelist;
230my $opt_force = 0;
231my $opt_texmflink = 0;
232my $opt_markdown = 0;
233
234if (! GetOptions(
235        "n|dry-run"   => \$dry_run,
236        "info"        => \$opt_info,
237        "list-aliases" => \$opt_listaliases,
238        "list-all-aliases" => \$opt_listallaliases,
239        "list-fonts"  => \$opt_listfonts,
240        "link-texmflocal" => \$opt_texmflink,
241        "only-aliases" => \$opt_only_aliases,
242        "machine-readable" => \$opt_machine,
243        "force"       => \$opt_force,
244        "filelist=s"  => \$opt_filelist,
245        "markdown"    => \$opt_markdown,
246        "o|output=s"  => \$opt_output,
247	      "h|help"      => \$opt_help,
248        "q|quiet"     => \$opt_quiet,
249        "d|debug+"    => \$opt_debug,
250        "f|fontdef=s" => \$opt_fontdef,
251        "a|alias=s"   => \@opt_aliases,
252        "v|version"   => sub { print &version(); exit(0); }, ) ) {
253  die "Try \"$0 --help\" for more information.\n";
254}
255
256sub win32 { return ($^O=~/^MSWin(32|64)$/i); }
257my $nul = (win32() ? 'nul' : '/dev/null') ;
258my $sep = (win32() ? ';' : ':');
259my %fontdb;
260my %aliases;
261my %user_aliases;
262
263if ($opt_help) {
264  Usage();
265  exit 0;
266}
267
268if ($opt_debug) {
269  require Data::Dumper;
270  $Data::Dumper::Indent = 1;
271}
272
273chomp (my $TEXMFLOCAL = `kpsewhich -var-value=TEXMFLOCAL`);
274
275main(@ARGV);
276
277#
278# only sub definitions from here on
279#
280sub main {
281  print_info("reading font database ...\n");
282  read_font_database();
283  if (!$opt_listallaliases) {
284    print_info("checking for files ...\n");
285    check_for_files();
286  } else {
287    make_all_available();
288  }
289  compute_aliases();
290  if ($opt_info) {
291    $opt_listfonts = 1;
292    $opt_listaliases = 1;
293  }
294  if ($opt_listfonts) {
295    info_found_fonts();
296  }
297  if ($opt_listaliases || $opt_listallaliases) {
298    print "List of ", ($opt_listaliases ? "all" : "available"), " aliases and their options (in decreasing priority):\n" unless $opt_machine;
299    my (@jal, @kal, @tal, @sal);
300    for my $al (sort keys %aliases) {
301      my $cl;
302      my @ks = sort { $a <=> $b} keys(%{$aliases{$al}});
303      my $foo = '';
304      $foo = "$al:\n" unless $opt_machine;
305      for my $p (@ks) {
306        my $t = $aliases{$al}{$p};
307        my $fn = ($opt_listallaliases ? "-" : $fontdb{$t}{'target'} );
308        # should always be the same ;-)
309        $cl = $fontdb{$t}{'class'};
310        if (!$opt_listallaliases && $fontdb{$t}{'type'} eq 'TTF' && $fontdb{$t}{'subfont'} > 0) {
311          $fn .= "($fontdb{$t}{'subfont'})";
312        }
313        if ($opt_machine) {
314          $foo .= "$al:$p:$aliases{$al}{$p}:$fn\n";
315        } else {
316          $foo .= "\t($p) $aliases{$al}{$p} ($fn)\n";
317        }
318      }
319      if ($cl eq 'Japan') {
320        push @jal, $foo;
321      } elsif ($cl eq 'Korea') {
322        push @kal, $foo;
323      } elsif ($cl eq 'GB') {
324        push @sal, $foo;
325      } elsif ($cl eq 'CNS') {
326        push @tal, $foo;
327      } else {
328        print STDERR "unknown class $cl for $al\n";
329      }
330    }
331    if ($opt_machine) {
332      print @jal if @jal;
333      print @kal if @kal;
334      print @tal if @tal;
335      print @sal if @sal;
336    } else {
337      print "Aliases for Japanese fonts:\n", @jal, "\n" if @jal;
338      print "Aliases for Korean fonts:\n", @kal, "\n" if @kal;
339      print "Aliases for Traditional Chinese fonts:\n", @tal, "\n" if @tal;
340      print "Aliases for Simplified Chinese fonts:\n", @sal, "\n" if @sal;
341    }
342  }
343  exit(0) if ($opt_listfonts || $opt_listaliases || $opt_listallaliases);
344
345  if (! $opt_output) {
346    print_info("searching for GhostScript resource\n");
347    my $gsres = find_gs_resource();
348    if (!$gsres) {
349      print_error("Cannot find GhostScript, terminating!\n");
350      exit(1);
351    } else {
352      $opt_output = $gsres;
353    }
354  }
355  if (! -d $opt_output) {
356    $dry_run || mkdir($opt_output) ||
357      die ("Cannot create directory $opt_output: $!");
358  }
359  print_info("output is going to $opt_output\n");
360  if (!$opt_only_aliases) {
361    print_info("generating font snippets and link CID fonts ...\n");
362    do_otf_fonts();
363    print_info("generating font snippets, links, and cidfmap.local for TTF fonts ...\n");
364    do_ttf_fonts();
365  }
366  print_info("generating font aliases ...\n");
367  do_aliases();
368  print_info("finished\n");
369}
370
371sub update_master_cidfmap {
372  my $add = shift;
373  my $cidfmap_master = "$opt_output/Init/cidfmap";
374  if (-r $cidfmap_master) {
375    open(FOO, "<", $cidfmap_master) ||
376      die ("Cannot open $cidfmap_master for reading: $!");
377    my $found = 0;
378    while(<FOO>) {
379      $found = 1 if
380        m/^\s*\(\Q$add\E\)\s\s*\.runlibfile\s*$/;
381    }
382    if ($found) {
383      print_info("$add already loaded in $cidfmap_master, no changes\n");
384    } else {
385      return if $dry_run;
386      open(FOO, ">>", $cidfmap_master) ||
387        die ("Cannot open $cidfmap_master for appending: $!");
388      print FOO "($add) .runlibfile\n";
389      close(FOO);
390    }
391  } else {
392    return if $dry_run;
393    open(FOO, ">", $cidfmap_master) ||
394      die ("Cannot open $cidfmap_master for writing: $!");
395    print FOO "($add) .runlibfile\n";
396    close(FOO);
397  }
398}
399
400sub make_dir {
401  my ($d, $w) = @_;
402  if (-r $d) {
403    if (! -d $d) {
404      print_error("$d is not a directory, $w\n");
405      exit 1;
406    }
407  } else {
408    $dry_run || mkdir($d);
409  }
410}
411
412sub do_otf_fonts {
413  my $fontdest = "$opt_output/Font";
414  my $ciddest  = "$opt_output/CIDFont";
415  make_dir($fontdest, "cannot create CID snippets there!");
416  make_dir($ciddest,  "cannot link CID fonts there!");
417  print "opt_texfmlink = $opt_texmflink\n";
418  make_dir("$TEXMFLOCAL/fonts/opentype/cjk-gs-integrate",
419           "cannot link fonts to it!")
420    if $opt_texmflink;
421  for my $k (keys %fontdb) {
422    if ($fontdb{$k}{'available'} && $fontdb{$k}{'type'} eq 'CID') {
423      generate_font_snippet($fontdest,
424        $k, $fontdb{$k}{'class'}, $fontdb{$k}{'target'});
425      link_font($fontdb{$k}{'target'}, $ciddest, $k);
426      link_font($fontdb{$k}{'target'}, "$TEXMFLOCAL/fonts/opentype/cjk-gs-integrate")
427        if $opt_texmflink;
428    }
429  }
430}
431
432sub generate_font_snippet {
433  my ($fd, $n, $c, $f) = @_;
434  return if $dry_run;
435  for my $enc (@{$encode_list{$c}}) {
436    open(FOO, ">$fd/$n-$enc") ||
437      die("cannot open $fd/$n-$enc for writing: $!");
438    print FOO "%%!PS-Adobe-3.0 Resource-Font
439%%%%DocumentNeededResources: $enc (CMap)
440%%%%IncludeResource: $enc (CMap)
441%%%%BeginResource: Font ($n-$enc)
442($n-$enc)
443($enc) /CMap findresource
444[($n) /CIDFont findresource]
445composefont
446pop
447%%%%EndResource
448%%%%EOF
449";
450    close(FOO);
451  }
452}
453
454sub link_font {
455  my ($f, $cd, $n) = @_;
456  return if $dry_run;
457  if (!$n) {
458    $n = basename($f);
459  }
460  my $target = "$cd/$n";
461  if ($opt_force && -e $target) {
462    print_info("Removing $target prior to recreation due to --force\n");
463    unlink($target) || die "Cannot unlink $target prior to recreation under --force: $!";
464  }
465  if (-l $target) {
466    my $linkt = readlink($target);
467    if ($linkt && -r $linkt) {
468      if ($linkt eq $f) {
469        # do nothing, it is the same link
470      } else {
471        print_error("link $target already existing, but different target then $target, exiting!\n");
472        exit(1);
473      }
474    } else {
475      print_warning("removing dangling symlink $target to $linkt\n");
476      unlink($target);
477    }
478  } else {
479    if (-e $target) {
480      print_error("$target already existing, but not a link, exiting!\n");
481      exit(1);
482    } else {
483      symlink($f, $target) || die("Cannot link font $f to $target: $!");
484    }
485  }
486}
487
488sub do_ttf_fonts {
489  my $fontdest = "$opt_output/Font";
490  my $cidfsubst = "$opt_output/CIDFSubst";
491  my $outp = '';
492  make_dir($fontdest, "cannot create CID snippets there!");
493  make_dir($cidfsubst,  "cannot link TTF fonts there!");
494  make_dir("$TEXMFLOCAL/fonts/truetype/cjk-gs-integrate",
495           "cannot link fonts to it!")
496    if $opt_texmflink;
497  for my $k (keys %fontdb) {
498    if ($fontdb{$k}{'available'} && $fontdb{$k}{'type'} eq 'TTF') {
499      generate_font_snippet($fontdest,
500        $k, $fontdb{$k}{'class'}, $fontdb{$k}{'target'});
501      $outp .= generate_cidfmap_entry($k, $fontdb{$k}{'class'}, $fontdb{$k}{'target'}, $fontdb{$k}{'subfont'});
502      link_font($fontdb{$k}{'target'}, $cidfsubst);
503      link_font($fontdb{$k}{'target'}, "$TEXMFLOCAL/fonts/truetype/cjk-gs-integrate")
504        if $opt_texmflink;
505    }
506  }
507  return if $dry_run;
508  if ($outp) {
509    if (! -d "$opt_output/Init") {
510      mkdir("$opt_output/Init") ||
511        die("Cannot create directory $opt_output/Init: $!");
512    }
513    open(FOO, ">$opt_output/Init/cidfmap.local") ||
514      die "Cannot open $opt_output/cidfmap.local: $!";
515    print FOO $outp;
516    close(FOO);
517  }
518  print_info("adding cidfmap.local to cidfmap file ...\n");
519  update_master_cidfmap('cidfmap.local');
520}
521
522sub do_aliases {
523  my $fontdest = "$opt_output/Font";
524  my $cidfsubst = "$opt_output/CIDFSubst";
525  my $outp = '';
526  #
527  # alias handling
528  # we use two levels of aliases, one is for the default names that
529  # are not actual fonts:
530  # Ryumin-Light, GothicBBB-Medium, FutoMinA101-Bold, FutoGoB101-Bold,
531  # Jun101-Light which are the original Morisawa names.
532  #
533  # the second level of aliases is for Morisawa OTF font names:
534  # RyuminPro-Light, GothicBBBPro-Medium,
535  # FutoMinA101Pro-Bold, FutoGoB101Pro-Bold
536  # Jun101Pro-Light
537  #
538  # the order of fonts selected is
539  # Morisawa Pr6, Morisawa, Hiragino ProN, Hiragino,
540  # Yu OSX, Yu Win, Kozuka ProN, Kozuka, IPAex, IPA
541  # but is defined in the Provides(Priority): Name in the font definiton
542  #
543  $outp .= "\n\n% Aliases\n";
544  #
545  my (@jal, @kal, @tal, @sal);
546  #
547  for my $al (sort keys %aliases) {
548    my $target;
549    my $class;
550    if ($user_aliases{$al}) {
551      $target = $user_aliases{$al};
552      # determine class
553      if ($fontdb{$target}{'available'}) {
554        $class = $fontdb{$target}{'class'};
555      } else {
556        # must be an aliases, we checked this when initializing %user_aliases
557        # reset the $al value
558        # and since $class is still undefined we will use the next code below
559        $al = $target;
560      }
561    }
562    if (!$class) {
563      # search lowest number
564      my @ks = keys(%{$aliases{$al}});
565      my $first = (sort { $a <=> $b} @ks)[0];
566      $target = $aliases{$al}{$first};
567      $class  = $fontdb{$target}{'class'};
568    }
569    # we also need to create font snippets in Font for the aliases!
570    generate_font_snippet($fontdest, $al, $class, $target);
571    if ($class eq 'Japan') {
572      push @jal, "/$al /$target ;";
573    } elsif ($class eq 'Korea') {
574      push @kal, "/$al /$target ;";
575    } elsif ($class eq 'GB') {
576      push @sal, "/$al /$target ;";
577    } elsif ($class eq 'CNS') {
578      push @tal, "/$al /$target ;";
579    } else {
580      print STDERR "unknown class $class for $al\n";
581    }
582  }
583  $outp .= "\n% Japanese fonts\n" . join("\n", @jal) . "\n" if @jal;
584  $outp .= "\n% Korean fonts\n" . join("\n", @kal) . "\n" if @kal;
585  $outp .= "\n% Traditional Chinese fonts\n" . join("\n", @tal) . "\n" if @tal;
586  $outp .= "\n% Simplified Chinese fonts\n" . join("\n", @sal) . "\n" if @sal;
587  #
588  return if $dry_run;
589  if ($outp) {
590    if (! -d "$opt_output/Init") {
591      mkdir("$opt_output/Init") ||
592        die("Cannot create directory $opt_output/Init: $!");
593    }
594    open(FOO, ">$opt_output/Init/cidfmap.aliases") ||
595      die "Cannot open $opt_output/cidfmap.aliases: $!";
596    print FOO $outp;
597    close(FOO);
598  }
599  print_info("adding cidfmap.aliases to cidfmap file ...\n");
600  update_master_cidfmap('cidfmap.aliases');
601}
602
603sub generate_cidfmap_entry {
604  my ($n, $c, $f, $sf) = @_;
605  # we link the ttf fonts, so we use only the base name
606  # otherwise the ps2pdf breaks due to -dSAFER
607  my $bn = basename($f);
608  # extract subfont
609  my $s = "/$n << /FileType /TrueType
610  /Path pssystemparams /GenericResourceDir get
611  (CIDFSubst/$bn) concatstrings
612  /SubfontID $sf
613  /CSI [($c";
614  if ($c eq "Japan") {
615    $s .= "1) 6]";
616  } elsif ($c eq "GB") {
617    $s .= "1) 5]";
618  } elsif ($c eq "CNS") {
619    $s .= "1) 5]";
620  } elsif ($c eq "Korea") {
621    $s .= "1) 2]";
622  } else {
623    print_warning("unknown class $c for $n, skipping.\n");
624    return '';
625  }
626  $s .= " >> ;\n";
627  return $s;
628}
629
630#
631# dump found files
632sub info_found_fonts {
633  print "List of found fonts:\n\n";
634  for my $k (keys %fontdb) {
635    my @foundfiles;
636    if ($fontdb{$k}{'available'}) {
637      print "Font:  $k\n";
638      print "Type:  $fontdb{$k}{'type'}\n";
639      print "Class: $fontdb{$k}{'class'}\n";
640      my $fn = $fontdb{$k}{'target'};
641      if ($fontdb{$k}{'type'} eq 'TTF' && $fontdb{$k}{'subfont'} > 0) {
642        $fn .= "($fontdb{$k}{'subfont'})";
643      }
644      print "File:  $fn\n";
645      print "\n";
646    }
647  }
648}
649
650
651#
652# make all fonts available for listing all aliases
653sub make_all_available {
654  for my $k (keys %fontdb) {
655    $fontdb{$k}{'available'} = 1;
656    delete $fontdb{$k}{'files'};
657  }
658}
659
660#
661# checks all file names listed in %fontdb
662# and sets
663sub check_for_files {
664  my @foundfiles;
665  if ($opt_filelist) {
666    open(FOO, "<", $opt_filelist) || die "Cannot open $opt_filelist: $!";
667    @foundfiles = <FOO>;
668    close(FOO) || warn "Cannot close $opt_filelist: $!";
669  } else {
670    # first collect all files:
671    my @fn;
672    for my $k (keys %fontdb) {
673      for my $f (keys %{$fontdb{$k}{'files'}}) {
674        # check for subfont extension
675        if ($f =~ m/^(.*)\(\d*\)$/) {
676          push @fn, $1;
677        } else {
678          push @fn, $f;
679        }
680      }
681    }
682    #
683    # collect extra directories for search
684    my @extradirs;
685    if (win32()) {
686      push @extradirs, "c:/windows/fonts//";
687    } else {
688      # other dirs to check, for normal unix?
689      for my $d (qw!/Library/Fonts /System/Library/Fonts /Library/Fonts/Microsoft/ /Network/Library/Fonts!) {
690        push @extradirs, $d if (-d $d);
691      }
692      my $home = $ENV{'HOME'};
693      push @extradirs, "$home/Library/Fonts" if (-d "$home/Library/Fonts");
694    }
695    #
696    if (@extradirs) {
697      # final dummy directory
698      push @extradirs, "/this/does/not/really/exists/unless/you/are/stupid";
699      # push current value of OSFONTDIR
700      push @extradirs, $ENV{'OSFONTDIR'} if $ENV{'OSFONTDIR'};
701      # compose OSFONTDIR
702      my $osfontdir = join ':', @extradirs;
703      $ENV{'OSFONTDIR'} = $osfontdir;
704    }
705    if ($ENV{'OSFONTDIR'}) {
706      print_debug("final setting of OSFONTDIR: $ENV{'OSFONTDIR'}\n");
707    }
708    # prepare for kpsewhich call, we need to do quoting
709    my $cmdl = 'kpsewhich ';
710    for my $f (@fn) {
711      $cmdl .= " \"$f\" ";
712    }
713    # shoot up kpsewhich
714    print_ddebug("checking for $cmdl\n");
715    @foundfiles = `$cmdl`;
716  }
717  chomp(@foundfiles);
718  print_ddebug("Found files @foundfiles\n");
719  # map basenames to filenames
720  my %bntofn;
721  for my $f (@foundfiles) {
722    my $bn = basename($f);
723    $bntofn{$bn} = $f;
724  }
725  if ($opt_debug > 1) {
726    print_ddebug("dumping basename to filename list:\n");
727    print_ddebug(Data::Dumper::Dumper(\%bntofn));
728  }
729
730  # update the %fontdb with the found files
731  for my $k (keys %fontdb) {
732    $fontdb{$k}{'available'} = 0;
733    for my $f (keys %{$fontdb{$k}{'files'}}) {
734      # check for subfont extension
735      my $realfile = $f;
736      $realfile =~ s/^(.*)\(\d*\)$/$1/;
737      if ($bntofn{$realfile}) {
738        # we found a representative, make it available
739        $fontdb{$k}{'files'}{$f}{'target'} = $bntofn{$realfile};
740        $fontdb{$k}{'available'} = 1;
741      } else {
742        # delete the entry for convenience
743        delete $fontdb{$k}{'files'}{$f};
744      }
745    }
746  }
747  # second round to determine the winner in case of more targets
748  for my $k (keys %fontdb) {
749    if ($fontdb{$k}{'available'}) {
750      my $mp = 1000000; my $mf;
751      for my $f (keys %{$fontdb{$k}{'files'}}) {
752        if ($fontdb{$k}{'files'}{$f}{'priority'} < $mp) {
753          $mp = $fontdb{$k}{'files'}{$f}{'priority'};
754          $mf = $f;
755        }
756      }
757      # extract subfont if necessary
758      my $sf = 0;
759      if ($mf =~ m/^(.*)\((\d*)\)$/) { $sf = $2; }
760      $fontdb{$k}{'target'} = $fontdb{$k}{'files'}{$mf}{'target'};
761      $fontdb{$k}{'subfont'} = $sf if ($fontdb{$k}{'type'} eq 'TTF');
762    }
763    # not needed anymore
764    delete $fontdb{$k}{'files'};
765  }
766  if ($opt_debug > 0) {
767    print_debug("dumping font database:\n");
768    print_debug(Data::Dumper::Dumper(\%fontdb));
769  }
770}
771
772sub compute_aliases {
773  # go through fontdb to check for provides
774  # accumulate all provided fonts in @provides
775  for my $k (keys %fontdb) {
776    if ($fontdb{$k}{'available'}) {
777      for my $p (keys %{$fontdb{$k}{'provides'}}) {
778        # do not check alias if the real font is available
779        next if $fontdb{$p}{'available'};
780        # use the priority as key
781        # if priorities are double, this will pick one at chance
782        if ($aliases{$p}{$fontdb{$k}{'provides'}{$p}}) {
783          print_warning("duplicate provide levels:\n");
784          print_warning("  current $p $fontdb{$k}{'provides'}{$p} $aliases{$p}{$fontdb{$k}{'provides'}{$p}}\n");
785          print_warning("  ignored $p $fontdb{$k}{'provides'}{$p} $k\n");
786        } else {
787          $aliases{$p}{$fontdb{$k}{'provides'}{$p}} = $k;
788        }
789      }
790    }
791  }
792  # check for user supplied aliases
793  for my $a (@opt_aliases) {
794    if ($a =~ m/^(.*)=(.*)$/) {
795      my $ll = $1;
796      my $rr = $2;
797      # check for consistency of user provided aliases:
798      # - ll must not be available
799      # - rr needs to be available as font or alias
800      # check whether $rr is available, either as real font or as alias
801      if ($fontdb{$ll}{'available'}) {
802        print_error("left side of alias spec is provided by a real font: $a\n");
803        print_error("stopping here\n");
804        exit(1);
805      }
806      if (!($fontdb{$rr}{'available'} || $aliases{$rr})) {
807        print_error("right side of alias spec is not available as real font or alias: $a\n");
808        print_error("stopping here\n");
809        exit(1);
810      }
811      $user_aliases{$ll} = $rr;
812    }
813  }
814  if ($opt_debug > 0) {
815    print_debug("dumping aliases:\n");
816    print_debug(Data::Dumper::Dumper(\%aliases));
817  }
818}
819
820sub read_font_database {
821  my @dbl;
822  if ($opt_fontdef) {
823    open (FDB, "<$opt_fontdef") ||
824      die "Cannot find $opt_fontdef: $!";
825    @dbl = <FDB>;
826    close(FDB);
827  } else {
828    @dbl = <DATA>;
829  }
830  chomp(@dbl);
831  # add a "final empty line" to easy parsing
832  push @dbl, "";
833  my $fontname = "";
834  my $fonttype = "";
835  my $fontclass = "";
836  my %fontprovides = ();
837  my %fontfiles;
838  my $psname = "";
839  my $lineno = 0;
840  for my $l (@dbl) {
841    $lineno++;
842
843    next if ($l =~ m/^\s*#/);
844    if ($l =~ m/^\s*$/) {
845      if ($fontname || $fonttype || $fontclass || keys(%fontfiles)) {
846        if ($fontname && $fonttype && $fontclass && keys(%fontfiles)) {
847          my $realfontname = ($psname ? $psname : $fontname);
848          $fontdb{$realfontname}{'type'} = $fonttype;
849          $fontdb{$realfontname}{'class'} = $fontclass;
850          $fontdb{$realfontname}{'files'} = { %fontfiles };
851          $fontdb{$realfontname}{'provides'} = { %fontprovides };
852          # reset to start
853          $fontname = $fonttype = $fontclass = $psname = "";
854          %fontfiles = ();
855          %fontprovides = ();
856        } else {
857          print_warning("incomplete entry above line $lineno for $fontname/$fonttype/$fontclass, skipping!\n");
858          # reset to start
859          $fontname = $fonttype = $fontclass = $psname = "";
860          %fontfiles = ();
861          %fontprovides = ();
862        }
863      } else {
864        # no term is set, so nothing to warn about
865      }
866      next;
867    }
868    if ($l =~ m/^Name:\s*(.*)$/) { $fontname = $1; next; }
869    if ($l =~ m/^PSName:\s*(.*)$/) { $psname = $1; next; }
870    if ($l =~ m/^Type:\s*(.*)$/) { $fonttype = $1 ; next ; }
871    if ($l =~ m/^Class:\s*(.*)$/) { $fontclass = $1 ; next ; }
872    if ($l =~ m/^Filename(\((\d+)\))?:\s*(.*)$/) {
873      $fontfiles{$3}{'priority'} = ($2 ? $2 : 10);
874      next;
875    }
876    if ($l =~ m/^Provides\((\d+)\):\s*(.*)$/) { $fontprovides{$2} = $1; next; }
877    # we are still here??
878    print_error("Cannot parse this file at line $lineno, exiting. Strange line: >>>$l<<<\n");
879    exit (1);
880  }
881}
882
883sub find_gs_resource {
884  # we assume that gs is in the path
885  # on Windows we probably have to try something else
886  my @ret = `gs --help 2>$nul`;
887  my $foundres = '';
888  if ($?) {
889    print_error("Cannot find gs ...\n");
890  } else {
891    # try to find resource line
892    for (@ret) {
893      if (m!Resource/Font!) {
894        $foundres = $_;
895        $foundres =~ s/^\s*//;
896        $foundres =~ s/\s*:\s*$//;
897        $foundres =~ s!/Font!!;
898        last;
899      }
900    }
901    if (!$foundres) {
902      print_error("Found gs but no resource???\n");
903    }
904  }
905  return $foundres;
906}
907
908sub version {
909  my $ret = sprintf "%s version %s\n", $prg, $version;
910  return $ret;
911}
912
913sub Usage {
914  my $headline = "Configuring GhostScript for CJK CID/TTF fonts";
915  my $usage = "[perl] $prg\[.pl\] [OPTIONS]";
916  my $options = "
917-n, --dry-run         do not actually output anything
918-f, --fontdef FILE    specify alternate set of font definitions, if not
919                      given, the built-in set is used
920-o, --output DIR      specifies the base output dir, if not provided,
921                      the Resource directory of an install GhostScript
922                      is searched and used.
923-a, --alias LL=RR     defines an alias, or overrides a given alias
924                      illegal if LL is provided by a real font, or
925                      RR is neither available as real font or alias
926                      can be given multiple times
927--filelist FILE       read list of available font files from FILE
928                      instead of searching with kpathsea
929--link-texmflocal     link fonts into
930                         TEXMFLOCAL/fonts/opentype/cjk-gs-integrate
931                      and
932                         TEXMFLOCAL/fonts/truetype/cjk-gs-integrate
933--machine-readable    output of --list-aliases is machine readable
934--force               do not bail out if linked fonts already exist
935-q, --quiet           be less verbose
936-d, --debug           output debug information, can be given multiple times
937-v, --version         outputs only the version information
938-h, --help            this help
939";
940
941  my $commandoptions = "
942--only-aliases        do only regenerate the cidfmap.alias file instead of all
943--list-aliases        lists the available aliases and their options, with the
944                      selected option on top
945--list-all-aliases    list all possible aliases without searching for actually
946                      present files
947--list-fonts          lists the fonts found on the system
948--info                combines the above two information
949";
950
951  my $shortdesc = "
952This script searches a list of directories for CJK fonts, and makes
953them available to an installed GhostScript. In the simplest case with
954sufficient privileges, a run without arguments should effect in a
955complete setup of GhostScript.
956";
957
958my $operation = "
959For each found TrueType (TTF) font it creates a cidfmap entry in
960
961    <Resource>/Init/cidfmap.local
962
963and links the font to
964
965    <Resource>/CIDFSubst/
966
967For each CID font it creates a snippet in
968
969    <Resource>/Font/
970
971and links the font to
972
973    <Resource>/CIDFont/
974
975The `<Resource>` dir is either given by `-o`/`--output`, or otherwise searched
976from an installed GhostScript (binary name is assumed to be 'gs').
977
978Aliases are added to
979
980    <Resource>/Init/cidfmap.aliases
981
982Finally, it tries to add runlib calls to
983
984    <Resource>/Init/cidfmap
985
986to load the cidfmap.local and cidfmap.aliases.
987";
988
989  my $dirsearch = '
990Search is done using the kpathsea library, in particular using kpsewhich
991program. By default the following directories are searched:
992  - all TEXMF trees
993  - `/Library/Fonts`, `/Library/Fonts/Microsoft`, `/System/Library/Fonts`,
994    `/Network/Library/Fonts`, and `~/Library/Fonts` (all if available)
995  - `c:/windows/fonts` (on Windows)
996  - the directories in `OSFONTDIR` environment variable
997
998In case you want to add some directories to the search path, adapt the
999`OSFONTDIR` environment variable accordingly: Example:
1000
1001`````
1002    OSFONTDIR="/usr/local/share/fonts/truetype//:/usr/local/share/fonts/opentype//" $prg
1003`````
1004
1005will result in fonts found in the above two given directories to be
1006searched in addition.
1007';
1008
1009  my $outputfile = "
1010If no output option is given, the program searches for a GhostScript
1011interpreter 'gs' and determines its Resource directory. This might
1012fail, in which case one need to pass the output directory manually.
1013
1014Since the program adds files and link to this directory, sufficient
1015permissions are necessary.
1016";
1017
1018  my $aliases = "
1019Aliases are managed via the Provides values in the font database.
1020At the moment entries for the basic font names for CJK fonts
1021are added:
1022
1023Japanese:
1024
1025    Ryumin-Light GothicBBB-Medium FutoMinA101-Bold FutoGoB101-Bold Jun101-Light
1026
1027Korean:
1028
1029    HYGoThic-Medium HYSMyeongJo-Medium
1030
1031Simplified Chinese:
1032
1033    STSong-Light STHeiti-Regular STHeiti-Light STKaiti-Regular
1034
1035Traditional Chinese:
1036
1037    MSung-Light MHei-Medium MKai-Medium
1038
1039In addition, we also includes provide entries for the OTF Morisawa names:
1040    RyuminPro-Light GothicBBBPro-Medium FutoMinA101Pro-Bold
1041    FutoGoB101Pro-Bold Jun101Pro-Light
1042
1043The order is determined by the Provides setting in the font database,
1044and for the Japanese fonts it is currently:
1045    Morisawa Pr6, Morisawa, Hiragino ProN, Hiragino,
1046    Yu OSX, Yu Win, Kozuka ProN, Kozuka, IPAex, IPA
1047
1048That is, the first font found in this order will be used to provide the
1049alias if necessary.
1050
1051#### Overriding aliases ####
1052
1053Using the command line option `--alias LL=RR` one can add arbitrary aliases,
1054or override ones selected by the program. For this to work the following
1055requirements of `LL` and `RR` must be fulfilled:
1056  * `LL` is not provided by a real font
1057  * `RR` is available either as real font, or as alias (indirect alias)
1058";
1059
1060  my $authors = "
1061The script and its documentation was written by Norbert Preining, based
1062on research and work by Yusuke Kuroki, Bruno Voisin, Munehiro Yamamoto
1063and the TeX Q&A wiki page.
1064
1065The script is licensed under GNU General Public License Version 3 or later.
1066The contained font data is not copyrightable.
1067";
1068
1069
1070  if ($opt_markdown) {
1071    print "$headline\n";
1072    print ("=" x length($headline));
1073    print "\n$shortdesc\nUsage\n-----\n\n`````\n$usage\n`````\n\n";
1074    print "#### Options ####\n\n`````";
1075    print_for_out($options, "  ");
1076    print "`````\n\n#### Command like options ####\n\n`````";
1077    print_for_out($commandoptions, "  ");
1078    print "`````\n\nOperation\n---------\n$operation\n";
1079    print "How and which directories are searched\n";
1080    print "--------------------------------------\n$dirsearch\n";
1081    print "Output files\n";
1082    print "------------\n$outputfile\n";
1083    print "Aliases\n";
1084    print "-------\n$aliases\n";
1085    print "Authors, Contributors, and Copyright\n";
1086    print "------------------------------------\n$authors\n";
1087  } else {
1088    print "\nUsage: $usage\n\n$headline\n$shortdesc";
1089    print "\nOptions:\n";
1090    print_for_out($options, "  ");
1091    print "\nCommand like options:\n";
1092    print_for_out($commandoptions, "  ");
1093    print "\nOperation:\n";
1094    print_for_out($operation, "  ");
1095    print "\nHow and which directories are searched:\n";
1096    print_for_out($dirsearch, "  ");
1097    print "\nOutput files:\n";
1098    print_for_out($outputfile, "  ");
1099    print "\nAliases:\n";
1100    print_for_out($aliases, "  ");
1101    print "\nAuthors, Contributors, and Copyright:\n";
1102    print_for_out($authors, "  ");
1103    print "\n";
1104  }
1105  exit 0;
1106}
1107
1108sub print_for_out {
1109  my ($what, $indent) = @_;
1110  for (split /\n/, $what) {
1111    next if m/`````/;
1112    s/\s*####\s*//g;
1113    if ($_ eq '') {
1114      print "\n";
1115    } else {
1116      print "$indent$_\n";
1117    }
1118  }
1119}
1120
1121# info/warning can be suppressed
1122# verbose/error cannot be suppressed
1123sub print_info {
1124  print STDOUT "$prg: ", @_ if (!$opt_quiet);
1125}
1126sub print_verbose {
1127  print STDOUT "$prg: ", @_;
1128}
1129sub print_warning {
1130  print STDERR "$prg [WARNING]: ", @_ if (!$opt_quiet)
1131}
1132sub print_error {
1133  print STDERR "$prg [ERROR]: ", @_;
1134}
1135sub print_debug {
1136  print STDERR "$prg [DEBUG]: ", @_ if ($opt_debug >= 1);
1137}
1138sub print_ddebug {
1139  print STDERR "$prg [DEBUG]: ", @_ if ($opt_debug >= 2);
1140}
1141
1142
1143__DATA__
1144#
1145# CJK FONT DEFINITIONS
1146#
1147
1148# JAPAN
1149
1150# Morisawa
1151
1152Name: A-OTF-FutoGoB101Pr6N-Bold
1153PSName: FutoGoB101Pr6N-Bold
1154Type: CID
1155Class: Japan
1156Provides(10): FutoGoB101-Bold
1157Provides(10): FutoGoB101Pro-Bold
1158Filename: A-OTF-FutoGoB101Pr6N-Bold.otf
1159
1160Name: A-OTF-FutoGoB101Pro-Bold
1161PSName: FutoGoB101Pro-Bold
1162Type: CID
1163Class: Japan
1164Provides(20): FutoGoB101-Bold
1165Filename: A-OTF-FutoGoB101Pro-Bold.otf
1166
1167Name: A-OTF-FutoMinA101Pr6N-Bold
1168PSName: FutoMinA101Pr6N-Bold
1169Type: CID
1170Class: Japan
1171Provides(10): FutoMinA101-Bold
1172Provides(10): FutoMinA101Pro-Bold
1173Filename: A-OTF-FutoMinA101Pr6N-Bold.otf
1174
1175Name: A-OTF-FutoMinA101Pro-Bold
1176PSName: FutoMinA101Pro-Bold
1177Type: CID
1178Class: Japan
1179Provides(20): FutoMinA101-Bold
1180Filename: A-OTF-FutoMinA101Pro-Bold.otf
1181
1182Name: A-OTF-GothicBBBPr6N-Medium
1183PSName: GothicBBBPr6N-Medium
1184Type: CID
1185Class: Japan
1186Provides(10): GothicBBB-Medium
1187Provides(10): GothicBBBPro-Medium
1188Filename: A-OTF-GothicBBBPr6N-Medium.otf
1189
1190Name: A-OTF-GothicBBBPro-Medium
1191PSName: GothicBBBPro-Medium
1192Type: CID
1193Class: Japan
1194Provides(20): GothicBBB-Medium
1195Filename: A-OTF-GothicBBBPro-Medium.otf
1196
1197Name: A-OTF-Jun101Pro-Light
1198PSName: Jun101Pro-Light
1199Type: CID
1200Class: Japan
1201Provides(20): Jun101-Light
1202Filename: A-OTF-Jun101Pro-Light.otf
1203
1204Name: A-OTF-MidashiGoPr6N-MB31
1205PSName: MidashiGoPr6N-MB31
1206Type: CID
1207Class: Japan
1208Provides(10): MidashiGo-MB31
1209Provides(10): MidashiGoPro-MB31
1210Filename: A-OTF-MidashiGoPr6N-MB31.otf
1211
1212Name: A-OTF-MidashiGoPro-MB31
1213PSName: MidashiGoPro-MB31
1214Type: CID
1215Class: Japan
1216Provides(20): MidashiGo-MB31
1217Filename: A-OTF-MidashiGoPro-MB31.otf
1218
1219Name: A-OTF-RyuminPr6N-Light
1220PSName: RyuminPr6N-Light
1221Type: CID
1222Class: Japan
1223Provides(10): Ryumin-Light
1224Provides(10): RyuminPro-Light
1225Filename: A-OTF-RyuminPr6N-Light.otf
1226
1227Name: A-OTF-RyuminPro-Light
1228PSName: RyuminPro-Light
1229Type: CID
1230Class: Japan
1231Provides(20): Ryumin-Light
1232Filename: A-OTF-RyuminPro-Light.otf
1233
1234Name: A-OTF-ShinMGoPr6N-Light
1235PSName: ShinMGoPr6N-Light
1236Type: CID
1237Class: Japan
1238Provides(10): Jun101-Light
1239Provides(10): Jun101Pro-Light
1240Filename: A-OTF-ShinMGoPr6N-Light.otf
1241
1242
1243# Hiragino
1244
1245Name: HiraKakuPro-W3
1246Type: CID
1247Class: Japan
1248Provides(40): GothicBBB-Medium
1249Provides(40): GothicBBBPro-Medium
1250# the following two are *not* the same
1251# one is in decomposed form (for Mac), one is in composed form (for the rest)
1252Filename(20): ヒラギノ角ゴ Pro W3.otf
1253Filename(19): ヒラギノ角ゴ Pro W3.otf
1254Filename(10): HiraKakuPro-W3.otf
1255
1256Name: HiraKakuPro-W6
1257Type: CID
1258Class: Japan
1259Provides(40): FutoGoB101-Bold
1260Provides(40): FutoGoB101Pro-Bold
1261Filename(20): ヒラギノ角ゴ Pro W6.otf
1262Filename(19): ヒラギノ角ゴ Pro W6.otf
1263Filename(10): HiraKakuPro-W6.otf
1264
1265Name: HiraKakuProN-W3
1266Type: CID
1267Class: Japan
1268Provides(30): GothicBBB-Medium
1269Provides(30): GothicBBBPro-Medium
1270Filename(20): ヒラギノ角ゴ ProN W3.otf
1271Filename(19): ヒラギノ角ゴ ProN W3.otf
1272Filename(10): HiraKakuProN-W3.otf
1273
1274Name: HiraKakuProN-W6
1275Type: CID
1276Class: Japan
1277Provides(30): FutoGoB101-Bold
1278Provides(30): FutoGoB101Pro-Bold
1279Filename(20): ヒラギノ角ゴ ProN W6.otf
1280Filename(19): ヒラギノ角ゴ ProN W6.otf
1281Filename(10): HiraKakuProN-W6.otf
1282
1283Name: HiraKakuStd-W8
1284Type: CID
1285Class: Japan
1286Provides(40): MidashiGo-MB31
1287Provides(40): MidashiGoPro-MB31
1288Filename(20): ヒラギノ角ゴ Std W8.otf
1289Filename(19): ヒラギノ角ゴ Std W8.otf
1290Filename(10): HiraKakuStd-W8.otf
1291
1292Name: HiraKakuStdN-W8
1293Type: CID
1294Class: Japan
1295Provides(30): MidashiGo-MB31
1296Provides(30): MidashiGoPro-MB31
1297Filename(20): ヒラギノ角ゴ StdN W8.otf
1298Filename(19): ヒラギノ角ゴ StdN W8.otf
1299Filename(10): HiraKakuStdN-W8.otf
1300
1301Name: HiraMaruPro-W4
1302Type: CID
1303Class: Japan
1304Provides(40): Jun101-Light
1305Provides(40): Jun101Pro-Light
1306Filename(20): ヒラギノ丸ゴ Pro W4.otf
1307Filename(19): ヒラギノ丸ゴ Pro W4.otf
1308Filename(10): HiraMaruPro-W4.otf
1309
1310Name: HiraMaruProN-W4
1311Type: CID
1312Class: Japan
1313Provides(30): Jun101-Light
1314Provides(30): Jun101Pro-Light
1315Filename(20): ヒラギノ丸ゴ ProN W4.otf
1316Filename(19): ヒラギノ丸ゴ ProN W4.otf
1317Filename(10): HiraMaruProN-W4.otf
1318
1319Name: HiraMinPro-W3
1320Type: CID
1321Class: Japan
1322Provides(40): Ryumin-Light
1323Provides(40): RyuminPro-Light
1324Filename(20): ヒラギノ明朝 Pro W3.otf
1325Filename(19): ヒラギノ明朝 Pro W3.otf
1326Filename(10): HiraMinPro-W3.otf
1327
1328Name: HiraMinPro-W6
1329Type: CID
1330Class: Japan
1331Provides(40): FutoMinA101-Bold
1332Provides(40): FutoMinA101Pro-Bold
1333Filename(20): ヒラギノ明朝 Pro W6.otf
1334Filename(19): ヒラギノ明朝 Pro W6.otf
1335Filename(10): HiraMinPro-W6.otf
1336
1337Name: HiraMinProN-W3
1338Type: CID
1339Class: Japan
1340Provides(30): Ryumin-Light
1341Provides(30): RyuminPro-Light
1342Filename(20): ヒラギノ明朝 ProN W3.otf
1343Filename(19): ヒラギノ明朝 ProN W3.otf
1344Filename(10): HiraMinProN-W3.otf
1345
1346Name: HiraMinProN-W6
1347Type: CID
1348Class: Japan
1349Provides(30): FutoMinA101-Bold
1350Provides(30): FutoMinA101Pro-Bold
1351Filename(20): ヒラギノ明朝 ProN W6.otf
1352Filename(19): ヒラギノ明朝 ProN W6.otf
1353Filename(10): HiraMinProN-W6.otf
1354
1355
1356Name: HiraginoSansGB-W3
1357Type: CID
1358Class: GB
1359Filename(20): Hiragino Sans GB W3.otf
1360Filename(10): HiraginoSansGB-W3.otf
1361
1362Name: HiraginoSansGB-W6
1363Type: CID
1364Class: GB
1365Filename(20): Hiragino Sans GB W6.otf
1366Filename(10): HiraginoSansGB-W6.otf
1367
1368
1369# Yu-fonts MacOS version
1370
1371Name: YuGo-Medium
1372Type: CID
1373Class: Japan
1374Provides(50): GothicBBB-Medium
1375Provides(50): GothicBBBPro-Medium
1376Filename(20): Yu Gothic Medium.otf
1377Filename(10): YuGo-Medium.otf
1378
1379Name: YuGo-Bold
1380Type: CID
1381Class: Japan
1382Provides(50): FutoGoB101-Bold
1383Provides(50): FutoGoB101Pro-Bold
1384Provides(50): Jun101-Light
1385Provides(50): Jun101Pro-Light
1386Provides(50): MidashiGo-MB31
1387Provides(50): MidashiGoPro-MB31
1388Filename(20): Yu Gothic Bold.otf
1389Filename(10): YuGo-Bold.otf
1390
1391Name: YuMin-Medium
1392Type: CID
1393Class: Japan
1394Provides(50): Ryumin-Light
1395Provides(50): RyuminPro-Light
1396Filename(20): Yu Mincho Medium.otf
1397Filename(10): YuMin-Medium.otf
1398
1399Name: YuMin-Demibold
1400Type: CID
1401Class: Japan
1402Provides(50): FutoMinA101-Bold
1403Provides(50): FutoMinA101Pro-Bold
1404Filename(20): Yu Mincho Demibold.otf
1405Filename(10): YuMin-Demibold.otf
1406
1407# Yu-fonts Windows version
1408
1409Name: YuMincho-Regular
1410Type: TTF
1411Class: Japan
1412Provides(60): Ryumin-Light
1413Provides(60): RyuminPro-Light
1414Filename(20): yumin.ttf
1415Filename(10): YuMincho-Regular.ttf
1416
1417Name: YuMincho-Light
1418Type: TTF
1419Class: Japan
1420Filename(20): yuminl.ttf
1421Filename(10): YuMincho-Light.ttf
1422
1423Name: YuMincho-DemiBold
1424Type: TTF
1425Class: Japan
1426Provides(60): FutoMinA101-Bold
1427Provides(60): FutoMinA101Pro-Bold
1428Filename(20): yumindb.ttf
1429Filename(10): YuMincho-DemiBold.ttf
1430
1431Name: YuGothic-Regular
1432Type: TTF
1433Class: Japan
1434Provides(60): GothicBBB-Medium
1435Provides(60): GothicBBBPro-Medium
1436Filename(20): yugothic.ttf
1437Filename(10): YuGothic-Regular.ttf
1438
1439Name: YuGothic-Light
1440Type: TTF
1441Class: Japan
1442Filename(20): yugothil.ttf
1443Filename(10): YuGothic-Light.ttf
1444
1445Name: YuGothic-Bold
1446Type: TTF
1447Class: Japan
1448Provides(60): FutoGoB101-Bold
1449Provides(60): FutoGoB101Pro-Bold
1450Provides(60): Jun101-Light
1451Provides(60): Jun101Pro-Light
1452Provides(60): MidashiGo-MB31
1453Provides(60): MidashiGoPro-MB31
1454Filename(20): yugothib.ttf
1455Filename(10): YuGothic-Bold.ttf
1456
1457# IPA fonts
1458
1459Name: IPAMincho
1460Type: TTF
1461Class: Japan
1462Provides(110): Ryumin-Light
1463Provides(110): RyuminPro-Light
1464Provides(110): FutoMinA101-Bold
1465Provides(110): FutoMinA101Pro-Bold
1466Filename(20): ipam.ttf
1467Filename(10): IPAMincho.ttf
1468
1469Name: IPAGothic
1470Type: TTF
1471Class: Japan
1472Provides(110): GothicBBB-Medium
1473Provides(110): GothicBBBPro-Medium
1474Provides(110): FutoGoB101-Bold
1475Provides(110): FutoGoB101Pro-Bold
1476Provides(110): Jun101-Light
1477Provides(110): Jun101Pro-Light
1478Provides(110): MidashiGo-MB31
1479Provides(110): MidashiGoPro-MB31
1480Filename(20): ipag.ttf
1481Filename(10): IPAGothic.ttf
1482
1483Name: IPAexMincho
1484Type: TTF
1485Class: Japan
1486Provides(100): Ryumin-Light
1487Provides(100): RyuminPro-Light
1488Provides(100): FutoMinA101-Bold
1489Provides(100): FutoMinA101Pro-Bold
1490Filename(20): ipaexm.ttf
1491Filename(10): IPAexMincho.ttf
1492
1493Name: IPAexGothic
1494Type: TTF
1495Class: Japan
1496Provides(100): GothicBBB-Medium
1497Provides(100): GothicBBBPro-Medium
1498Provides(100): FutoGoB101-Bold
1499Provides(100): FutoGoB101Pro-Bold
1500Provides(100): Jun101-Light
1501Provides(100): Jun101Pro-Light
1502Provides(100): MidashiGo-MB31
1503Provides(100): MidashiGoPro-MB31
1504Filename(20): ipaexg.ttf
1505Filename(10): IPAexGothic.ttf
1506
1507# Kozuka fonts
1508
1509Name: KozGoPr6N-Bold
1510Type: CID
1511Class: Japan
1512Provides(70): FutoGoB101-Bold
1513Provides(70): FutoGoB101Pro-Bold
1514Filename: KozGoPr6N-Bold.otf
1515
1516Name: KozGoPr6N-Heavy
1517Type: CID
1518Class: Japan
1519Provides(70): Jun101-Light
1520Provides(70): Jun101Pro-Light
1521Provides(70): MidashiGo-MB31
1522Provides(70): MidashiGoPro-MB31
1523Filename: KozGoPr6N-Heavy.otf
1524
1525Name: KozGoPr6N-Medium
1526Type: CID
1527Class: Japan
1528Provides(70): GothicBBB-Medium
1529Provides(70): GothicBBBPro-Medium
1530Filename: KozGoPr6N-Medium.otf
1531
1532Name: KozGoPr6N-Regular
1533Type: CID
1534Class: Japan
1535Filename: KozGoPr6N-Regular.otf
1536
1537Name: KozGoPr6N-ExtraLight
1538Type: CID
1539Class: Japan
1540Filename: KozGoPr6N-ExtraLight.otf
1541
1542Name: KozGoPr6N-Light
1543Type: CID
1544Class: Japan
1545Filename: KozGoPr6N-Light.otf
1546
1547Name: KozGoPro-ExtraLight
1548Type: CID
1549Class: Japan
1550Filename: KozGoPro-ExtraLight.otf
1551
1552Name: KozGoPro-Light
1553Type: CID
1554Class: Japan
1555Filename: KozGoPro-Light.otf
1556
1557
1558Name: KozGoPro-Bold
1559Type: CID
1560Class: Japan
1561Provides(90): FutoGoB101-Bold
1562Provides(90): FutoGoB101Pro-Bold
1563Filename: KozGoPro-Bold.otf
1564
1565Name: KozGoPro-Heavy
1566Type: CID
1567Class: Japan
1568Provides(90): Jun101-Light
1569Provides(90): Jun101Pro-Light
1570Provides(90): MidashiGo-MB31
1571Provides(90): MidashiGoPro-MB31
1572Filename: KozGoPro-Heavy.otf
1573
1574Name: KozGoPro-Medium
1575Type: CID
1576Class: Japan
1577Provides(90): GothicBBB-Medium
1578Provides(90): GothicBBBPro-Medium
1579Filename: KozGoPro-Medium.otf
1580
1581Name: KozGoPro-Regular
1582Type: CID
1583Class: Japan
1584Filename: KozGoPro-Regular.otf
1585
1586Name: KozGoProVI-Bold
1587Type: CID
1588Class: Japan
1589Provides(80): FutoGoB101-Bold
1590Provides(80): FutoGoB101Pro-Bold
1591Filename: KozGoProVI-Bold.otf
1592
1593Name: KozGoProVI-Heavy
1594Type: CID
1595Class: Japan
1596Provides(80): Jun101-Light
1597Provides(80): Jun101Pro-Light
1598Provides(80): MidashiGo-MB31
1599Provides(80): MidashiGoPro-MB31
1600Filename: KozGoProVI-Heavy.otf
1601
1602Name: KozGoProVI-Medium
1603Type: CID
1604Class: Japan
1605Provides(80): GothicBBB-Medium
1606Provides(80): GothicBBBPro-Medium
1607Filename: KozGoProVI-Medium.otf
1608
1609Name: KozGoProVI-Regular
1610Type: CID
1611Class: Japan
1612Filename: KozGoProVI-Regular.otf
1613
1614Name: KozMinPr6N-Bold
1615Type: CID
1616Class: Japan
1617Provides(70): FutoMinA101-Bold
1618Provides(70): FutoMinA101Pro-Bold
1619Filename: KozMinPr6N-Bold.otf
1620
1621Name: KozMinPr6N-Light
1622Type: CID
1623Class: Japan
1624Filename: KozMinPr6N-Light.otf
1625
1626Name: KozMinPr6N-Regular
1627Type: CID
1628Class: Japan
1629Provides(70): Ryumin-Light
1630Provides(70): RyuminPro-Light
1631Filename: KozMinPr6N-Regular.otf
1632
1633Name: KozMinPro-Bold
1634Type: CID
1635Class: Japan
1636Provides(90): FutoMinA101-Bold
1637Provides(90): FutoMinA101Pro-Bold
1638Filename: KozMinPro-Bold.otf
1639
1640Name: KozMinPro-Light
1641Type: CID
1642Class: Japan
1643Filename: KozMinPro-Light.otf
1644
1645Name: KozMinPro-Regular
1646Type: CID
1647Class: Japan
1648Provides(90): Ryumin-Light
1649Provides(90): RyuminPro-Light
1650Filename: KozMinPro-Regular.otf
1651
1652Name: KozMinProVI-Bold
1653Type: CID
1654Class: Japan
1655Provides(80): FutoMinA101-Bold
1656Provides(80): FutoMinA101Pro-Bold
1657Filename: KozMinProVI-Bold.otf
1658
1659Name: KozMinProVI-Light
1660Type: CID
1661Class: Japan
1662Filename: KozMinProVI-Light.otf
1663
1664Name: KozMinProVI-Regular
1665Type: CID
1666Class: Japan
1667Provides(80): Ryumin-Light
1668Provides(80): RyuminPro-Light
1669Filename: KozMinProVI-Regular.otf
1670
1671Name: KozMinPr6N-ExtraLight
1672Type: CID
1673Class: Japan
1674Filename: KozMinPr6N-ExtraLight.otf
1675
1676Name: KozMinPr6N-Medium
1677Type: CID
1678Class: Japan
1679Filename: KozMinPr6N-Medium.otf
1680
1681Name: KozMinPr6N-Heavy
1682Type: CID
1683Class: Japan
1684Filename: KozMinPr6N-Heavy.otf
1685
1686Name: KozMinPro-ExtraLight
1687Type: CID
1688Class: Japan
1689Filename: KozMinPro-ExtraLight.otf
1690
1691Name: KozMinPro-Medium
1692Type: CID
1693Class: Japan
1694Filename: KozMinPro-Medium.otf
1695
1696Name: KozMinPro-Heavy
1697Type: CID
1698Class: Japan
1699Filename: KozMinPro-Heavy.otf
1700
1701
1702#
1703# CHINESE FONTS
1704#
1705
1706Name: LiHeiPro
1707Type: TTF
1708Class: CNS
1709Provides(50): MHei-Medium
1710Filename(20): 儷黑 Pro.ttf
1711Filename(10): LiHeiPro.ttf
1712
1713Name: LiSongPro
1714Type: TTF
1715Class: CNS
1716Provides(50): MSung-Medium
1717Provides(50): MSung-Light
1718Filename(20): 儷宋 Pro.ttf
1719Filename(10): LiSongPro.ttf
1720
1721Name: STXihei
1722Type: TTF
1723Class: GB
1724Provides(20): STHeiti-Light
1725Filename(20): 华文细黑.ttf
1726Filename(10): STXihei.ttf
1727
1728Name: STHeiti
1729Type: TTF
1730Class: GB
1731Provides(50): STHeiti-Regular
1732Filename(20): 华文黑体.ttf
1733Filename(10): STHeiti.ttf
1734
1735Name: STHeitiSC-Light
1736Type: TTF
1737Class: GB
1738Provides(10): STHeiti-Light
1739Filename(10): STHeiti Light.ttc(1)
1740Filename(20): STHeitiSC-Light.ttf
1741
1742Name: STHeitiSC-Medium
1743Type: TTF
1744Class: GB
1745Provides(40): STHeiti-Regular
1746Filename(10): STHeiti Medium.ttc(1)
1747Filename(20): STHeitiSC-Medium.ttf
1748
1749Name: STHeitiTC-Light
1750Type: TTF
1751Class: CNS
1752Filename(10): STHeiti Light.ttc(0)
1753Filename(20): STHeitiTC-Light.ttf
1754
1755Name: STHeitiTC-Medium
1756Type: TTF
1757Class: CNS
1758Provides(40): MHei-Medium
1759Filename(10): STHeiti Medium.ttc(0)
1760Filename(20): STHeitiTC-Medium.ttf
1761
1762Name: STFangsong
1763Type: TTF
1764Class: GB
1765Provides(40): STFangsong-Light
1766Provides(40): STFangsong-Regular
1767Filename(20): 华文仿宋.ttf
1768Filename(10): STFangsong.ttf
1769
1770Name: STSong
1771Type: TTF
1772Class: GB
1773Provides(50): STSong-Light
1774Filename(10): Songti.ttc(4)
1775Filename(20): 宋体.ttc(3)
1776Filename(30): 华文宋体.ttf
1777Filename(40): STSong.ttf
1778
1779Name: STSongti-SC-Light
1780Type: TTF
1781Class: GB
1782Provides(40): STSong-Light
1783Filename(10): Songti.ttc(3)
1784Filename(20): 宋体.ttc(2)
1785Filename(30): STSongti-SC-Light.ttf
1786
1787Name: STSongti-SC-Regular
1788Type: TTF
1789Class: GB
1790Filename(10): Songti.ttc(6)
1791Filename(20): 宋体.ttc(4)
1792Filename(30): STSongti-SC-Regular.ttf
1793
1794Name: STSongti-SC-Bold
1795Type: TTF
1796Class: GB
1797Filename(10): Songti.ttc(1)
1798Filename(20): 宋体.ttc(1)
1799Filename(30): STSongti-SC-Bold.ttf
1800
1801Name: STSongti-SC-Black
1802Type: TTF
1803Class: GB
1804Filename(10): Songti.ttc(0)
1805Filename(20): 宋体.ttc(0)
1806Filename(30): STSongti-SC-Black.ttf
1807
1808Name: STSongti-TC-Light
1809Type: TTF
1810Class: CNS
1811Provides(40): MSung-Light
1812Filename(10): Songti.ttc(5)
1813Filename(20): STSongti-TC-Light.ttf
1814
1815Name: STSongti-TC-Regular
1816Type: TTF
1817Class: CNS
1818Provides(40): MSung-Medium
1819Filename(10): Songti.ttc(7)
1820Filename(20): STSongti-TC-Regular.ttf
1821
1822Name: STSongti-TC-Bold
1823Type: TTF
1824Class: CNS
1825Filename(10): Songti.ttc(2)
1826Filename(20): STSongti-TC-Bold.ttf
1827
1828Name: STKaiti
1829Type: TTF
1830Class: GB
1831Provides(50): STKaiti-Regular
1832Filename(10): Kaiti.ttc(4)
1833Filename(20): 楷体.ttc(3)
1834Filename(30): 华文楷体.ttf
1835Filename(40): STKaiti.ttf
1836
1837Name: STKaiti-SC-Regular
1838Type: TTF
1839Class: GB
1840Provides(40): STKaiti-Regular
1841Filename(10): Kaiti.ttc(3)
1842Filename(20): 楷体.ttc(2)
1843Filename(30): STKaiti-SC-Regular.ttf
1844
1845Name: STKaiti-SC-Bold
1846Type: TTF
1847Class: GB
1848Filename(10): Kaiti.ttc(1)
1849Filename(20): 楷体.ttc(1)
1850Filename(30): STKaiti-SC-Bold.ttf
1851
1852Name: STKaiti-SC-Black
1853Type: TTF
1854Class: GB
1855Filename(10): Kaiti.ttc(0)
1856Filename(20): 楷体.ttc(0)
1857Filename(30): STKaiti-SC-Black.ttf
1858
1859Name: STKaiTi-TC-Regular
1860Type: TTF
1861Class: CNS
1862Provides(40): MKai-Medium
1863Filename(10): Kaiti.ttc(5)
1864Filename(20): STKaiTi-TC-Regular.ttf
1865
1866Name: STKaiTi-TC-Bold
1867Type: TTF
1868Class: CNS
1869Filename(10): Kaiti.ttc(2)
1870Filename(20): STKaiTi-TC-Bold.ttf
1871
1872Name: STKaiti-Adobe-CNS1
1873Type: TTF
1874Class: CNS
1875Provides(50): MKai-Medium
1876Filename(10): Kaiti.ttc(4)
1877Filename(20): 楷体.ttc(3)
1878Filename(30): 华文楷体.ttf
1879Filename(40): STKaiti.ttf
1880
1881# Adobe fonts
1882
1883# simplified chinese
1884
1885Name: AdobeSongStd-Light
1886Type: CID
1887Class: GB
1888Provides(30): STSong-Light
1889Filename(10): AdobeSongStd-Light.otf
1890
1891Name: AdobeHeitiStd-Regular
1892Type: CID
1893Class: GB
1894Provides(30): STHeiti-Regular
1895Provides(30): STHeiti-Light
1896Filename(20): AdobeHeitiStd-Regular.otf
1897
1898Name: AdobeKaitiStd-Regular
1899Type: CID
1900Class: GB
1901Provides(30): STKaiti-Regular
1902Filename(20): AdobeKaitiStd-Regular.otf
1903
1904Name: AdobeFangsongStd-Regular
1905Type: CID
1906Class: GB
1907Provides(30): STFangsong-Light
1908Provides(30): STFangsong-Regular
1909Filename(20): AdobeFangsongStd-Regular.otf
1910
1911# traditional chinese
1912
1913Name: AdobeMingStd-Light
1914Type: CID
1915Class: CNS
1916Provides(30): MSung-Light
1917Provides(30): MSung-Medium
1918Filename(20): AdobeMingStd-Light.otf
1919
1920Name: AdobeFanHeitiStd-Bold
1921Type: CID
1922Class: CNS
1923Provides(30): MHei-Medium
1924Provides(30): MKai-Medium
1925Filename(20): AdobeFanHeitiStd-Bold.otf
1926
1927# korean
1928
1929Name: AdobeMyungjoStd-Medium
1930Type: CID
1931Class: Korea
1932Provides(20): HYSMyeongJo-Medium
1933Filename: AdobeMyungjoStd-Medium.otf
1934
1935Name: AdobeGothicStd-Bold
1936Type: CID
1937Class: Korea
1938Provides(20): HYGoThic-Medium
1939Provides(50): HYRGoThic-Medium
1940Filename: AdobeGothicStd-Bold.otf
1941
1942#
1943# KOREAN FONTS
1944#
1945
1946# apple fonts
1947
1948Name: AppleMyungjo
1949Type: TTF
1950Class: Korea
1951Provides(50): HYSMyeongJo-Medium
1952Filename: AppleMyungjo.ttf
1953
1954Name: AppleGothic
1955Type: TTF
1956Class: Korea
1957Provides(50): HYGoThic-Medium
1958Provides(80): HYRGoThic-Medium
1959Filename: AppleGothic.ttf
1960
1961Name: NanumMyeongjo
1962Type: TTF
1963Class: Korea
1964Provides(30): HYSMyeongJo-Medium
1965Filename: NanumMyeongjo.ttc(0)
1966
1967Name: NanumMyeongjoBold
1968Type: TTF
1969Class: Korea
1970Filename: NanumMyeongjo.ttc(1)
1971
1972Name: NanumMyeongjoExtraBold
1973Type: TTF
1974Class: Korea
1975Filename: NanumMyeongjo.ttc(2)
1976
1977Name: NanumGothic
1978Type: TTF
1979Class: Korea
1980Provides(30): HYGoThic-Medium
1981Provides(60): HYRGoThic-Medium
1982Filename: NanumGothic.ttc(0)
1983
1984Name: NanumGothicBold
1985Type: TTF
1986Class: Korea
1987Filename: NanumGothic.ttc(1)
1988
1989Name: NanumGothicExtraBold
1990Type: TTF
1991Class: Korea
1992Filename: NanumGothic.ttc(2)
1993
1994Name: NanumBrush
1995Type: TTF
1996Class: Korea
1997Filename: NanumScript.ttc(0)
1998
1999Name: NanumPen
2000Type: TTF
2001Class: Korea
2002Filename: NanumScript.ttc(1)
2003
2004Name: AppleSDGothicNeo-Thin
2005Type: CID
2006Class: Korea
2007Filename: AppleSDGothicNeo-Thin.otf
2008
2009Name: AppleSDGothicNeo-UltraLight
2010Type: CID
2011Class: Korea
2012Filename: AppleSDGothicNeo-UltraLight.otf
2013
2014Name: AppleSDGothicNeo-Light
2015Type: CID
2016Class: Korea
2017Filename: AppleSDGothicNeo-Light.otf
2018
2019Name: AppleSDGothicNeo-Regular
2020Type: CID
2021Class: Korea
2022Filename: AppleSDGothicNeo-Regular.otf
2023
2024Name: AppleSDGothicNeo-Medium
2025Type: CID
2026Class: Korea
2027Filename: AppleSDGothicNeo-Medium.otf
2028
2029Name: AppleSDGothicNeo-SemiBold
2030Type: CID
2031Class: Korea
2032Filename: AppleSDGothicNeo-SemiBold.otf
2033
2034Name: AppleSDGothicNeo-Bold
2035Type: CID
2036Class: Korea
2037Filename: AppleSDGothicNeo-Bold.otf
2038
2039Name: AppleSDGothicNeo-ExtraBold
2040Type: CID
2041Class: Korea
2042Filename: AppleSDGothicNeo-ExtraBold.otf
2043
2044Name: AppleSDGothicNeo-Heavy
2045Type: CID
2046Class: Korea
2047Filename: AppleSDGothicNeo-Heavy.otf
2048
2049#
2050# Microsoft Mac Office fonts
2051#
2052
2053# Korea
2054
2055Name: Gulim
2056Type: TTF
2057Class: Korea
2058Provides(70): HYRGoThic-Medium
2059Provides(70): HYGoThic-Medium
2060Filename(30): Gulim.ttf
2061Filename(50): gulim.ttc
2062
2063Name: Dotum
2064Type: TTF
2065Class: Korea
2066Provides(40): HYGoThic-Medium
2067Filename(50): Dotum.ttf
2068
2069Name: Batang
2070Type: TTF
2071Class: Korea
2072Provides(40): HYSMyeongJo-Medium
2073Filename(50): Batang.ttf
2074
2075# simplified chinese
2076
2077Name: SimHei
2078Type: TTF
2079Class: GB
2080Provides(60): STHeiti-Regular
2081Provides(60): STKaiti-Regular
2082Provides(60): STHeiti-Light
2083Filename(50): SimHei.ttf
2084
2085Name: SimSun
2086Type: TTF
2087Class: GB
2088Provides(60): STSong-Light
2089Provides(60): STFangsong-Light
2090Provides(60): STFangsong-Regular
2091Filename(50): SimSun.ttf
2092
2093# traditional chinese
2094
2095Name: MingLiU
2096Type: TTF
2097Class: CNS
2098Provides(60): MHei-Medium
2099Provides(60): MKai-Medium
2100Provides(60): MSung-Medium
2101Provides(60): MSung-Light
2102Filename(50): MingLiU.ttf
2103
2104Name: PMingLiU
2105Type: TTF
2106Class: CNS
2107Filename(50): PMingLiU.ttf
2108
2109# japanese
2110
2111Name: MS-Gothic
2112Type: TTF
2113Class: Japan
2114Provides(95): GothicBBB-Medium
2115Provides(95): GothicBBBPro-Medium
2116Provides(95): MidashiGo-MB31
2117Provides(95): MidashiGoPro-MB31
2118Provides(95): FutoGoB101-Bold
2119Provides(95): FutoGoB101Pro-Bold
2120Provides(95): MidashiGo-MB31
2121Provides(95): MidashiGoPro-MB31
2122Provides(95): Jun101-Light
2123Provides(95): Jun101Pro-Light
2124Filename(50): MS Gothic.ttf
2125Filename(30): MS-Gothic.ttf
2126
2127Name: MS-Mincho
2128Type: TTF
2129Class: Japan
2130Provides(95): Ryumin-Light
2131Provides(95): RyuminPro-Light
2132Provides(95): FutoMinA101-Bold
2133Provides(95): FutoMinA101Pro-Bold
2134Filename(50): MS Mincho.ttf
2135Filename(30): MS-Mincho.ttf
2136
2137Name: MS-PGothic
2138Type: TTF
2139Class: Japan
2140Filename(50): MS PGothic.ttf
2141Filename(30): MS-PGothic.ttf
2142
2143Name: MS-PMincho
2144Type: TTF
2145Class: Japan
2146Filename(50): MS PMincho.ttf
2147Filename(30): MS-PMincho.ttf
2148
2149Name: Meiryo
2150Type: TTF
2151Class: Japan
2152Filename(50): Meiryo.ttf
2153
2154Name: Meiryo-Bold
2155Type: TTF
2156Class: Japan
2157Filename(50): Meiryo Bold.ttf
2158Filename(30): Meiryo-Bold.ttf
2159
2160Name: Meiryo-BoldItalic
2161Type: TTF
2162Class: Japan
2163Filename(50): Meiryo Bold Italic.ttf
2164Filename(30): Meiryo-BoldItalic.ttf
2165
2166Name: Meiryo-Italic
2167Type: TTF
2168Class: Japan
2169Filename(50): Meiryo Italic.ttf
2170Filename(30): Meiryo-Italic.ttf
2171
2172
2173### Local Variables:
2174### perl-indent-level: 2
2175### tab-width: 2
2176### indent-tabs-mode: nil
2177### End:
2178# vim: set tabstop=2 expandtab autoindent:
2179