File: ref-caveats.html

package info (click to toggle)
fontforge 1%3A20230101~dfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 63,260 kB
  • sloc: ansic: 462,618; python: 6,916; cpp: 214; objc: 122; sh: 101; makefile: 55; xml: 11
file content (129 lines) | stat: -rw-r--r-- 12,319 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<HTML>
<HEAD>
  <!-- Created with AOLpress/2.0 -->
  <!-- AP: Created on: 13-Nov-2005 -->
  <!-- AP: Last modified: 11-Dec-2005 -->
<!--<TITLE>Caveats about References</TITLE>-->
    <TITLE>参照に関する警告</TITLE>
  <LINK REL="icon" href="../../_static/fftype16.png">
  <LINK REL="stylesheet" TYPE="text/css" HREF="FontForge.css">
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
</HEAD>
<BODY>
<div id="in">
<P>
<!--
Different font formats place different restrictions on the use of references.
This does NOT mean you should avoid references -- they are a useful way of
encapsulating information even if the font format cannot support them directly.
If FontForge finds a situation where it can't use a refered glyph as a reference
it will fix it up somehow, usually this means replacing it with the equivalent
outlines. -->
各種のフォントフォーマットには参照の使用方法に関する制限があり、その内容はそれぞれ少しずつ異なっています。だからと言って、参照を使うなと言いたいわけでは<em>ありません</em>——たとえフォントフォーマットのサポートによって直接それを扱えない場合でも、参照が情報をカプセル化する有用な方法であることに変わりありません。グリフ参照を参照の形のままでフォントに書き出せない場合でも、FontForge はなんとかして問題を解決しようと試みます。具体的な解決策としては、参照をそれと等価なアウトラインに置き換えるのが普通です。
<P>
<!--
Let us examine the most common font formats: -->
最もありふれたフォントフォーマットについて確認してみましょう:
<DL>
  <DT>
    TrueType
  <DD>
<!--In TrueType any glyph may be referenced, and TrueType supports almost a full
    range of linear transformations that may be applied to a reference, however
    if a reference is scaled by 200% or more (or -200% or less) it cannot be
    represented in TrueType. -->
    TrueType では、任意のグリフを参照することができます。また、TrueType では参照に適用される可能性がある線形変換のほとんど全ての範囲をサポートしていますが、参照を 200% 以上 (または -200% 以下) の比率で拡大したときには、TrueType では表現不可能です。
    <P>
<!--TrueType also does not support mixing outlines and references. -->
    また、TrueType は、アウトラインと参照との混在をサポートしていません。
    <P>
<!--If you have a glyph containing a reference which cannot be used (or that
    mixes outlines and references) then ALL references will be converted to outlines
    during output. -->
    あるグリフに使用できない参照が 1 つでも含まれている場合 (または、アウトラインと参照が混在している場合)、グリフに含まれる<strong>全ての</strong>参照が出力時にアウトラインに変換されます。
    <P>
<!--This means that any instructions in the glyph itself will be meaningless,
    and any instructions in referred glyphs will not be executed.<BR>
    NOTE: Just because general transformations are supported, it isn't always
    a good idea to use them. If you flip a reference, the rasterizer will probably
    have difficulties with it (its contours will run in the wrong direction).
    If you rotate a reference any instructions inside it will not work well. -->
    結論を言えば、グリフ内に含まれる命令はすべて意味を失い、参照されているグリフに含まれる参照されたグリフに含まれることを意味します。<BR>
    注意: 一般的な変換がサポートされているからと言うだけで、それを使用するのは常によい考えであるわけではありません。参照を反転すると、ラスタライザはたぶんそれに対して困難を抱えることになるでしょう (輪郭線の向きが正しい方向の逆になるでしょう)。参照を回転すると、そこに含まれる命令はおそらくは正しく働かなくなるでしょう。
  <DT>
    Type1
  <DD>
<!--Type1 (and Type2) fonts have the basic limitation that the only transformation
    that may be applied to a reference is translation no scaling, rotating or
    flipping are allowed. Type1 fonts have two different mechanisms for using
    references. The first is the simplest to describe. -->
    Type1 (および Type2) フォントは、参照に適用することのできる変換は平行移動だけであり、拡大/縮小・回転・反転は許されないという根本的な制限があります。Type1 フォントでは、参照を使用するための機構として 2 つの異なる方式が用意されています。最初の方式は説明が最も簡単です。
    <P>
<!--If you have a glyph which contains exactly two references to characters which
    are themselves part of the Adobe Standard Encoding, and one of those references
    has an identity transformation matrix applied to it (that is, it is not moved,
    scaled, rotated, flipped, etc.) and the width of the composite glyph is the
    same as the width of this referred glyph and the other is only translated
    (possibly by 0, but not scaled, rotated, flipped, etc.) THEN FontForge can
    generate two references (this is done with the 'seac' instruction). CID-keyed
    fonts do not support this.<BR> -->
    あるグリフに、Adobe 標準エンコーディングに属する文字への参照 2 個だけが含まれでいて、そのうちのどちらかの参照に適用されている変換行列が単位行列であり (すなわち、移動・拡大/縮小・反転などが一切行われていない)、もう片方は平行移動しか行われていない (移動量が 0 でも構いませんが、拡大/縮小・回転・反転などは不可) という条件が満たされているときに<STRONG>限って</STRONG>、FontForge はこれら 2 つを参照として書き出すことができます (それには&lsquo;seac&rsquo;命令を使います)。CID キー指定フォントはこれをサポートしていません。<BR>
