From: handa Date: Tue, 3 Feb 2004 13:10:24 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: REL-0-9-1~74 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c9c015e1c7a2ef141c83ad2b99f82ef3dd73923;p=m17n%2Flibotf.git *** empty log message *** --- diff --git a/README b/README index e731abf..98b0dda 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -This directory tree holds version 1.0 of the otf library. -*- text -*- +This directory tree holds version 0.9 of the otf library. -*- text -*- Copyright (C) 2003, 2004 National Institute of Advanced Industrial Science and Technology (AIST) @@ -9,7 +9,7 @@ See the end for copying conditions. ##################################################################### # libotf -- A Library for handling OpenType Font (OTF) # # # -# Ver.1.0 (2004.2.1) # +# Ver.0.9 (2004.2.1) # ##################################################################### (1) What is libotf? @@ -57,9 +57,11 @@ o COPYING -- GPL document o INSTALL -- the generic installation instructions o NEWS -- the recent changes to libotf +See the header file otf.h for the API provided by this library. + (4) Bug report -Please send bug reports to bugs . +Please send bug reports to bugs . ----- diff --git a/configure.ac b/configure.ac index c90af0e..ceca494 100644 --- a/configure.ac +++ b/configure.ac @@ -23,8 +23,8 @@ dnl License along with this library, in a file named COPYING; if not, dnl write to the Free Software Foundation, Inc., 59 Temple Place, Suite dnl 330, Boston, MA 02111-1307, USA. -AC_INIT(libotf, 1.0, libotf@m17n.org) -AM_INIT_AUTOMAKE(libotf, 1.0) +AC_INIT(libotf, 0.9, handa@m17n.org) +AM_INIT_AUTOMAKE(libotf, 0.9) AM_CONFIG_HEADER(src/config.h) # Checks for programs. diff --git a/example/otfdump.c b/example/otfdump.c index c589d16..0ff9dec 100644 --- a/example/otfdump.c +++ b/example/otfdump.c @@ -27,6 +27,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place, Suite #include #include #include +#include #include @@ -1387,10 +1388,10 @@ main (int argc, char **argv) { OTF *otf; - if (argc != 2) + if (argc != 2 || !strcmp (argv[1], "-h") || !strcmp (argv[1], "--help")) { - fprintf (stderr, "Usage, dtfdump OTF-FILE"); - exit (1); + fprintf (stderr, "Usage: %s OTF-FILE\n", basename (argv[0])); + exit (argc != 2); } otf = OTF_open (argv[1]); diff --git a/example/otfview.c b/example/otfview.c index cc6d272..8ada490 100644 --- a/example/otfview.c +++ b/example/otfview.c @@ -657,10 +657,13 @@ main (int argc, char **argv) if (! font) font = XLoadQueryFont (display, "fixed"); - if (argc != 2) - FATAL_ERROR ("%s\n", "Usage: otfview [ X-OPTION ... ] OTF-FILE"); + if (argc != 2 || !strcmp (argv[1], "-h") || !strcmp (argv[1], "--help")) + { + fprintf (stderr, "Usage: %s [ X-OPTION ... ] OTF-FILE\n", + basename (argv[0])); + exit (argc != 2); + } filename = argv[1]; - if (strstr (filename, ".ttf") || strstr (filename, ".TTF") || strstr (filename, ".otf") diff --git a/src/otf.h b/src/otf.h index 488998c..15b63df 100644 --- a/src/otf.h +++ b/src/otf.h @@ -24,6 +24,9 @@ write to the Free Software Foundation, Inc., 59 Temple Place, Suite #ifndef _OTF_H_ #define _OTF_H_ +/* Version number of this library. */ +#define LIBOTF_VERSION "0.9" + /*** Table of contents: @@ -1013,8 +1016,8 @@ typedef struct OTF_GSUB *gsub; OTF_GPOS *gpos; /* The following tables are not yet supported. */ - // OTF_BASE *base; - // OTF_JSTF *jstf; + /* OTF_BASE *base; */ + /* OTF_JSTF *jstf; */ OTF_InternalData *internal_data; } OTF; @@ -1309,7 +1312,7 @@ extern int OTF_error; The OTF_perror() function produces a message on the standard error output, describing the last error encountered during a call to the - OTF library function. If $PREFIX is not NULL, is is printed + OTF library function. If $PREFIX is not NULL, it is printed first, followed by a colon and a blank. Then the message and a newline. */ diff --git a/src/otfdrive.c b/src/otfdrive.c index fdb7b36..b28fe3d 100644 --- a/src/otfdrive.c +++ b/src/otfdrive.c @@ -566,7 +566,6 @@ lookup_gsub (OTF_LookupList *lookup_list, unsigned lookup_list_index, int j; int orig_used; - // printf ("GSUB 6-2: c:0x%x g:0x%x\n", g->c, g->glyph_id); class = get_class_def (&context2->InputClassDef, g->glyph_id); set = context2->ChainClassSet + class; for (j = 0; j < set->ChainClassRuleCnt; j++) @@ -649,14 +648,7 @@ lookup_gsub (OTF_LookupList *lookup_list, unsigned lookup_list_index, } } if (gidx == orig_gidx) - { - //printf ("not applied\n"); - gidx++; - } - else - { - // printf ("done\n"); - } + gidx++; return gidx; } @@ -706,16 +698,12 @@ lookup_gpos (OTF_LookupList *lookup_list, unsigned lookup_list_index, OTF_LookupSubTableGPOS *subtable = lookup->SubTable.gpos + i; int coverage_idx; - // printf ("subtype:%d ", subtable->Format); if (subtable->Coverage.offset) { coverage_idx = get_coverage_index (&subtable->Coverage, g->glyph_id); if (coverage_idx < 0) - { - // printf ("not covererd "); - continue; - } + continue; } switch (lookup->LookupType) @@ -769,7 +757,6 @@ lookup_gpos (OTF_LookupList *lookup_list, unsigned lookup_list_index, OTF_GPOS_Pair2 *pair2 = &subtable->u.pair2; unsigned class1, class2; - // printf ("GPOS 2-2: c:0x%x g:0x%x\n", g->c, g->glyph_id); gidx++; class1 = get_class_def (&pair2->ClassDef1, g->glyph_id); class2 = get_class_def (&pair2->ClassDef2, g[1].glyph_id); @@ -814,7 +801,6 @@ lookup_gpos (OTF_LookupList *lookup_list, unsigned lookup_list_index, if (coverage_idx_base < 0) continue; - // printf ("GPOS 4-1: c:0x%x g:0x%x\n", g->c, g->glyph_id); mark_record = mark_base1->MarkArray.MarkRecord + coverage_idx; base_record = mark_base1->BaseArray.AnchorRecord + coverage_idx_base; @@ -852,7 +838,6 @@ lookup_gpos (OTF_LookupList *lookup_list, unsigned lookup_list_index, if (coverage_idx_base < 0) continue; - // printf ("GPOS 6-1: c:0x%x g:0x%x\n", g->c, g->glyph_id); mark1_record = mark_mark1->Mark1Array.MarkRecord + coverage_idx; mark2_record = mark_mark1->Mark2Array.AnchorRecord + coverage_idx_base; @@ -879,7 +864,6 @@ lookup_gpos (OTF_LookupList *lookup_list, unsigned lookup_list_index, int j; int orig_used; - // printf ("GPOS 8-2: c:0x%x g:0x%x\n", g->c, g->glyph_id); class = get_class_def (&context2->InputClassDef, g->glyph_id); set = context2->ChainClassSet + class; for (j = 0; j < set->ChainClassRuleCnt; j++) @@ -939,14 +923,7 @@ lookup_gpos (OTF_LookupList *lookup_list, unsigned lookup_list_index, } } if (gidx == orig_gidx) - { - // printf ("not applied\n"); - gidx++; - } - else - { - // printf ("done\n"); - } + gidx++; return gidx; }