-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)
#####################################################################
# libotf -- A Library for handling OpenType Font (OTF) #
# #
-# Ver.1.0 (2004.2.1) #
+# Ver.0.9 (2004.2.1) #
#####################################################################
(1) What is libotf?
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 <bugs-libotf@m17n.org>.
+Please send bug reports to bugs <handa@m17n.org>.
-----
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.
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
+#include <libgen.h>
#include <otf.h>
{
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]);
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")
#ifndef _OTF_H_
#define _OTF_H_
+/* Version number of this library. */
+#define LIBOTF_VERSION "0.9"
+
/***
Table of contents:
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;
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. */
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++)
}
}
if (gidx == orig_gidx)
- {
- //printf ("not applied\n");
- gidx++;
- }
- else
- {
- // printf ("done\n");
- }
+ gidx++;
return gidx;
}
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)
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);
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;
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;
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++)
}
}
if (gidx == orig_gidx)
- {
- // printf ("not applied\n");
- gidx++;
- }
- else
- {
- // printf ("done\n");
- }
+ gidx++;
return gidx;
}