OSDN Git Service

updated with TeX Live 2014.
[putex/putex.git] / src / dvipdfmx-pu / README
1 The dvipdfmx Project
2 ====================
3
4 Copyright (C) 2002-2013 by Jin-Hwan Cho, Shunsaku Hirata, and 
5 Matthias Franz, the dvipdfmx project team.  This package is released
6 under the GNU GPL, version 2, or (at your option) any later version.
7
8 dvipdfmx is now maintained as part of TeX Live.
9
10 Contents
11 --------
12
13 1. Introduction
14
15 2. Installation
16
17   2.1. Compiling and Installation
18  
19   2.2. TeX Directory Structure (TDS)
20
21   2.3. Auxiliary Files
22
23 3. CJK Support
24
25   3.1. Quick Test of Installation
26
27   3.2. CJK-LaTeX and HLaTeX
28
29   3.3. Omega and Other Extended TeX  
30
31   3.4. Vertical Typesetting
32     
33 4. Unicode Support
34
35   4.1. Unicode Support in General
36
37   4.2. ToUnicode CMap Support
38
39   4.3. OpenType Support and Unicode
40
41   4.4. Type1 Font Support and Unicode
42     
43 5. Graphics and Image Format
44
45   5.1. Supported Graphics File Format
46
47   5.2. Graphics Extension
48
49   5.3. Using External Programs for Format Conversion
50
51 6. DVI Specials
52
53   6.1. Compatibility
54
55   6.2. Additions to Dvipdfm's pdf: Special
56
57 7. Font Mapping
58
59 8. Incompatible Changes From Dvipdfm
60
61 9. Other Improvement Over Dvipdfm
62
63 10. Font Licensing and Embedding
64
65
66
67 1. Introduction
68    ------------
69
70    The dvipdfmx (formerly dvipdfm-cjk) project provides an eXtended version
71    of the dvipdfm, a DVI to PDF translator developed by Mark A. Wicks.
72
73    The primary goal of this project is to support multi-byte character
74    encodings and large character sets for East Asian languages. The secondary
75    goal is to support as many features as pdfTeX developed by Han The Thanh.
76
77    This project is a combined work of the dvipdfm-jpn project by Shunsaku
78    Hirata and its modified one, dvipdfm-kor, by Jin-Hwan Cho.
79
80
81 2. Installation
82    -----------------------
83
84    Typical usage and installation steps are not different from the original dvipdfm.
85    Please refer documents from dvipdfm distribution for detailed instruction on how
86    to install and how to use dvipdfm.
87
88
89 2.1. Compiling and Installation
90
91
92    If you have obtained older version, please use latest version unless you have a
93    clear reason to choose older versions. The latest snapshot of dvipdfmx source is
94    available at:
95
96      http://project.ktug.or.kr/dvipdfmx/snapshot/
97
98    And the CVS repository for this project can be obtained through anonymous CVS
99    access with the following command:
100
101      cvs -d:pserver:anonymous@cvs.ktug.or.kr:/home/cvsroot login
102      cvs -d:pserver:anonymous@cvs.ktug.or.kr:/home/cvsroot co dvipdfmx
103
104    When prompted for a password, simply press the Enter key.
105
106  
107    The kpathsea library is required to compile and install dvipdfmx in UNIX or
108    UNIX-like platforms. It is usually included for most of TeX distributions.
109    If you already have installed dvipdfm (the original) by yourself, you should
110    already have kpathsea library and it's headers. And zlib library is highly
111    recommended as dvipdfmx can't compress data without this.
112  
113
114    Before starting things, you must check the location of your TeX installation.
115    If other TeX related programs are installed under, e.g., '/usr/local/TeX/bin',
116    you should specify directory '/usr/local/TeX' as an for ./configure script as
117  
118      ./configure --prefix=/usr/local/TeX --with-kpathsea=/usr/local/TeX
119
120    If you are using libpaper to handle paper sizes for various program, you can
121    use --with-paper option to ./configure. The location of libpaper library can
122    be specified with this option as
123
124      --with-paper=DIR
125
126    Please note thath dvipdfmx uses JIS paper size for B-series paper instead of
127    ISO's one for historical reason. (too late to change the default behavior)
128    The most easiest way to fix this is to use libpaper if you already have that,
129    otherwise define ISO_PAPERSIZE macro at compilation time. 
130
131    Dvipdfmx requires libpng library available from
132    
133      http://www.libpng.org/pub/png/libpng.html
134    
135    to read PNG format images. To tell dvipdfmx the location of libpng header
136    and library, use configure option
137    
138      --with-png=DIR
139
140    After you have finished ./configure, just type
141
142      make && make install
143
144    then dvipdfmx will be installed under the directory specified by the --prefix
145    option to ./configure script. After you have successfully installed dvipdfmx,
146    you may need to install various auxiliary files and slightly adjust location
147    of files or configuration. Amount of additional files and modification depends
148    on your environment, and briefly described in the sections follows.
149
150
151 2.2. TeX Directory Structure (TDS)
152
153
154    If your TeX installation is conforming with TDS version 1.1 described in
155
156      http://www.tug.org/ftp/tex/tds-1.1/
157
158    , then you'll need to adjust your dvipdfmx installtion. This also applies when
159    you have updated programs without modifying existing platform independent files
160    (files in texmf directory). Dvipdfmx installs few files in addition to dvipdfmx
161    program itself, dvipdfmx.cnf, cid-x.map and others, but it currently does not
162    choose installation directory as appropriate for TDS 1.1.
163
164    If your 'kpsewhich' program recognizes '.sfd' file format, i.e.,
165
166      kpsewhich --show-path --format=.sfd  
167
168    does not answer as 'unknown format', then you should move several files under
169    appropriate locations or should modify texmf.cnf as follows:
170
171      * Subfont Definition (SFD) Files
172  
173        Recommended location of SFD files (.sfd) is
174
175          $TEXMF/fonts/sfd/
176
177        and environmental variable for specifying additional search path for this
178        file format files is
179
180          SFDFONTS
181
182        . To make those files visible to dvipdfmx under TDS 1.1 installation, you
183        must move all .sfd files to the directory mentioned above or set SFDFONTS
184        variable in texmf.cnf. As some programs may not be updated to follow this
185        convention yet, it is recommended to preserve old installation directory.
186        If you have .sfd files under "$TEXMF/dvipdfm/", please do not use that,
187        please move all files to the directory mentioned above.
188
189     * PostScript CMap Resources
190
191       Recommended location of CMap files (no suffix or with suffix .cmap) is
192
193         $TEXMF/fonts/cmap/
194
195       and environmental variable for adding extra search path for this format files
196       is
197
198         CMAPFONTS
199
200       You may want to set CMAPFONTS to include GhostScript's Resource path, e.g.,
201
202          /usr/share/ghostscript/Resource/CMap//
203
204       in your texmf.cnf file as this resource can be used by various programs that
205       manipulates PS/PDF files. Dvipdfmx installs few additional files into the
206       directory "$TEXMF/dvipdfm/CMap", please move this files to the directory for
207       CMap files. But please note that file "Adobe-Identity-UCS2" is not meaningful
208       to other programs at all, so you should place at least this file in different
209       location than CMap files. (Or you can just remove this unless you see problems
210       in copy-and-pasting text from dvipdfmx output PDF.) 
211
212     * Font Mapping Files
213
214       Suggested place for dvipdfm's font mapping files (.map) is
215
216         $TEXMF/fonts/map/dvipdfm/
217       
218       and environmental variable for this format files is
219
220         TEXFONTMAPS
221
222       For files containing dvipdfmx extension to dvipdfm format, place them into
223
224         $TEXMF/fonts/map/dvipdfmx/
225
226       instead of sub-directory 'dvipdfm'.
227
228     * OpenType Fonts
229
230       Appropriate place for OpenType font with PostScript outline (.otf) is
231   
232          $TEXMF/fonts/opentype/supplier/typeface/
233
234       where 'supplier' and 'typeface' should be replaced with font's supplier and
235       typeface identifier strings.
236
237  
238 2.3. Auxiliary Files
239
240
241  1) CMap PostScript Resources
242
243    Dvipdfmx internally identifies glyphs in a font with identifier represented
244    as numbers ranging from 0 to 65535. CMap PostScript Resources defines how the
245    input character codes are translated to those ID's (CID). CID's should be
246    uniquely assigned to every glyphs contained in a collection of glyphs. Adobe
247    has defined several "character collection"s; Adobe-GB1 (Simplified Chinese),
248    Adobe-CNS1 (Traditional Chinese), Adobe-Japan1 (Japanese), and Adobe-Korea1
249    (Korean), which contains much of glyphs necessary for publishing for each
250    languages. Details on Adobe's character collections can be found at Adobe's
251    developer site:
252
253      http://partners.adobe.com/public/developer/font/index.html
254
255    Please install CMap resource files under the directory
256
257      ${TEXMF}/fonts/cmap
258
259    , or set CMAPFONTS variable to point the directory containing CMap resource
260    in texmf.cnf. If your TeX installation does not conforming TDS 1.1, then you
261    should set CMAPINPUTS variable to make those files visible to dvipdfmx. For
262    examples,
263
264      CMAPINPUTS= .;$TEXMF/fonts/cmap//     
265
266    Adobe's "CMaps for PDF 1.4 CJK Fonts" are available from:
267  
268      http://partners.adobe.com/public/developer/acrobat/index_advanced.html
269
270    or
271
272      ftp://ftp.oreilly.com/pub/examples/nutshell/cjkv/adobe/
273
274    You can find a short explanation of each CMap files in cid2code.txt contained
275    in the archive files found at the above FTP site.
276
277  
278  2) SubFont Definition Files
279
280    .....
281
282   
283  3) Adobe Glyph List and ToUnicode Mapping Files
284
285    The Adobe glyph list (AGL) file describes correspondence between PostScript
286    glyph names (e.g., AE, Aacute, ...) and it's Unicode character sequences.
287    Most features described in the section "Unicode Support" requires this file.
288
289    Dvipdfmx looks for file "glyphlist.txt" when conversion from PostScript glyph
290    names to Unicode is necessary. This conversion is done in various situations;
291    when creating ToUnicode CMap for 8bit encoded fonts, finding glyph description
292    from TrueType/OpenType fonts supporting Unicode when the font itself does not
293    provide the mapping from PostScript glyph names to glyph indices (version 2.0
294    "post" table), and when encoding "unicode" is specified for Type 1 font.
295
296    The "glyphlist.txt" file written by Adobe is found at
297
298      http://partners.adobe.com/asn/tech/type/glyphlist.txt
299
300    You should place file "glyphlist.txt" in a directory shown by
301
302      kpsewhich --progname=dvipdfm --show-path="other text files"
303
304    Please check kpathsea library can find this file by 'kpsewhich' command:
305
306      kpsewhich --progname=dvipdfm --format="other text files" glyphlist.txt
307
308    The 'progname' is not dvipdfmx but dvipdfm here.
309
310    ToUnicode mapping is similar to glyph list file but describes correspondence
311    between CID numbers and Unicode values. The content of this file look like a
312    CMap files and is contained in "CMaps for PDF 1.4 CJK Fonts" from Adobe (see
313    "CMap PostScript Resources" above). This file is required to support TrueType
314    font (including OpenType fonts with TrueType outline). Those files should be
315    installed same directory as ordinary CMap files.
316
317
318 3. CJK Support
319
320 3.1. Quick Test of Installation
321
322 3.2. CJK-LaTeX and HLaTeX
323
324 3.3. Omega and Other Extended TeX  
325
326  
327 4. Unicode Support
328
329 4.1. Unicode Support in General
330
331 4.2. ToUnicode CMap Support
332
333 4.3. OpenType Support and Unicode
334
335 4.4. Type1 Font Support and Unicode
336
337     
338 5. Graphics and Image Format
339
340 5.1. Supported Graphics File Format
341
342 5.2. Graphics Extension
343
344 5.3. Using External Programs for Format Conversion
345
346
347 6. DVI Specials
348
349 6.1. Compatibility
350
351 6.2. Additions to Dvipdfm's pdf: Special
352  
353
354 7. Font Mapping
355
356
357 7.1. Options for CJK Font
358
359    Few options are available in dvipdfmx (for CID-keyed fonts) in addition
360    to the original dvipdfm.
361
362
363  1) TTC Index
364
365    You can specify TrueType Collection index number with :n: option in front
366    of TrueType font name.
367
368      min10  H :1:mincho
369
370    In this example, the option :1: tells dvipdfmx to select TrueType font #1
371    from TrueType collection font "mincho.ttc".
372
373
374  2) No-embed Switch
375
376    It is possible to block embedding glyph data with the character `!'
377    in front of the font name in the font mapping file.
378
379    This feature reduces the size of the final PDF output, but the PDF file
380    may not be viewed exactly in other systems on which appropriate fonts
381    are not installed.
382
383    Use of this option is not recommended for fonts that contains unusual
384    characters (and characters having different width from default value).
385    Please note that glyph metric information is not written in the output
386    PDF file for TrueType fonts without embedding. It will be treated as
387    fixed-pitch with all widths equal to the default value (will be fixed
388    someday).
389
390
391  3) Stylistic Variants
392
393    Keywords ",Bold", ",Italic", and ",BoldItalic" can be used to create
394    synthetic bold, italic, and bolditalic style variants from other font
395    using PDF viewer's (or OS's) function.
396
397      jbtmo@UKS@     UniKSCms-UCS2-H :0:!batang,Italic
398      jbtb@Unicode@  Identity-H      !batang/UCS,Bold
399
400    Availability of this feature highly depends on the implementation of PDF
401    viewers. This feature is not supported for embedded fonts in the most of
402    PDF viewers, like Adobe Acrobat Reader and GNU Ghostscript.
403
404    Notice that this option automatically disable font embedding.
405
406
407
408 8. Incompatible Changes From Dvipdfm
409
410
411
412 9. Other Improvement Over Dvipdfm
413
414
415 9.1. Encryption
416
417
418 9.2. Font
419
420
421
422 10. Font Licensing and Embedding
423
424    In OpenType format, information regarding how the font should be treated
425    when creating documents can be recorded. Dvipdfmx uses this information
426    to decide whether embedding font into the document is permitted.
427
428    This font embedding information is indicated by a flag called as "fsType"
429    flag; each bit representing different restrictions on font embedding.
430    If multiple flag bits are set in fsType, the least restrictive license
431    granted takes precedence in dvipdfmx. The fsType flag bits recognized by
432    dvipdfmx is as follows:
433
434      * Installable embedding
435
436        All font with this type of license can be embedded.
437
438      * Editable embedding
439
440        All font with this type of license can be embedded.
441
442      * Embedding for Preview & Print only
443
444        Dvipdfmx give the following warning message for fonts with this
445        type of license:
446
447          This document contains `Preview & Print' only licensed font
448
449        For the font with this type of licensing, font embedding is allowed
450        solely for the purpose of (on-screen) viewing and/or printing the
451        document; further editing of the document or extracting an embedded
452        font data for other purpose is not allowed. To ensure this condition,
453        you must at least protect your document with non-empty password.
454
455    All other flags are treated as more restrictive license than any of the
456    above flags and treated as "No embedding allowed"; e.g., if both of the
457    editable-embedding flag and unrecognized license flag is set, the font
458    is treated as editable-embedding allowed, however, if only unrecognized
459    flags are set, the font is not embedded.
460
461    Embedding flags are preserved in embedded font if the font is embedded
462    as a TrueType font or a CIDFontType 2 CIDFont. For all font embedded as
463    a PostScript font (CFF, CIDFontType 0 CIDFont), they are not preserved.
464    Only /Copyright and /Notice in the FontInfo dictionary are preserved in
465    this case.
466
467    Some font vendors put different embedding restrictions for different
468    condition; e.g., font embedding might be not permitted for commercial
469    materials unless you acquire "commercial license" separately.
470    Please read EULA carefully before making decision on font usage.
471
472
473    Adobe provide a font licensing FAQ and a list of embedding permissions
474    for Adobe Type Library fonts:
475
476      http://www.adobe.com/type/browser/legal/
477
478    For Japanese font in general, embedding permission tend to be somewhat
479    restrictive. Japanese users should read the statement regarding font
480    embedding from Japan Typography Association (in Japanese):
481
482      http://www.typo.or.jp/info/morals/moral4.html