Make ps_glyph_to_unicode() take a glyph index instead of a glyph name.
authorben <ben@cda61777-01e9-0310-a592-d414129be87e>
Sat, 6 Jan 2007 17:47:34 +0000 (17:47 +0000)
committerben <ben@cda61777-01e9-0310-a592-d414129be87e>
Sat, 6 Jan 2007 17:47:34 +0000 (17:47 +0000)
git-svn-id: svn://svn.tartarus.org/sgt/halibut@7062 cda61777-01e9-0310-a592-d414129be87e

in_afm.c
paper.h
psdata.c

index d3d5ecb..69cd1e3 100644 (file)
--- a/in_afm.c
+++ b/in_afm.c
@@ -194,7 +194,7 @@ void read_afm_file(input *in) {
                    w->glyph = g;
                    w->width = width;
                    add234(fi->widths, w);
-                   ucs = ps_glyph_to_unicode(glyph_extern(g));
+                   ucs = ps_glyph_to_unicode(g);
                    if (ucs < 0xFFFF)
                        fi->bmp[ucs] = g;
                }
diff --git a/paper.h b/paper.h
index bab9e4f..1a6f9f1 100644 (file)
--- a/paper.h
+++ b/paper.h
@@ -384,7 +384,7 @@ int find_width(font_data *, glyph);
  */
 glyph glyph_intern(char const *);
 char const *glyph_extern(glyph);
-wchar_t ps_glyph_to_unicode(char const *glyph);
+wchar_t ps_glyph_to_unicode(glyph);
 extern const char *const ps_std_glyphs[];
 void init_std_fonts(void);
 const int *ps_std_font_widths(char const *fontname);
index 66354d3..af46099 100644 (file)
--- a/psdata.c
+++ b/psdata.c
@@ -1687,10 +1687,8 @@ static const unsigned short ps_codes_alphabetic[] = {
     0xFF5A, 0x305E, 0x30BE, 0x24B5, 0x0290, 0x01B6, 0x305A, 0x30BA, 
 };
 
-wchar_t ps_glyph_to_unicode(char const *glyphname)
+wchar_t ps_glyph_to_unicode(glyph g)
 {
-    glyph g = glyph_intern(glyphname);
-    
     if (g == NOGLYPH) return 0xFFFF;
     return ps_codes_alphabetic[g];
 }
@@ -4486,7 +4484,7 @@ void init_std_fonts(void) {
            w->glyph = glyph_intern(ps_std_glyphs[j]);
            w->width = ps_std_fonts[i].widths[j];
            add234(fi->widths, w);
-           ucs = ps_glyph_to_unicode(ps_std_glyphs[j]);
+           ucs = ps_glyph_to_unicode(w->glyph);
            assert(ucs != 0xFFFF);
            fi->bmp[ucs] = w->glyph;
        }