[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] glyph_names
From: |
Wolfgang Domröse |
Subject: |
Re: [Devel] glyph_names |
Date: |
Wed, 10 Oct 2001 08:57:02 GMT |
>note that I have no idea how you would implement winANSI_GlyphName correctly
>with only the tables provided within pstables.h
Hi David,
thanks for your answer! Until now I do winANSI_, macRoman_ and macExpert_ by an
own table. So the question is: did you change the sequence of glyph_names. If
you did, I have to create a new winANSI_table.
Here comes my complete listing to give you an idea:
static const unsigned short mac_expert_encoding[256] =
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
32,260,261,336,262,263,264,265,266,267,268,269,44,45,46,130,
270,271,272,273,274,275,276,277,278,279,58,59,0,281,0,283,
0,0,0,0,394,0,0,189,186,194,351,352,353,354,355,356,
0,0,0,0,0,0,297,140,141,298,299,300,0,301,302,346,
304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,
320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,0,
0,284,286,0,0,0,0,379,378,380,382,381,383,385,387,386,
388,389,391,390,392,393,395,397,396,398,400,399,404,403,405,406,
0,362,368,367,370,372,371,338,0,374,366,0,340,0,342,293,
369,0,377,376,407,0,375,0,0,408,0,373,364,339,384,402,
350,365,337,0,0,0,0,0,0,349,0,0,0,0,0,401,
345,303,0,0,0,0,335,0,409,0,181,195,200,358,359,360,
361,363,357,0,288,294,296,0,0,289,295,287,0,0,0,0,
0,290,347,341,344,285,292,291,280,282,343,348,0,0,0,0};
static const unsigned short mac_roman_encoding[256] =
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
32,33,34,35,36,37,38,135,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,
155,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,0,
204,206,208,209,217,220,226,231,234,232,233,236,235,237,238,241,
239,240,242,245,243,244,246,247,250,248,249,251,253,256,254,255,
143,192,128,129,133,147,146,180,196,201,184,156,162,0,169,172,
0,187,0,0,131,183,0,0,0,0,0,170,174,0,175,178,
154,127,182,0,132,0,0,137,151,152,32,205,207,222,173,179,
142,168,136,150,96,39,190,0,258,229,130,134,138,139,140,141,
144,17,148,149,153,203,210,202,211,212,213,214,215,216,218,219,
0,221,224,225,227,176,157,158,159,160,161,163,164,165,166,167};
static const unsigned short win_ansi_encoding[256] =
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
32,33,34,35,36,37,38,135,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,
155,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,147,
450,147,148,132,149,152,143,144,157,153,223,138,173,147,230,147,
147,96,39,136,150,147,142,168,158,184,252,139,179,147,259,229,
32,127,128,129,134,131,191,133,162,201,170,137,182,45,196,159,
192,187,195,200,156,183,146,17,164,181,174,151,189,186,194,154,
205,202,203,207,204,206,169,208,212,209,210,211,216,213,214,215,
185,217,221,218,219,222,220,199,172,227,224,225,226,228,188,180,
234,231,232,236,233,235,175,237,241,238,239,240,245,242,243,244,
198,246,250,247,248,251,249,190,178,256,253,254,255,257,193,258};
=0
char* adobeSTD_GlyphName(unsigned short charcode);
char* appleEXP_GlyphName(unsigned short charcode);
char* appleROM_GlyphName(unsigned short charcode);
char* winANSI_GlyphName(unsigned short charcode);
char* adobeSTD_GlyphName(charcode)
unsigned short charcode;
{
return (char *) standard_glyph_names[t1_standard_encoding[charcode]+31 ];
}
char* appleEXP_GlyphName(charcode)
unsigned short charcode;
{
return (char *) standard_glyph_names[mac_expert_encoding[charcode ]==0 ? (31) :
(mac_expert_encoding[charcode ])];
}
char* appleROM_GlyphName(charcode)
unsigned short charcode;
{
return (char *) standard_glyph_names[mac_roman_encoding[charcode ]==0 ? (31) :
(mac_roman_encoding[charcode ])];
}
char* winANSI_GlyphName(charcode)
unsigned short charcode;
{
return (char *) standard_glyph_names[win_ansi_encoding[charcode]==0 ? (31) :
(win_ansi_encoding[charcode]) ];
}