Index: ttf2lht/ttf2lht.c =================================================================== --- ttf2lht/ttf2lht.c (revision 18957) +++ ttf2lht/ttf2lht.c (revision 18958) @@ -16,7 +16,7 @@ "Need an outline font" }; -FT_Error dump(FT_ULong chr, stroke_t *str) +FT_Error dump(FT_ULong ttf_chr, FT_ULong out_chr, stroke_t *str) { FT_Error err; FT_Glyph gly; @@ -24,7 +24,7 @@ // load glyph - err = FT_Load_Glyph(face, FT_Get_Char_Index(face, chr), FT_LOAD_NO_BITMAP | FT_LOAD_NO_SCALE); + err = FT_Load_Glyph(face, FT_Get_Char_Index(face, ttf_chr), FT_LOAD_NO_BITMAP | FT_LOAD_NO_SCALE); if (err != 0) return err; @@ -33,7 +33,7 @@ if (face->glyph->format != ft_glyph_format_outline) return -1; - str->start(str, chr); + str->start(str, out_chr); err = FT_Outline_Decompose(&(ol->outline), &str->funcs, str); str->finish(str); @@ -50,6 +50,7 @@ FT_ULong chr; FT_UInt idx; stroke_t *stroker = (stroke_t *)&poly_stroke; + FT_ULong t, tbl[256]; # undef __FTERRORS_H__ # define FT_ERRORDEF( e, v, s ) { e, s }, @@ -73,6 +74,9 @@ return 1; } + for(t = 0; t < 256; t++) + tbl[t] = t; + fprintf(stderr, "Family: %s\n", face->family_name); fprintf(stderr, "Height=%d ascender=%d descender=%d\n", face->height, face->ascender, face->descender); @@ -81,12 +85,14 @@ stroker->dy = -face->descender; stroker->init(stroker); - errnum = dump('a', stroker); - if (errnum != 0) { - if (errnum > 0) - fprintf(stderr, "dump: %s\n", ft_errtab[errnum].errstr); - else - fprintf(stderr, "dump: %s\n", int_errtab[-errnum]); + for(t = 33; t < 126; t++) { + errnum = dump(tbl[t], t, stroker); + if (errnum != 0) { + if (errnum > 0) + fprintf(stderr, "dump: %s\n", ft_errtab[errnum].errstr); + else + fprintf(stderr, "dump: %s\n", int_errtab[-errnum]); + } } stroker->uninit(stroker);