freetype/src/cff/rules.mk
Werner Lemberg 06474c3e5b [cff] Add a new Type 2 interpreter and hinter.
This work, written by Dave Arnold <darnold@adobe.com> and fully
integrated into FreeType by me, is a donation by Adobe in
collaboration with Google.  It is vastly superior to the old CFF
engine, and it will replace it soon.  Right now, it is still off by
default, and you have to explicitly select it using the new
`hinting-engine' property of the cff driver.

For convenience, (most of) the new files are committed separately.

* include/freetype/config/ftheader.h (FT_CFF_DRIVER_H): New macro.
* include/freetype/ftcffdrv.h: New file to access CFF driver
properties.
* include/freetype/fterrdef.h (FT_Err_Glyph_Too_Big): New error
code.
* include/freetype/internal/fttrace.h: Add `cf2blues', `cf2hints',
and `cf2interp'.

* src/cff/cffgload.h (CFF_SubFont): New member `current_subfont'.
* src/cff/cffobjs.h (CFF_DriverRec): New members `hinting_engine'
and `no_stem_darkening'.
* src/cff/cfftypes.h (CFF_FontRec): New member `cf2_instance'.

* src/cff/cff.c: Include new files.
* src/cff/cffdrivr.c (cff_property_set, cff_property_get): Handle
`hinting-engine' and `no-stem-darkening' properties (only the Adobe
engine listens to them).
* src/cff/cffgload.c: Include `cf2ft.h'.
(cff_decoder_prepare): Initialize `current_subfont'.
(cff_build_add_point): Handle Adobe engine which uses 16.16
coordinates.
(cff_slot_load): Handle FT_LOAD_NO_SCALE and FT_LOAD_NO_HINTING
separately.
Choose rendering engine based on `hinting_engine' property.
* src/cff/cffload.c (cff_font_done): Call finalizer of the Adobe
engine.
* src/cff/cffobjs.c: Include FT_CFF_DRIVER_H.
(cff_driver_init): Set default property values.

* src/cff/rules.mk (CFF_DRV_SRC, CFF_DRV_H): Add new files.

* src/cff/cf2*.*: New files, containing the Adobe engine.
2013-04-13 18:53:28 +02:00

87 lines
2.2 KiB
Makefile

#
# FreeType 2 OpenType/CFF driver configuration rules
#
# Copyright 1996-2001, 2003, 2011, 2013 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
# and distributed under the terms of the FreeType project license,
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
# indicate that you have read the license and understand and accept it
# fully.
# OpenType driver directory
#
CFF_DIR := $(SRC_DIR)/cff
CFF_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(CFF_DIR))
# CFF driver sources (i.e., C files)
#
CFF_DRV_SRC := $(CFF_DIR)/cffcmap.c \
$(CFF_DIR)/cffdrivr.c \
$(CFF_DIR)/cffgload.c \
$(CFF_DIR)/cffload.c \
$(CFF_DIR)/cffobjs.c \
$(CFF_DIR)/cffparse.c \
$(CFF_DIR)/cffpic.c \
$(CFF_DIR)/cf2arrst.c \
$(CFF_DIR)/cf2blues.c \
$(CFF_DIR)/cf2error.c \
$(CFF_DIR)/cf2font.c \
$(CFF_DIR)/cf2ft.c \
$(CFF_DIR)/cf2hints.c \
$(CFF_DIR)/cf2intrp.c \
$(CFF_DIR)/cf2read.c \
$(CFF_DIR)/cf2stack.c
# CFF driver headers
#
CFF_DRV_H := $(CFF_DRV_SRC:%.c=%.h) \
$(CFF_DIR)/cfferrs.h \
$(CFF_DIR)/cfftoken.h \
$(CFF_DIR)/cfftypes.h \
$(CFF_DIR)/cf2fixed.h \
$(CFF_DIR)/cf2glue.h \
$(CFF_DIR)/cf2types.h
# CFF driver object(s)
#
# CFF_DRV_OBJ_M is used during `multi' builds
# CFF_DRV_OBJ_S is used during `single' builds
#
CFF_DRV_OBJ_M := $(CFF_DRV_SRC:$(CFF_DIR)/%.c=$(OBJ_DIR)/%.$O)
CFF_DRV_OBJ_S := $(OBJ_DIR)/cff.$O
# CFF driver source file for single build
#
CFF_DRV_SRC_S := $(CFF_DIR)/cff.c
# CFF driver - single object
#
$(CFF_DRV_OBJ_S): $(CFF_DRV_SRC_S) $(CFF_DRV_SRC) $(FREETYPE_H) $(CFF_DRV_H)
$(CFF_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(CFF_DRV_SRC_S))
# CFF driver - multiple objects
#
$(OBJ_DIR)/%.$O: $(CFF_DIR)/%.c $(FREETYPE_H) $(CFF_DRV_H)
$(CFF_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
# update main driver object lists
#
DRV_OBJS_S += $(CFF_DRV_OBJ_S)
DRV_OBJS_M += $(CFF_DRV_OBJ_M)
# EOF