⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ttfenc.c

📁 字体缩放显示
💻 C
📖 第 1 页 / 共 2 页
字号:
/* *   ttfenc.c * *   This file is part of the ttf2pk package. * *   Copyright 1997-1999, 2000 by *     Frederic Loyer <loyer@ensta.fr> *     Werner Lemberg <wl@gnu.org> */#include <stdio.h>#include <stdlib.h>#include <string.h>#include "newobj.h"#include "ttf2tfm.h"#include "ttfenc.h"#include "errormsg.h"EncodingScheme current_encoding_scheme;struct encoding_table{  long code;  char *adobename;};struct encoding_table unicode_table[] ={  {-1,     ".notdef"},  {0x0020, "space"},  {0x0021, "exclam"},  {0x0022, "quotedbl"},  {0x0023, "numbersign"},  {0x0024, "dollar"},  {0x0025, "percent"},  {0x0026, "ampersand"},  {0x0027, "quotesingle"},  {0x0028, "parenleft"},  {0x0029, "parenright"},  {0x002a, "asterisk"},  {0x002b, "plus"},  {0x002c, "comma"},  {0x002d, "hyphen"},           /* cf "minus" */  {0x002e, "period"},  {0x002f, "slash"},  {0x0030, "zero"},  {0x0031, "one"},  {0x0032, "two"},  {0x0033, "three"},  {0x0034, "four"},  {0x0035, "five"},  {0x0036, "six"},  {0x0037, "seven"},  {0x0038, "eight"},  {0x0039, "nine"},  {0x003a, "colon"},  {0x003b, "semicolon"},  {0x003c, "less"},  {0x003d, "equal"},  {0x003e, "greater"},  {0x003f, "question"},  {0x0040, "at"},  {0x0041, "A"},  {0x0042, "B"},  {0x0043, "C"},  {0x0044, "D"},  {0x0045, "E"},  {0x0046, "F"},  {0x0047, "G"},  {0x0048, "H"},  {0x0049, "I"},  {0x004a, "J"},  {0x004b, "K"},  {0x004c, "L"},  {0x004d, "M"},  {0x004e, "N"},  {0x004f, "O"},  {0x0050, "P"},  {0x0051, "Q"},  {0x0052, "R"},  {0x0053, "S"},  {0x0054, "T"},  {0x0055, "U"},  {0x0056, "V"},  {0x0057, "W"},  {0x0058, "X"},  {0x0059, "Y"},  {0x005a, "Z"},  {0x005b, "bracketleft"},  {0x005c, "backslash"},  {0x005d, "bracketright"},  {0x005e, "asciicircum"},  {0x005f, "underscore"},  {0x0060, "grave"},  {0x0061, "a"},  {0x0062, "b"},  {0x0063, "c"},  {0x0064, "d"},  {0x0065, "e"},  {0x0066, "f"},  {0x0067, "g"},  {0x0068, "h"},  {0x0069, "i"},  {0x006a, "j"},  {0x006b, "k"},  {0x006c, "l"},  {0x006d, "m"},  {0x006e, "n"},  {0x006f, "o"},  {0x0070, "p"},  {0x0071, "q"},  {0x0072, "r"},  {0x0073, "s"},  {0x0074, "t"},  {0x0075, "u"},  {0x0076, "v"},  {0x0077, "w"},  {0x0078, "x"},  {0x0079, "y"},  {0x007a, "z"},  {0x007b, "braceleft"},  {0x007c, "bar"},  {0x007d, "braceright"},  {0x007e, "asciitilde"},  {0x00a0, "nbspace"},          /* cf "space" */  {0x00a1, "exclamdown"},  {0x00a2, "cent"},  {0x00a3, "sterling"},  {0x00a4, "currency"},  {0x00a5, "yen"},  {0x00a6, "brokenbar"},  {0x00a7, "section"},  {0x00a8, "dieresis"},  {0x00a9, "copyright"},        /* "copyrightserif" "copyrightsans" */  {0x00aa, "ordfeminine"},  {0x00ab, "guillemotleft"},  {0x00ac, "logicalnot"},  {0x00ad, "sfthyphen"},        /* cf "hyphen" */  {0x00ae, "registered"},       /* "registeredserif" "registeredsans" */  {0x00af, "overscore"},  {0x00b0, "degree"},  {0x00b1, "plusminus"},  {0x00b2, "twosuperior"},  {0x00b3, "threesuperior"},  {0x00b4, "acute"},  {0x00b5, "mu1"},              /* "micro" */  {0x00b6, "paragraph"},  {0x00b7, "middot"},           /* cf "periodcentered" */  {0x00b8, "cedilla"},  {0x00b9, "onesuperior"},  {0x00ba, "ordmasculine"},  {0x00bb, "guillemotright"},  {0x00bc, "onequarter"},  {0x00bd, "onehalf"},  {0x00be, "threequarters"},  {0x00bf, "questiondown"},  {0x00c0, "Agrave"},  {0x00c1, "Aacute"},  {0x00c2, "Acircumflex"},  {0x00c3, "Atilde"},  {0x00c4, "Adieresis"},  {0x00c5, "Aring"},  {0x00c6, "AE"},  {0x00c7, "Ccedilla"},  {0x00c8, "Egrave"},  {0x00c9, "Eacute"},  {0x00ca, "Ecircumflex"},  {0x00cb, "Edieresis"},  {0x00cc, "Igrave"},  {0x00cd, "Iacute"},  {0x00ce, "Icircumflex"},  {0x00cf, "Idieresis"},  {0x00d0, "Eth"},  {0x00d1, "Ntilde"},  {0x00d2, "Ograve"},  {0x00d3, "Oacute"},  {0x00d4, "Ocircumflex"},  {0x00d5, "Otilde"},  {0x00d6, "Odieresis"},  {0x00d7, "multiply"},  {0x00d8, "Oslash"},  {0x00d9, "Ugrave"},  {0x00da, "Uacute"},  {0x00db, "Ucircumflex"},  {0x00dc, "Udieresis"},  {0x00dd, "Yacute"},  {0x00de, "Thorn"},  {0x00df, "germandbls"},  {0x00e0, "agrave"},  {0x00e1, "aacute"},  {0x00e2, "acircumflex"},  {0x00e3, "atilde"},  {0x00e4, "adieresis"},  {0x00e5, "aring"},  {0x00e6, "ae"},  {0x00e7, "ccedilla"},  {0x00e8, "egrave"},  {0x00e9, "eacute"},  {0x00ea, "ecircumflex"},  {0x00eb, "edieresis"},  {0x00ec, "igrave"},  {0x00ed, "iacute"},  {0x00ee, "icircumflex"},  {0x00ef, "idieresis"},  {0x00f0, "eth"},  {0x00f1, "ntilde"},  {0x00f2, "ograve"},  {0x00f3, "oacute"},  {0x00f4, "ocircumflex"},  {0x00f5, "otilde"},  {0x00f6, "odieresis"},  {0x00f7, "divide"},  {0x00f8, "oslash"},  {0x00f9, "ugrave"},  {0x00fa, "uacute"},  {0x00fb, "ucircumflex"},  {0x00fc, "udieresis"},  {0x00fd, "yacute"},  {0x00fe, "thorn"},  {0x00ff, "ydieresis"},  {0x0100, "Amacron"},  {0x0101, "amacron"},  {0x0102, "Abreve"},  {0x0103, "abreve"},  {0x0104, "Aogonek"},  {0x0105, "aogonek"},  {0x0106, "Cacute"},  {0x0107, "cacute"},  {0x0108, "Ccircumflex"},  {0x0109, "ccircumflex"},  {0x010a, "Cdot"},  {0x010b, "cdot"},  {0x010c, "Ccaron"},  {0x010d, "ccaron"},  {0x010e, "Dcaron"},  {0x010f, "dcaron"},  {0x0110, "Dslash"},  {0x0111, "dmacron"},  {0x0112, "Emacron"},  {0x0113, "emacron"},  {0x0114, "Ebreve"},  {0x0115, "ebreve"},  {0x0116, "Edot"},  {0x0117, "edot"},  {0x0118, "Eogonek"},  {0x0119, "eogonek"},  {0x011a, "Ecaron"},  {0x011b, "ecaron"},  {0x011c, "Gcircumflex"},  {0x011d, "gcircumflex"},  {0x011e, "Gbreve"},  {0x011f, "gbreve"},  {0x0120, "Gdot"},  {0x0121, "gdot"},  {0x0122, "Gcedilla"},  {0x0123, "gcedilla"},  {0x0124, "Hcircumflex"},  {0x0125, "hcircumflex"},  {0x0126, "Hbar"},  {0x0127, "hbar"},  {0x0128, "Itilde"},  {0x0129, "itilde"},  {0x012a, "Imacron"},  {0x012b, "imacron"},  {0x012c, "Ibreve"},  {0x012d, "ibreve"},  {0x012e, "Iogonek"},  {0x012f, "iogonek"},  {0x0130, "Idot"},  {0x0131, "dotlessi"},  {0x0132, "IJ"},  {0x0133, "ij"},  {0x0134, "Jcircumflex"},  {0x0135, "jcircumflex"},  {0x0136, "Kcedilla"},  {0x0137, "kcedilla"},  {0x0138, "kgreenlandic"},  {0x0139, "Lacute"},  {0x013a, "lacute"},  {0x013b, "Lcedilla"},  {0x013c, "lcedilla"},  {0x013d, "Lcaron"},  {0x013e, "lcaron"},  {0x013f, "Ldot"},  {0x0140, "ldot"},  {0x0141, "Lslash"},  {0x0142, "lslash"},  {0x0143, "Nacute"},  {0x0144, "nacute"},  {0x0145, "Ncedilla"},  {0x0146, "ncedilla"},  {0x0147, "Ncaron"},  {0x0148, "ncaron"},  {0x0149, "napostrophe"},  {0x014a, "Eng"},  {0x014b, "eng"},  {0x014c, "Omacron"},  {0x014d, "omacron"},  {0x014e, "Obreve"},  {0x014f, "obreve"},  {0x0150, "Odblacute"},  {0x0151, "odblacute"},  {0x0152, "OE"},  {0x0153, "oe"},  {0x0154, "Racute"},  {0x0155, "racute"},  {0x0156, "Rcedilla"},  {0x0157, "rcedilla"},  {0x0158, "Rcaron"},  {0x0159, "rcaron"},  {0x015a, "Sacute"},  {0x015b, "sacute"},  {0x015c, "Scircumflex"},  {0x015d, "scircumflex"},  {0x015e, "Scedilla"},  {0x015f, "scedilla"},  {0x0160, "Scaron"},  {0x0161, "scaron"},  {0x0162, "Tcedilla"},  {0x0163, "tcedilla"},  {0x0164, "Tcaron"},  {0x0165, "tcaron"},  {0x0166, "Tbar"},  {0x0167, "tbar"},  {0x0168, "Utilde"},  {0x0169, "utilde"},  {0x016a, "Umacron"},  {0x016b, "umacron"},  {0x016c, "Ubreve"},  {0x016d, "ubreve"},  {0x016e, "Uring"},  {0x016f, "uring"},  {0x0170, "Udblacute"},  {0x0171, "udblacute"},  {0x0172, "Uogonek"},  {0x0173, "uogonek"},  {0x0174, "Wcircumflex"},  {0x0175, "wcircumflex"},  {0x0176, "Ycircumflex"},  {0x0177, "ycircumflex"},  {0x0178, "Ydieresis"},  {0x0179, "Zacute"},  {0x017a, "zacute"},  {0x017b, "Zdot"},  {0x017c, "zdot"},  {0x017d, "Zcaron"},  {0x017e, "zcaron"},  {0x017f, "longs"},  {0x0192, "florin"},  {0x01fa, "Aringacute"},  {0x01fb, "aringacute"},  {0x01fc, "AEacute"},  {0x01fd, "aeacute"},  {0x01fe, "Oslashacute"},  {0x01ff, "oslashacute"},  {0x02c6, "circumflex"},  {0x02c7, "caron"},  {0x02c9, "macron"},           /* cf "overscore" */  {0x02d8, "breve"},  {0x02d9, "dotaccent"},  {0x02da, "ring"},  {0x02db, "ogonek"},  {0x02dc, "tilde"},  {0x02dd, "hungarumlaut"},  {0x037e, "semicolon"},  {0x0384, "tonos"},  {0x0385, "dieresistonos"},  {0x0386, "Alphatonos"},  {0x0387, "anoteleia"},  {0x0388, "Epsilontonos"},  {0x0389, "Etatonos"},  {0x038a, "Iotatonos"},  {0x038c, "Omicrontonos"},  {0x038e, "Upsilontonos"},  {0x038f, "Omegatonos"},  {0x0390, "iotadieresistonos"},  {0x0391, "Alpha"},  {0x0392, "Beta"},  {0x0393, "Gamma"},  {0x0394, "Delta"},  {0x0395, "Epsilon"},  {0x0396, "Zeta"},  {0x0397, "Eta"},  {0x0398, "Theta"},  {0x0399, "Iota"},  {0x039a, "Kappa"},  {0x039b, "Lambda"},  {0x039c, "Mu"},  {0x039d, "Nu"},  {0x039e, "Xi"},  {0x039f, "Omicron"},  {0x03a0, "Pi"},  {0x03a1, "Rho"},  {0x03a2, "Sigma"},  {0x03a3, "Tau"},  {0x03a4, "Upsilon"},  {0x03a5, "Phi"},  {0x03a6, "Chi"},  {0x03a7, "Psi"},  {0x03a8, "Omega"},            /* cf "Ohm" */  {0x03aa, "Iotadieresis"},  {0x03ab, "Upsilondieresis"},  {0x03ac, "alphatonos"},  {0x03ad, "epsilontonos"},  {0x03ae, "etatonos"},  {0x03af, "iotatonos"},  {0x03b0, "upsilondieresistonos"},  {0x03b1, "alpha"},  {0x03b2, "beta"},  {0x03b3, "gamma"},  {0x03b4, "delta"},  {0x03b5, "epsilon"},  {0x03b6, "zeta"},  {0x03b7, "eta"},  {0x03b8, "theta"},  {0x03b9, "iota"},  {0x03ba, "kappa"},  {0x03bb, "lambda"},  {0x03bc, "mu"},  {0x03bd, "nu"},  {0x03be, "xi"},  {0x03bf, "omicron"},  {0x03c0, "pi"},  {0x03c1, "rho"},  {0x03c2, "sigma1"},  {0x03c3, "sigma"},  {0x03c4, "tau"},  {0x03c5, "upsilon"},  {0x03c6, "phi"},  {0x03c7, "chi"},  {0x03c8, "psi"},  {0x03c9, "omega"},  {0x03ca, "iotadieresis"},  {0x03cb, "upsilondieresis"},  {0x03cc, "omicrontonos"},  {0x03cd, "upsilontonos"},  {0x03ce, "omegatonos"},  {0x0401, "afii10023"},  {0x0402, "afii10051"},  {0x0403, "afii10052"},  {0x0404, "afii10053"},  {0x0405, "afii10054"},  {0x0406, "afii10055"},  {0x0407, "afii10056"},  {0x0408, "afii10057"},  {0x0409, "afii10058"},  {0x040a, "afii10059"},  {0x040b, "afii10060"},  {0x040c, "afii10061"},  {0x040e, "afii10062"},  {0x040f, "afii10145"},  {0x0410, "afii10017"},  {0x0411, "afii10018"},  {0x0412, "afii10019"},  {0x0413, "afii10020"},  {0x0414, "afii10021"},  {0x0415, "afii10022"},  {0x0416, "afii10024"},  {0x0417, "afii10025"},  {0x0418, "afii10026"},  {0x0419, "afii10027"},  {0x041a, "afii10028"},  {0x041b, "afii10029"},  {0x041c, "afii10030"},  {0x041d, "afii10031"},  {0x041e, "afii10032"},  {0x041f, "afii10033"},  {0x0420, "afii10034"},  {0x0421, "afii10035"},  {0x0422, "afii10036"},  {0x0423, "afii10037"},  {0x0424, "afii10038"},  {0x0425, "afii10039"},  {0x0426, "afii10040"},  {0x0427, "afii10041"},  {0x0428, "afii10042"},  {0x0429, "afii10043"},  {0x042a, "afii10044"},  {0x042b, "afii10045"},  {0x042c, "afii10046"},  {0x042d, "afii10047"},  {0x042e, "afii10048"},  {0x042f, "afii10049"},  {0x0430, "afii10065"},  {0x0431, "afii10066"},  {0x0432, "afii10067"},  {0x0433, "afii10068"},  {0x0434, "afii10069"},  {0x0435, "afii10070"},  {0x0436, "afii10072"},  {0x0437, "afii10073"},  {0x0438, "afii10074"},  {0x0439, "afii10075"},  {0x043a, "afii10076"},  {0x043b, "afii10077"},  {0x043c, "afii10078"},  {0x043d, "afii10079"},  {0x043e, "afii10080"},  {0x043f, "afii10081"},  {0x0440, "afii10082"},  {0x0441, "afii10083"},  {0x0442, "afii10084"},  {0x0443, "afii10085"},  {0x0444, "afii10086"},  {0x0445, "afii10087"},  {0x0446, "afii10088"},  {0x0447, "afii10089"},  {0x0448, "afii10090"},  {0x0449, "afii10091"},  {0x044a, "afii10092"},  {0x044b, "afii10093"},  {0x044c, "afii10094"},  {0x044d, "afii10095"},  {0x044e, "afii10096"},  {0x044f, "afii10097"},  {0x0451, "afii10071"},  {0x0452, "afii10099"},  {0x0453, "afii10100"},  {0x0454, "afii10101"},  {0x0455, "afii10102"},  {0x0456, "afii10103"},  {0x0457, "afii10104"},  {0x0458, "afii10105"},  {0x0459, "afii10106"},  {0x045a, "afii10107"},  {0x045b, "afii10108"},  {0x045c, "afii10109"},  {0x045e, "afii10110"},  {0x045f, "afii10193"},  {0x0490, "afii10050"},  {0x0491, "afii10098"},  {0x1e80, "Wgrave"},  {0x1e81, "wgrave"},  {0x1e82, "Wacute"},  {0x1e83, "wacute"},  {0x1e84, "Wdieresis"},  {0x1e85, "wdieresis"},  {0x1ef2, "Ygrave"},  {0x1ef3, "ygrave"},  {0x2013, "endash"},  {0x2014, "emdash"},  {0x2015, "afii00208"},        /* horizontal bar */  {0x2017, "underscoredbl"},  {0x2018, "quoteleft"},  {0x2019, "quoteright"},  {0x201a, "quotesinglbase"},  {0x201b, "quotereversed"},  {0x201c, "quotedblleft"},  {0x201d, "quotedblright"},  {0x201e, "quotedblbase"},      {0x2020, "dagger"},  {0x2021, "daggerdbl"},  {0x2022, "bullet"},  {0x2026, "ellipsis"},  {0x2030, "perthousand"},  {0x2032, "minute"},  {0x2033, "second"},  {0x2039, "guilsinglleft"},  {0x203a, "guilsinglright"},  {0x203c, "exclamdbl"},  {0x203e, "radicalex"},  {0x2044, "fraction"},         /* cf U+2215 */  {0x207f, "nsuperior"},  {0x20a3, "franc"},  {0x20a4, "afii08941"},        /* lira sign */  {0x20a7, "peseta"},  {0x2105, "afii61248"},        /* care of */  {0x2113, "afii61289"},        /* script small l */  {0x2116, "afii61352"},        /* numero sign */  {0x2122, "trademark"},  {0x2126, "Ohm"},  {0x212e, "estimated"},  {0x215b, "oneeighth"},  {0x215c, "threeeighths"},  {0x215d, "fiveeighths"},  {0x215e, "seveneighths"},  {0x2190, "arrowleft"},  {0x2191, "arrowup"},  {0x2192, "arrowright"},  {0x2193, "arrowdown"},  {0x2194, "arrowboth"},  {0x2195, "arrowupdn"},  {0x21a8, "arrowupdnbse"},  {0x2202, "partialdiff"},  {0x2206, "increment"},  {0x220f, "product"},  {0x2211, "summation"},

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -