Skip to content

Commit

Permalink
[makeotf] Drop old MM in OpebType support
Browse files Browse the repository at this point in the history
Fixes #995
  • Loading branch information
khaledhosny committed May 26, 2020
1 parent 0fad220 commit aaf265e
Show file tree
Hide file tree
Showing 26 changed files with 53 additions and 1,563 deletions.
64 changes: 2 additions & 62 deletions c/makeotf/makeotf_lib/api/hotconv.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,23 +84,6 @@ inside the (1,0,0) nameID 5 "Version: string. */
hotConvert(ctx);
hotFree(ctx);
Additional information required by multiple master fonts is added by calls
to hotAddAxisData(), hotAddStyleData(), and hotAddInstance(). Thus, a
multiple master conversion follows the following call sequence.
ctx = hotNew(...);
hotSetConvertFlags(ctx, hotConvFlags) // set flags before any hot unctions are called.
FontName = hotReadFont(ctx, ...);
hotAddName(ctx, ...); // repeat for each name
hotAddMiscData(ctx, ...);
hotAddAxisData(ctx, ...); // repeat for each axis
hotAddStyleData(ctx, ...); // repeat for each style
hotAddInstance(ctx, ...); // repeat for each instance
hotAddKernPair(ctx, ...); // repeat for each pair
hotAddKernValue(ctx, ...); // repeat for each value for each master
hotConvert(ctx);
hotFree(ctx);
CJK fonts must specify horizontal and (optional) vertical Unicode
information, as well as Macintosh encoding information. This is introduced
by calls to hotAddCMap(). Thus, a CJK conversion has the following call
Expand Down Expand Up @@ -425,7 +408,6 @@ struct hotReadFontOverrides_ /* Record for instructions to modify font
enum /* Font types */
{
hotSingleMaster,
hotMultipleMaster,
hotCID
};
#define HOT_TYPE_MASK 0x0f /* Type returned in low 4 bits */
Expand Down Expand Up @@ -510,14 +492,6 @@ struct hotCommonData_ /* Miscellaneous data record */
The nKernPairs field specifies the number of kerning pairs to be
subsequently added with hotAddKernPair().
The nStyles field specifies the number of styles to be subsequently
described with hotAddStyleData() and should be set to 0 for non-multiple
master fonts.
The nInstances field specifies the number of instances to be subsequently
added with hotAddInstance() and should be set to 0 for non-multiple master
fonts.
The encoding field, along with hotMacData.encoding described below,
specifies the encoding that the library should use to decode kern pairs
added by hotAddKernPair(). If both fields are set to NULL, the library will
Expand Down Expand Up @@ -619,12 +593,10 @@ void hotAddKernPair(hotCtx g, long iPair, unsigned first, unsigned second);
hotCommonData. (Unencoded character names are provided by calls to
hotAddUnencChar().) */

void hotAddKernValue(hotCtx g, long iPair, int iMaster, short value);
void hotAddKernValue(hotCtx g, long iPair, short value);

/* hotAddKernValue() adds a kerning value to the kerning pair specified by the
iPair argument for the master specified by the iMaster argument which
must have the value 0 for a single master font or in the range: 0 <= iMaster
< nMasters for multiple master fonts. */
iPair argument. */

void hotAddUnencChar(hotCtx g, int iChar, char *name);

Expand All @@ -635,38 +607,6 @@ void hotAddUnencChar(hotCtx g, int iChar, char *name);
glyphs of a kern pair with a name when one or both glyphs are unencoded.
This name is subsequently converted into a glyph id by the library. */

typedef int32_t hotFixed; /* 16.16 fixed point */
void hotAddAxisData(hotCtx g, int iAxis,
char *type, char *longLabel, char *shortLabel,
hotFixed minRange, hotFixed maxRange);

/* hotAddAxisData() adds information to an OTF font for the axis selected by
the iAxis argument which must be in the range: 0 <= iAxis < nAxes. The type
argument specifies the kind of axis as one of: "Weight", "Width",
"OpticalSize", or "Serif". The "longLabel" and "shortLabel" arguments
specify long and short name tags to be used in construction menu and font
names, e.g. "Weight" and " wt ". */

void hotAddStyleData(hotCtx g, int iStyle, int iAxis, char *type,
hotFixed point0, hotFixed delta0,
hotFixed point1, hotFixed delta1);

/* hotAddStyleData() adds style information to an OTF font for the axis
selected by the iAxis argument. The type argument specifies the style type
as one of: "Bold", "Italic", "Condensed", and "Extended". The point
arguments specify a coordinate on the axis and the "delta" arguments specify
the coordinate change from that point to a new coordinate that represents
the applied style. */

void hotAddInstance(hotCtx g, int iInstance, char *suffix);

/* hotAddInstance() adds instance information to an OTF font for the instance
selected by the "iInstance" argument which must be in the range: 0 <=
iInstance < nInstances. iInstance 0 must specify the default instance; other
instances may be added in any order. The "suffix" argument specifies an name
that may be concatenated with the 5-3-3 FontName to create an instance
FontName, e.g. "367 RG 465 CN 11 OP". */

typedef char *(*hotCMapId)(void *ctx);
typedef char *(*hotCMapRefill)(void *ctx, long *count);
void hotAddCMap(hotCtx g, hotCMapId id, hotCMapRefill refill);
Expand Down
16 changes: 2 additions & 14 deletions c/makeotf/makeotf_lib/build/hotconv/linux/debug/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,12 @@ LIB_SRCS = \
$(SRC_DIR)/BASE.c \
$(SRC_DIR)/CFF_.c \
$(SRC_DIR)/cmap.c \
$(SRC_DIR)/fvar.c \
$(SRC_DIR)/GPOS.c \
$(SRC_DIR)/GSUB.c \
$(SRC_DIR)/head.c \
$(SRC_DIR)/hhea.c \
$(SRC_DIR)/hmtx.c \
$(SRC_DIR)/maxp.c \
$(SRC_DIR)/MMFX.c \
$(SRC_DIR)/MMSD.c \
$(SRC_DIR)/name.c \
$(SRC_DIR)/OS_2.c \
$(SRC_DIR)/post.c \
Expand All @@ -36,8 +33,8 @@ LIB_SRCS = \
$(SRC_DIR)/featerr.c \
$(SRC_DIR)/featgram.c \
$(SRC_DIR)/featscan.c
LIB_OBJS = hot.o BASE.o CFF_.o cmap.o fvar.o GPOS.o GSUB.o head.o hhea.o \
hmtx.o maxp.o MMFX.o MMSD.o name.o OS_2.o post.o vhea.o vmtx.o VORG.o \
LIB_OBJS = hot.o BASE.o CFF_.o cmap.o GPOS.o GSUB.o head.o hhea.o \
hmtx.o maxp.o name.o OS_2.o post.o vhea.o vmtx.o VORG.o \
anon.o map.o otl.o sfnt.o STAT.o featerr.o featgram.o featscan.o
LIB_TARGET = $(LIB_DIR)/hotconv.a

Expand All @@ -63,9 +60,6 @@ CFF_.o:
cmap.o:
$(CC) $(CFLAGS) -c $(SRC_DIR)/cmap.c -o $@

fvar.o:
$(CC) $(CFLAGS) -c $(SRC_DIR)/fvar.c -o $@

GPOS.o:
$(CC) $(CFLAGS) -c $(SRC_DIR)/GPOS.c -o $@

Expand All @@ -84,12 +78,6 @@ hmtx.o:
maxp.o:
$(CC) $(CFLAGS) -c $(SRC_DIR)/maxp.c -o $@

MMFX.o:
$(CC) $(CFLAGS) -c $(SRC_DIR)/MMFX.c -o $@

MMSD.o:
$(CC) $(CFLAGS) -c $(SRC_DIR)/MMSD.c -o $@

name.o:
$(CC) $(CFLAGS) -c $(SRC_DIR)/name.c -o $@

Expand Down
32 changes: 7 additions & 25 deletions c/makeotf/makeotf_lib/build/hotconv/linux/debug/depend.mak
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ hot.o: ../../../../source/hotconv/hot.c \
../../../../public/api/typecomp.h ../../../../public/api/ctutil.h \
../../../../source/hotconv/map.h ../../../../source/hotconv/feat.h \
../../../../source/hotconv/otl.h ../../../../source/hotconv/name.h \
../../../../source/hotconv/GPOS.h ../../../../source/hotconv/OS_2.h \
../../../../source/hotconv/MMFX.h
../../../../source/hotconv/GPOS.h ../../../../source/hotconv/OS_2.h
BASE.o: ../../../../source/hotconv/BASE.c \
../../../../source/hotconv/BASE.h ../../../../source/hotconv/common.h \
../../../../public/api/hotconv.h ../../../../public/api/dynarr.h \
Expand All @@ -23,18 +22,12 @@ cmap.o: ../../../../source/hotconv/cmap.c \
../../../../public/resource/txops.h ../../../../public/api/cffread.h \
../../../../public/api/typecomp.h ../../../../public/api/ctutil.h \
../../../../source/hotconv/map.h ../../../../source/hotconv/feat.h
fvar.o: ../../../../source/hotconv/fvar.c \
../../../../source/hotconv/fvar.h ../../../../source/hotconv/common.h \
../../../../public/api/hotconv.h ../../../../public/api/dynarr.h \
../../../../public/resource/txops.h ../../../../public/api/cffread.h \
../../../../public/api/typecomp.h ../../../../public/api/ctutil.h \
../../../../source/hotconv/name.h
GPOS.o: ../../../../source/hotconv/GPOS.c \
../../../../source/hotconv/GPOS.h ../../../../source/hotconv/common.h \
../../../../public/api/hotconv.h ../../../../public/api/dynarr.h \
../../../../public/resource/txops.h ../../../../public/api/cffread.h \
../../../../public/api/typecomp.h ../../../../public/api/ctutil.h \
../../../../source/hotconv/feat.h ../../../../source/hotconv/MMFX.h \
../../../../source/hotconv/feat.h \
../../../../source/hotconv/OS_2.h ../../../../source/hotconv/otl.h \
../../../../source/hotconv/map.h
GSUB.o: ../../../../source/hotconv/GSUB.c \
Expand Down Expand Up @@ -66,16 +59,6 @@ maxp.o: ../../../../source/hotconv/maxp.c \
../../../../public/api/hotconv.h ../../../../public/api/dynarr.h \
../../../../public/resource/txops.h ../../../../public/api/cffread.h \
../../../../public/api/typecomp.h ../../../../public/api/ctutil.h
MMFX.o: ../../../../source/hotconv/MMFX.c \
../../../../source/hotconv/MMFX.h ../../../../source/hotconv/common.h \
../../../../public/api/hotconv.h ../../../../public/api/dynarr.h \
../../../../public/resource/txops.h ../../../../public/api/cffread.h \
../../../../public/api/typecomp.h ../../../../public/api/ctutil.h
MMSD.o: ../../../../source/hotconv/MMSD.c \
../../../../source/hotconv/MMSD.h ../../../../source/hotconv/common.h \
../../../../public/api/hotconv.h ../../../../public/api/dynarr.h \
../../../../public/resource/txops.h ../../../../public/api/cffread.h \
../../../../public/api/typecomp.h ../../../../public/api/ctutil.h
name.o: ../../../../source/hotconv/name.c \
../../../../source/hotconv/name.h ../../../../source/hotconv/common.h \
../../../../public/api/hotconv.h ../../../../public/api/dynarr.h \
Expand Down Expand Up @@ -116,7 +99,7 @@ map.o: ../../../../source/hotconv/map.c \
../../../../source/hotconv/OS_2.h ../../../../source/hotconv/cmap.h \
../../../../source/hotconv/GPOS.h ../../../../source/hotconv/feat.h \
../../../../source/hotconv/GSUB.h ../../../../source/hotconv/otl.h \
../../../../source/hotconv/MMFX.h ../../../../public/api/pstoken.h \
../../../../public/api/pstoken.h \
../../../../public/resource/agl2uv.h \
../../../../public/resource/zding2uv.h \
../../../../source/hotconv/schinese.h \
Expand Down Expand Up @@ -152,9 +135,8 @@ sfnt.o: ../../../../source/hotconv/sfnt.c \
../../../../public/api/typecomp.h ../../../../public/api/ctutil.h \
../../../../source/hotconv/CFF_.h ../../../../source/hotconv/GPOS.h \
../../../../source/hotconv/feat.h ../../../../source/hotconv/GSUB.h \
../../../../source/hotconv/MMFX.h ../../../../source/hotconv/MMSD.h \
../../../../source/hotconv/OS_2.h ../../../../source/hotconv/anon.h \
../../../../source/hotconv/cmap.h ../../../../source/hotconv/fvar.h \
../../../../source/hotconv/cmap.h \
../../../../source/hotconv/head.h ../../../../source/hotconv/hhea.h \
../../../../source/hotconv/hmtx.h ../../../../source/hotconv/maxp.h \
../../../../source/hotconv/name.h ../../../../source/hotconv/post.h \
Expand All @@ -165,7 +147,7 @@ featerr.o: ../../../../source/hotconv/featerr.c \
../../../../public/api/dynarr.h ../../../../public/resource/txops.h \
../../../../public/api/cffread.h ../../../../public/api/typecomp.h \
../../../../public/api/ctutil.h ../../../../source/hotconv/feat.h \
../../../../source/hotconv/MMFX.h ../../../../source/hotconv/OS_2.h \
../../../../source/hotconv/OS_2.h \
../../../../source/hotconv/hhea.h ../../../../source/hotconv/antlr.h \
../../../../source/hotconv/config.h \
../../../../source/hotconv/feattoks.h \
Expand All @@ -175,7 +157,7 @@ featgram.o: ../../../../source/hotconv/featgram.c \
../../../../public/api/dynarr.h ../../../../public/resource/txops.h \
../../../../public/api/cffread.h ../../../../public/api/typecomp.h \
../../../../public/api/ctutil.h ../../../../source/hotconv/feat.h \
../../../../source/hotconv/MMFX.h ../../../../source/hotconv/OS_2.h \
../../../../source/hotconv/OS_2.h \
../../../../source/hotconv/hhea.h ../../../../source/hotconv/antlr.h \
../../../../source/hotconv/config.h \
../../../../source/hotconv/feattoks.h \
Expand All @@ -189,7 +171,7 @@ featscan.o: ../../../../source/hotconv/featscan.c \
../../../../public/api/dynarr.h ../../../../public/resource/txops.h \
../../../../public/api/cffread.h ../../../../public/api/typecomp.h \
../../../../public/api/ctutil.h ../../../../source/hotconv/feat.h \
../../../../source/hotconv/MMFX.h ../../../../source/hotconv/OS_2.h \
../../../../source/hotconv/OS_2.h \
../../../../source/hotconv/hhea.h ../../../../source/hotconv/antlr.h \
../../../../source/hotconv/config.h \
../../../../source/hotconv/feattoks.h \
Expand Down
15 changes: 0 additions & 15 deletions c/makeotf/makeotf_lib/build/hotconv/linux/gcc/debug/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ LIB_SRCS = \
$(SRCDIR)/featerr.c \
$(SRCDIR)/featgram.c \
$(SRCDIR)/featscan.c \
$(SRCDIR)/fvar.c \
$(SRCDIR)/GDEF.c \
$(SRCDIR)/GPOS.c \
$(SRCDIR)/GSUB.c \
Expand All @@ -40,8 +39,6 @@ LIB_SRCS = \
$(SRCDIR)/hot.c \
$(SRCDIR)/map.c \
$(SRCDIR)/maxp.c \
$(SRCDIR)/MMFX.c \
$(SRCDIR)/MMSD.c \
$(SRCDIR)/name.c \
$(SRCDIR)/OS_2.c \
$(SRCDIR)/otl.c \
Expand All @@ -60,7 +57,6 @@ LIB_OBJS = \
$(OBJECT_DIR)/featerr.o \
$(OBJECT_DIR)/featgram.o \
$(OBJECT_DIR)/featscan.o \
$(OBJECT_DIR)/fvar.o \
$(OBJECT_DIR)/GDEF.o \
$(OBJECT_DIR)/GPOS.o \
$(OBJECT_DIR)/GSUB.o \
Expand All @@ -70,8 +66,6 @@ LIB_OBJS = \
$(OBJECT_DIR)/hot.o \
$(OBJECT_DIR)/map.o \
$(OBJECT_DIR)/maxp.o \
$(OBJECT_DIR)/MMFX.o \
$(OBJECT_DIR)/MMSD.o \
$(OBJECT_DIR)/name.o \
$(OBJECT_DIR)/OS_2.o \
$(OBJECT_DIR)/otl.o \
Expand Down Expand Up @@ -108,9 +102,6 @@ featgram.o:
featscan.o:
$(CC) $(CFLAGS) -c $(SRC_DIR)/featscan.c -o $@

fvar.o:
$(CC) $(CFLAGS) -c $(SRC_DIR)/fvar.c -o $@

GDEF.o:
$(CC) $(CFLAGS) -c $(SRC_DIR)/GDEF.c -o $@

Expand Down Expand Up @@ -138,12 +129,6 @@ map.o:
maxp.o:
$(CC) $(CFLAGS) -c $(SRC_DIR)/maxp.c -o $@

MMFX.o:
$(CC) $(CFLAGS) -c $(SRC_DIR)/MMFX.c -o $@

MMSD.o:
$(CC) $(CFLAGS) -c $(SRC_DIR)/MMSD.c -o $@

name.o:
$(CC) $(CFLAGS) -c $(SRC_DIR)/name.c -o $@

Expand Down
15 changes: 0 additions & 15 deletions c/makeotf/makeotf_lib/build/hotconv/linux/gcc/release/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ LIB_SRCS = \
$(SRCDIR)/featerr.c \
$(SRCDIR)/featgram.c \
$(SRCDIR)/featscan.c \
$(SRCDIR)/fvar.c \
$(SRCDIR)/GDEF.c \
$(SRCDIR)/GPOS.c \
$(SRCDIR)/GSUB.c \
Expand All @@ -39,8 +38,6 @@ LIB_SRCS = \
$(SRCDIR)/hot.c \
$(SRCDIR)/map.c \
$(SRCDIR)/maxp.c \
$(SRCDIR)/MMFX.c \
$(SRCDIR)/MMSD.c \
$(SRCDIR)/name.c \
$(SRCDIR)/OS_2.c \
$(SRCDIR)/otl.c \
Expand All @@ -59,7 +56,6 @@ LIB_OBJS = \
$(OBJECT_DIR)/featerr.o \
$(OBJECT_DIR)/featgram.o \
$(OBJECT_DIR)/featscan.o \
$(OBJECT_DIR)/fvar.o \
$(OBJECT_DIR)/GDEF.o \
$(OBJECT_DIR)/GPOS.o \
$(OBJECT_DIR)/GSUB.o \
Expand All @@ -69,8 +65,6 @@ LIB_OBJS = \
$(OBJECT_DIR)/hot.o \
$(OBJECT_DIR)/map.o \
$(OBJECT_DIR)/maxp.o \
$(OBJECT_DIR)/MMFX.o \
$(OBJECT_DIR)/MMSD.o \
$(OBJECT_DIR)/name.o \
$(OBJECT_DIR)/OS_2.o \
$(OBJECT_DIR)/otl.o \
Expand Down Expand Up @@ -107,9 +101,6 @@ featgram.o:
featscan.o:
$(CC) $(CFLAGS) -c $(SRC_DIR)/featscan.c -o $@

fvar.o:
$(CC) $(CFLAGS) -c $(SRC_DIR)/fvar.c -o $@

GDEF.o:
$(CC) $(CFLAGS) -c $(SRC_DIR)/GDEF.c -o $@

Expand Down Expand Up @@ -137,12 +128,6 @@ map.o:
maxp.o:
$(CC) $(CFLAGS) -c $(SRC_DIR)/maxp.c -o $@

MMFX.o:
$(CC) $(CFLAGS) -c $(SRC_DIR)/MMFX.c -o $@

MMSD.o:
$(CC) $(CFLAGS) -c $(SRC_DIR)/MMSD.c -o $@

name.o:
$(CC) $(CFLAGS) -c $(SRC_DIR)/name.c -o $@

Expand Down
Loading

0 comments on commit aaf265e

Please sign in to comment.