<!--The implications of this are that this form of referencing is useless for
    non-latin scripts (except for glyphs shared by latin and another script,
    Greek and Cyrillic often share the glyph used for latin A).<BR>
    FontForge makes a slight extension, in that if you have a glyph which contains
    one single untranslated reference, then FontForge will add a dummy reference
    to the space glyph to make it fit the two reference requirement. -->
    これから解ることは、この方式の参照はラテン文字以外の用字系には役に立たないということです (ラテン文字とその他の用字系で共有されているグリフは除きます。ラテン文字の A と同じ形のグリフをギリシャ文字やキリル文字で使うのはよくあることです)。<BR>
    FontForge はちょっとした拡張を行っており、平行移動を含まない 1 個の参照のみからなるグリフがある場合、FontForge は空白へのダミー参照を追加して、参照の個数がちゃんと 2 個になるようにします。
    <P>
<!--The second format is more general in some ways but has more arcane restrictions
    imposed on it. PostScript fonts have the concept of "subroutines" which can
    be used to define the contours of several glyphs. FontForge's algorithm is
    quite complex and can depend on what other glyphs are refered to. But basically
    if a glyph contains no hint substitutions, nor flex hints it can be put into
    a subroutine. If it does contain these it can be put into a subroutine if
    it has not been translated. Even if one reference cannot be put into a
    subroutine, another may be (ie. TrueType references are an all or nothing
    affair, that is not true of PostScript subroutines). If a reference cannot
    be put in a subroutine, FF may still be able to put some of its components
    (assuming it is a glyph with references) in a subroutine. -->
    第 2 のフォーマットはある意味ではより汎用的ではありますが、上記の方式に比べて一層複雑な制約条件を満たしている必要があります。PostScript フォントには、いくつかのグリフで共用される輪郭を定義するのに使用可能な“サブルーチン”の概念があります。FontForge のアルゴリズムは極めて複雑で、どのようにしてグリフ参照を行ったかによっても結果が変わります。しかし基本的には、あるグリフがヒント置換も flex ヒントも含んでいないならば、そのデータをサブルーチンに置くことができます。それらが含まれている場合は、平行移動を行わないときに限りサブルーチン化可能です。複数の参照を含むグリフでは、ある参照をサブルーチン化できない場合でも、その他の参照はサブルーチン化できる可能性があります (TrueType では常に全て参照にするかしないかのどちらかに限られるが、PostScript ではそうとは限らないということです)。参照をサブルーチン化できない場合でも、(参照先のグリフが参照を含む場合であれば) 一部の構成要素をサブルーチン化できることもあります。
    <P>
<!--FontForge will recognize 'seac' as defining references, but it does not recognize
    subroutine calls. Use <A HREF="editmenu.html#ReplaceRef">Edit-&gt;Replace
    With Reference</A> after loading a Type1 font. -->
    FontForge は&lsquo;seac&rsquo;を参照の定義と解釈しますが、サブルーチン呼出しは参照とは見なしません。いったん Type1 フォントを読み込んでから <A HREF="editmenu.html#ReplaceRef"><CODE>編集(<U>E</U>)</CODE>→<CODE>参照に置換</CODE></A> を使用してください。
  <DT>
<!--Type2 ("OpenType") -->
    Type2 (“OpenType”)
  <DD>
<!--does not have anything equivalent to the 'seac' instruction (well, it sort
    of does, but the instruction is depreciated and FontForge will not generate
    it) but does support subroutines. -->
    Type1 と同様に、参照は平行移動のみが可能 (拡大/縮小、回転などは不可) です。Type2 は&lsquo;seac&rsquo;命令と等価なメカニズムは全く存在しません (まあ、無いことはないのですがその命令は廃止されているので FontForge はそれを出力しないことにしています) が、サブルーチンはサポートしています。
    <P>
<!--Here a referenced glyph can be put into a subroutine if it contains no hint
    substitutions, or if it is not translated and none of the other components
    of the final composite contain any hints at all. Again this is not an all
    or nothing affair. -->
    Type2 では、参照されたグリフ記述をサブルーチンに置くことができるのは、ヒント置換が全く含まれていない場合か、ヒント置換を含む参照が元と同じ位置に置かれ、最後以外の構成要素にはヒントが全く含まれていない場合に限られます。Type1 と同様、部分的に参照を使用することができます。
    <P>
<!--FontForge will not recognize any references when loading a Type2 (otf, cff,
    cef, gai) font. Use <A HREF="editmenu.html#ReplaceRef">Edit-&gt;Replace With
    Reference</A> after loading the font. -->
    FontForge は Type2 (OTF, CFF, CEF, GAI) フォントの読み込み時に参照をいっさい認識しません。フォントを読み込んだ後に <A HREF="editmenu.html#ReplaceRef"><CODE>編集(<U>E</U>)</CODE>→<CODE>参照に置換</CODE></A> を使用してください。
  <DT>
    Type3
  <DD>
<!--There are no restrictions on references.-->
    参照に関する制約は存在しません。
  <DT>
    SVG
  <DD>
<!--Does not seem to have an easy way of handling references.-->
    参照を取り扱う手軽な方法は存在しないようです。
</DL>
<P>
</div>
</BODY></HTML>