| 1 |
/* |
| 2 |
* texenc.c |
| 3 |
* |
| 4 |
* This file is part of the ttf2pk package. |
| 5 |
* |
| 6 |
* Copyright 1997-1999, 2000 by |
| 7 |
* Frederic Loyer <[email protected]> |
| 8 |
* Werner Lemberg <[email protected]> |
| 9 |
*/ |
| 10 |
|
| 11 |
#ifdef HAVE_CONFIG_H |
| 12 |
#include <config.h> |
| 13 |
#endif |
| 14 |
|
| 15 |
#include <stdlib.h> /* for definition of NULL */ |
| 16 |
|
| 17 |
#include "ttf2tfm.h" |
| 18 |
#include "texenc.h" |
| 19 |
|
| 20 |
|
| 21 |
encoding staticencoding = |
| 22 |
{ |
| 23 |
"TeX text", |
| 24 |
{"Gamma", "Delta", "Theta", "Lambda", |
| 25 |
"Xi", "Pi", "Sigma", "Upsilon", |
| 26 |
"Phi", "Psi", "Omega", "arrowup", |
| 27 |
"arrowdown", "quotesingle", "exclamdown", "questiondown", |
| 28 |
|
| 29 |
"dotlessi", "dotlessj", "grave", "acute", |
| 30 |
"caron", "breve", "macron", "ring", |
| 31 |
"cedilla", "germandbls", "ae", "oe", |
| 32 |
"oslash", "AE", "OE", "Oslash", |
| 33 |
|
| 34 |
"space", "exclam", "quotedbl", "numbersign", |
| 35 |
"dollar", "percent", "ampersand", "quoteright", |
| 36 |
"parenleft", "parenright", "asterisk", "plus", |
| 37 |
"comma", "hyphen", "period", "slash", |
| 38 |
|
| 39 |
"zero", "one", "two", "three", |
| 40 |
"four", "five", "six", "seven", |
| 41 |
"eight", "nine", "colon", "semicolon", |
| 42 |
"less", "equal", "greater", "question", |
| 43 |
|
| 44 |
"at", "A", "B", "C", |
| 45 |
"D", "E", "F", "G", |
| 46 |
"H", "I", "J", "K", |
| 47 |
"L", "M", "N", "O", |
| 48 |
|
| 49 |
"P", "Q", "R", "S", |
| 50 |
"T", "U", "V", "W", |
| 51 |
"X", "Y", "Z", "bracketleft", |
| 52 |
"backslash", "bracketright", "circumflex", "underscore", |
| 53 |
|
| 54 |
"quoteleft", "a", "b", "c", |
| 55 |
"d", "e", "f", "g", |
| 56 |
"h", "i", "j", "k", |
| 57 |
"l", "m", "n", "o", |
| 58 |
|
| 59 |
"p", "q", "r", "s", |
| 60 |
"t", "u", "v", "w", |
| 61 |
"x", "y", "z", "braceleft", |
| 62 |
"bar", "braceright", "tilde", "dieresis", |
| 63 |
|
| 64 |
".notdef", ".notdef", ".notdef", ".notdef", |
| 65 |
".notdef", ".notdef", ".notdef", ".notdef", |
| 66 |
".notdef", ".notdef", ".notdef", ".notdef", |
| 67 |
".notdef", ".notdef", ".notdef", ".notdef", |
| 68 |
|
| 69 |
".notdef", ".notdef", ".notdef", ".notdef", |
| 70 |
".notdef", ".notdef", ".notdef", ".notdef", |
| 71 |
".notdef", ".notdef", ".notdef", ".notdef", |
| 72 |
".notdef", ".notdef", ".notdef", ".notdef", |
| 73 |
|
| 74 |
".notdef", ".notdef", ".notdef", ".notdef", |
| 75 |
".notdef", ".notdef", ".notdef", ".notdef", |
| 76 |
".notdef", ".notdef", ".notdef", ".notdef", |
| 77 |
".notdef", ".notdef", ".notdef", ".notdef", |
| 78 |
|
| 79 |
".notdef", ".notdef", ".notdef", ".notdef", |
| 80 |
".notdef", ".notdef", ".notdef", ".notdef", |
| 81 |
".notdef", ".notdef", ".notdef", ".notdef", |
| 82 |
".notdef", ".notdef", ".notdef", ".notdef", |
| 83 |
|
| 84 |
".notdef", ".notdef", ".notdef", ".notdef", |
| 85 |
".notdef", ".notdef", ".notdef", ".notdef", |
| 86 |
".notdef", ".notdef", ".notdef", ".notdef", |
| 87 |
".notdef", ".notdef", ".notdef", ".notdef", |
| 88 |
|
| 89 |
".notdef", ".notdef", ".notdef", ".notdef", |
| 90 |
".notdef", ".notdef", ".notdef", ".notdef", |
| 91 |
".notdef", ".notdef", ".notdef", ".notdef", |
| 92 |
".notdef", ".notdef", ".notdef", ".notdef", |
| 93 |
|
| 94 |
".notdef", ".notdef", ".notdef", ".notdef", |
| 95 |
".notdef", ".notdef", ".notdef", ".notdef", |
| 96 |
".notdef", ".notdef", ".notdef", ".notdef", |
| 97 |
".notdef", ".notdef", ".notdef", ".notdef", |
| 98 |
|
| 99 |
".notdef", ".notdef", ".notdef", ".notdef", |
| 100 |
".notdef", ".notdef", ".notdef", ".notdef", |
| 101 |
".notdef", ".notdef", ".notdef", ".notdef", |
| 102 |
".notdef", ".notdef", ".notdef", ".notdef", |
| 103 |
} |
| 104 |
}; |
| 105 |
|
| 106 |
|
| 107 |
/* |
| 108 |
* It's easier to put this in static storage and parse it as we go |
| 109 |
* than to build the structures ourselves. |
| 110 |
* |
| 111 |
* The semicolons in the LIGKERN lines must be left isolated. |
| 112 |
*/ |
| 113 |
|
| 114 |
const char *staticligkern[] = |
| 115 |
{ |
| 116 |
"% LIGKERN space l =: lslash ; space L =: Lslash ;", |
| 117 |
"% LIGKERN question quoteleft =: questiondown ;", |
| 118 |
"% LIGKERN exclam quoteleft =: exclamdown ;", |
| 119 |
"% LIGKERN hyphen hyphen =: endash ; endash hyphen =: emdash ;", |
| 120 |
"% LIGKERN quoteleft quoteleft =: quotedblleft ;", |
| 121 |
"% LIGKERN quoteright quoteright =: quotedblright ;", |
| 122 |
"% LIGKERN space {} * ; * {} space ; zero {} * ; * {} zero ;", |
| 123 |
"% LIGKERN one {} * ; * {} one ; two {} * ; * {} two ;", |
| 124 |
"% LIGKERN three {} * ; * {} three ; four {} * ; * {} four ;", |
| 125 |
"% LIGKERN five {} * ; * {} five ; six {} * ; * {} six ;", |
| 126 |
"% LIGKERN seven {} * ; * {} seven ; eight {} * ; * {} eight ;", |
| 127 |
"% LIGKERN nine {} * ; * {} nine ;", |
| 128 |
|
| 129 |
/* |
| 130 |
* Kern accented characters the same way as their base. |
| 131 |
*/ |
| 132 |
|
| 133 |
"% LIGKERN Aacute <> A ; aacute <> a ;", |
| 134 |
"% LIGKERN Acircumflex <> A ; acircumflex <> a ;", |
| 135 |
"% LIGKERN Adieresis <> A ; adieresis <> a ;", |
| 136 |
"% LIGKERN Agrave <> A ; agrave <> a ;", |
| 137 |
"% LIGKERN Aring <> A ; aring <> a ;", |
| 138 |
"% LIGKERN Atilde <> A ; atilde <> a ;", |
| 139 |
"% LIGKERN Ccedilla <> C ; ccedilla <> c ;", |
| 140 |
"% LIGKERN Eacute <> E ; eacute <> e ;", |
| 141 |
"% LIGKERN Ecircumflex <> E ; ecircumflex <> e ;", |
| 142 |
"% LIGKERN Edieresis <> E ; edieresis <> e ;", |
| 143 |
"% LIGKERN Egrave <> E ; egrave <> e ;", |
| 144 |
"% LIGKERN Iacute <> I ; iacute <> i ;", |
| 145 |
"% LIGKERN Icircumflex <> I ; icircumflex <> i ;", |
| 146 |
"% LIGKERN Idieresis <> I ; idieresis <> i ;", |
| 147 |
"% LIGKERN Igrave <> I ; igrave <> i ;", |
| 148 |
"% LIGKERN Ntilde <> N ; ntilde <> n ;", |
| 149 |
"% LIGKERN Oacute <> O ; oacute <> o ;", |
| 150 |
"% LIGKERN Ocircumflex <> O ; ocircumflex <> o ;", |
| 151 |
"% LIGKERN Odieresis <> O ; odieresis <> o ;", |
| 152 |
"% LIGKERN Ograve <> O ; ograve <> o ;", |
| 153 |
"% LIGKERN Oslash <> O ; oslash <> o ;", |
| 154 |
"% LIGKERN Otilde <> O ; otilde <> o ;", |
| 155 |
"% LIGKERN Scaron <> S ; scaron <> s ;", |
| 156 |
"% LIGKERN Uacute <> U ; uacute <> u ;", |
| 157 |
"% LIGKERN Ucircumflex <> U ; ucircumflex <> u ;", |
| 158 |
"% LIGKERN Udieresis <> U ; udieresis <> u ;", |
| 159 |
"% LIGKERN Ugrave <> U ; ugrave <> u ;", |
| 160 |
"% LIGKERN Yacute <> Y ; yacute <> y ;", |
| 161 |
"% LIGKERN Ydieresis <> Y ; ydieresis <> y ;", |
| 162 |
"% LIGKERN Zcaron <> Z ; zcaron <> z ;", |
| 163 |
|
| 164 |
/* lig commands for default ligatures */ |
| 165 |
|
| 166 |
"% LIGKERN f i =: fi ; f l =: fl ; f f =: ff ; ff i =: ffi ;", |
| 167 |
"% LIGKERN ff l =: ffl ;", |
| 168 |
NULL |
| 169 |
}; |
| 170 |
|
| 171 |
/* |
| 172 |
* The above layout corresponds to TeX Typewriter Type and is compatible |
| 173 |
* with TeX Text because the position of ligatures is immaterial. |
| 174 |
*/ |
| 175 |
|
| 176 |
|
| 177 |
/* |
| 178 |
* These are the eight ligature ops, in VPL terms and in METAFONT terms. |
| 179 |
*/ |
| 180 |
|
| 181 |
const char *vplligops[] = |
| 182 |
{ |
| 183 |
"LIG", "/LIG", "/LIG>", "LIG/", "LIG/>", "/LIG/", "/LIG/>", "/LIG/>>", 0 |
| 184 |
}; |
| 185 |
|
| 186 |
const char *encligops[] = |
| 187 |
{ |
| 188 |
"=:", "|=:", "|=:>", "=:|", "=:|>", "|=:|", "|=:|>", "|=:|>>", 0 |
| 189 |
}; |
| 190 |
|
| 191 |
|
| 192 |
/* |
| 193 |
* For TeX we want to compute a character height that works properly |
| 194 |
* with accents. The following list of accents doesn't need to be |
| 195 |
* complete. |
| 196 |
*/ |
| 197 |
|
| 198 |
/* |
| 199 |
* We only do this if the xheight has a reasonable value (>50). |
| 200 |
*/ |
| 201 |
|
| 202 |
const char *accents[] = {"acute", "tilde", "caron", "dieresis", NULL}; |
| 203 |
|
| 204 |
char default_codingscheme[] = "Unspecified"; |
| 205 |
|
| 206 |
|
| 207 |
/* end */ |