Debian Codegraph @

doc/sphinx/tutorial/scriptnotes.rst

raw
1 Special thoughts for special scripts
2 ====================================
3
4
5 Special thoughts for special scripts
6 ------------------------------------
7
8 `Microsoft <http://www.microsoft.com/typography/specs/default.htm>`__ provides
9 some information on what (opentype) features a word processor should support by
10 default for certain scripts.
11
12 .. warning::
13
14 Just because a feature is documented and looks useful does not mean Uniscribe
15 will use it for your script. Many Latin script fonts would like to use
16 'init', 'medi', 'calt', etc. but none of these features is turned on by
17 Uniscribe for Latin.
18
19 .. warning::
20
21 Just because Uniscribe supports a feature that does not mean any given
22 application will. Uniscribe (as of 2005) supports 'liga' for latin, but
23 neither Word nor Office does.
24
25 .. warning::
26
27 Uniscribe (MS unicode text layout routines) may ignore either the GPOS or the
28 GSUB table depending on the script, and may even refuse to use the font at
29 all if it doesn't have the right stuff in GPOS/GSUB. A Hebrew font must have
30 both a GPOS and a GSUB. If it doesn't the font is not used. A latin font need
31 not have either, but if it doesn't have GSUB then GPOS won't be used. So now
32 if one table is present and the other isn't, FontForge will generate a dummy
33 version of the other.
34
35
36 Common
37 ^^^^^^
38
39 Many characters are used in more than one script. The digits, marks of
40 punctuation, etc. are said in Unicode to belong to the script "Common". OpenType
41 does not recognize this script. The closest thing it has is the script 'DFLT'.
42 My understanding is that characters in the common script will have the script of
43 adjacent text assigned to them by OpenType.
44
45 Thus if a font supports latin, greek or cyrillic then digits and punctuation
46 might find themselves in any of those three scripts and all features which apply
47 to any such character should be present in all scripts. For example if the digit
48 9 kerns with digit 1, then that kerning data should be present in cyrillic and
49 greek as well as latin.
50
51 However it is possible (and I gather common in Japanese) to use the digits from
52 one font surrounded by Kanji characters from another font. This means the digits
53 may be in a font which does not support Kanji. However OpenType will assign them
54 the Kanji script. Thus no lookups will be applied. Adobe suggests that for most
55 features in scripts should also appear in the fallback script 'DFLT'. I'm not
56 sure that anyone else follows this convention.
57
58
59 Latin
60 ^^^^^
61
62 Uniscribe supports the
63 `following features <http://www.microsoft.com/typography/OpenType%20Dev/standard/shaping.mspx>`__
64
65 There are not many special complications in latin. Latin fonts can generally fit
66 in a single byte encoding with no (or few) font tables. There are a plethora of
67 accented glyphs which could be built -- or you could use mark to base
68 positioning. Kerning should be generated for some glyph combinations. A few
69 ligatures need to be generated (the "f" ligatures: ff, fi, fl, ffi, ffl and
70 perhaps st -- however for some languages (Turkish) the "fi" ligature should not
71 be built).
72
73 You may want to add a set of smallcaps. Adobe has reserved a block in the
74 private use area for latin small-caps -- this is now depreciated.
75
76 Some languages have specific requirements of their own
77
78 * `For Polish <http://studweb.euv-frankfurt-o.de/twardoch/f/en/typo/ogonek/kreska.html>`__
79
80
81 Greek
82 ^^^^^
83
84 Uniscribe supports the
85 `following features <http://www.microsoft.com/typography/OpenType%20Dev/standard/shaping.mspx>`__
86
87 Greek also does not have many complications. Modern Greek fonts generally fit in
88 a single byte encoding. For modern greek are a few accented glyphs that need to
89 be built, while for polytonic greek there are many -- mark to base & mark to
90 mark are options. Kerning should be generated. I am not aware of any standard
91 ligatures for modern greek (ancient greek had ligatures and variants on some of
92 the glyphs though).
93
94 Small caps are again an option, and I have reserved a block in the private use
95 area for them -- again this is depreciated.
96
97
98 Cyrillic
99 ^^^^^^^^
100
101 Uniscribe supports the
102 `following features <http://www.microsoft.com/typography/OpenType%20Dev/standard/shaping.mspx>`__
103
104 Cyrillic fonts also fit in a single byte encoding. There are a few accented
105 glyphs. Kerning should be generated. I am not aware of any standard ligatures.
106
107 Some languages need variant glyphs (specified with a 'loca' feature)
108
109 * `Serbian/Macedonian <http://jankojs.tripod.com/SerbianCyr.htm>`__
110
111
112 Arabic
113 ^^^^^^
114
115 Uniscribe supports the
116 `following features <http://www.microsoft.com/typography/OpenType%20Dev/arabic/shaping.mspx>`__
117
118 Arabic needs a complete set of initial, medial, final and isolated forms --
119 Unicode has reserved space for these. Arabic also needs a vast set of ligatures
120 -- Unicode has reserved space for many, but I'd guess that extra ligatures will
121 be needed sometimes. Arabic also needs a set of mark (mark to base, mark to
122 ligature) attachments to position vowels above letters. Arabic may need a glyph
123 decomposition table.
124
125 I'm told that in good Arabic typography there need to be many more than 4 forms
126 per glyph. I'm not sure how this should be supported.
127
128 Right to left.
129
130
131 Hebrew
132 ^^^^^^
133
134 Uniscribe supports the
135 `following features <http://www.microsoft.com/typography/OpenType%20Dev/hebrew/shaping.mspx>`__
136
137 Hebrew has a few final forms but no special tables are needed for these. Hebrew
138 may need kerning. Hebrew should have a set of mark (mark to base) tables to
139 position vowels over letters. Hebrew may need a glyph decomposition table. I am
140 not aware of any needed ligatures.
141
142 Right to left
143
144
145 Indic scripts
146 ^^^^^^^^^^^^^
147
148 Uniscribe supports the
149 `following features <http://www.microsoft.com/typography/otfntdev/indicot/shaping.aspx>`__
150
151 Indic scripts need a set of ligatures.
152
153 (they probably need a lot more but I'm not aware of what)
154
155
156 Korean Hangul
157 ^^^^^^^^^^^^^
158
159 Uniscribe supports the
160 `following features <http://www.microsoft.com/typography/OpenType%20Dev/hangul/shaping.mspx>`__
161
162 The Hangul script consists of a set of syllables built out of a phonetic
163 alphabet. Generally fonts consist of a set of precomposed syllables.
164
165 Complications are introduced by the massive combinatorial explosion of all these
166 syllables. These are eased in postscript by CID-keyed fonts.
167
168 Vertical writing and left to right writing are used, and some glyphs have a
169 different orientation when drawn vertically (parentheses for example).
170
171
172 Japanese and Chinese (and Korean Hanja)
173 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
174
175 MicroSoft does not describe these scripts (that I can find).
176
177 Again a massive collection of glyphs is needed, and postscript uses CID keyed
178 fonts to deal with this.
179
180 Vertical writing and left to right writing are used, and some glyphs have a
181 different orientation when drawn vertically (parentheses for example).