mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-21 20:50:07 +00:00
initial attempt at building poppler and fontforge statically and linking into pdf2html
This commit is contained in:
parent
0cfb9720ab
commit
83ec96f0e3
@ -39,11 +39,16 @@ cd fontforge
|
||||
|
||||
./bootstrap
|
||||
|
||||
./configure \
|
||||
./configure \
|
||||
--prefix=$PDF2HTMLEX_PREFIX \
|
||||
--enable-python-scripting=3 \
|
||||
--disable-dependency-tracking \
|
||||
--disable-silent-rules \
|
||||
--disable-silent-rules \
|
||||
--disable-python-scripting \
|
||||
--disable-python-extension \
|
||||
--disable-shared \
|
||||
--enable-static \
|
||||
--with-pic \
|
||||
--without-x
|
||||
|
||||
# Apply any patches required for fontforge raw sources before we make
|
||||
|
@ -34,13 +34,13 @@ export PDF2HTMLEX_PREFIX=/usr/local
|
||||
|
||||
./buildScripts/buildPoppler || { echo 'buildPoppler FAILED' ; exit 1 ; }
|
||||
|
||||
./buildScripts/installPoppler || { echo 'installPoppler FAILED' ; exit 1 ; }
|
||||
#./buildScripts/installPoppler || { echo 'installPoppler FAILED' ; exit 1 ; }
|
||||
|
||||
./buildScripts/getFontforge || { echo 'getFontforge FAILED' ; exit 1 ; }
|
||||
|
||||
./buildScripts/buildFontforge || { echo 'buildFontforge FAILED' ; exit 1 ; }
|
||||
|
||||
./buildScripts/installFontforge || { echo 'installFontforge FAILED' ; exit 1 ; }
|
||||
#./buildScripts/installFontforge || { echo 'installFontforge FAILED' ; exit 1 ; }
|
||||
|
||||
./buildScripts/buildPdf2htmlEX || { echo 'buildPdf2htmlEX FAILED' ; exit 1 ; }
|
||||
|
||||
|
@ -11,6 +11,10 @@ echo ""
|
||||
cd poppler
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PDF2HTMLEX_PREFIX \
|
||||
-DENABLE_LIBOPENJPEG=none ..
|
||||
cmake \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_SHARED_LIBS:BOOL=OFF \
|
||||
-DCMAKE_INSTALL_PREFIX=$PDF2HTMLEX_PREFIX \
|
||||
-DENABLE_LIBOPENJPEG=none \
|
||||
..
|
||||
make $MAKE_PARALLEL
|
||||
|
@ -16,6 +16,8 @@ echo "Getting poppler version: $POPPLER_VERSION"
|
||||
|
||||
rm -rf $POPPLER_VERSION.tar.xz
|
||||
rm -rf poppler
|
||||
rm -rf poppler-data-0.4.9.tar.gz
|
||||
rm -rf poppler-data
|
||||
|
||||
wget https://poppler.freedesktop.org/$POPPLER_VERSION.tar.xz
|
||||
|
||||
|
@ -20,10 +20,24 @@ add_custom_target(dist
|
||||
find_package(PkgConfig)
|
||||
|
||||
|
||||
pkg_check_modules(POPPLER REQUIRED poppler>=0.81.0)
|
||||
include_directories(${POPPLER_INCLUDE_DIRS})
|
||||
link_directories(${POPPLER_LIBRARY_DIRS})
|
||||
set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} ${POPPLER_LIBRARIES})
|
||||
# SINCE we have a very intimate relationship with a particular version of
|
||||
# poppler... we explicitly describe the poppler include and library
|
||||
# paths.
|
||||
|
||||
include_directories(
|
||||
../poppler/build/poppler
|
||||
../poppler/build
|
||||
../poppler/poppler
|
||||
../poppler
|
||||
)
|
||||
|
||||
#link_directories(
|
||||
# ../poppler/build
|
||||
#)
|
||||
set(POPPLER_LIBRARIES ${POPPLER_LIBRARIES}
|
||||
${CMAKE_SOURCE_DIR}/../poppler/build/libpoppler.a
|
||||
${CMAKE_SOURCE_DIR}/../poppler/build/glib/libpoppler-glib.a
|
||||
)
|
||||
|
||||
if(ENABLE_SVG)
|
||||
pkg_check_modules(CAIRO REQUIRED cairo>=1.10.0)
|
||||
@ -54,13 +68,44 @@ if(ENABLE_SVG)
|
||||
set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} ${FREETYPE_LIBRARIES})
|
||||
endif()
|
||||
|
||||
# fontforge starts using pkg-config 'correctly' since 2.0.0
|
||||
#pkg_check_modules(FONTFORGE REQUIRED libfontforge>=2.0.20170731)
|
||||
pkg_check_modules(FONTFORGE REQUIRED libfontforge>=2.0.0)
|
||||
# SINCE we have a very intimate relationship with a particular version of
|
||||
# fontforge... we explicitly describe the fontforge include and library
|
||||
# paths.
|
||||
|
||||
include_directories(
|
||||
../fontforge/fontforge
|
||||
../fontforge
|
||||
../fontforge/build/inc
|
||||
../fontforge/inc
|
||||
)
|
||||
|
||||
include_directories(${FONTFORGE_INCLUDE_DIRS})
|
||||
link_directories(${FONTFORGE_LIBRARY_DIRS})
|
||||
set(FONTFORGE_LIBRARIES ${FONTFORGE_LIBRARIES} -lgutils)
|
||||
set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} ${FONTFORGE_LIBRARIES})
|
||||
set(FONTFORGE_LIBRARIES ${FONTFORGE_LIBRARIES}
|
||||
${CMAKE_SOURCE_DIR}/../fontforge/fontforge/.libs/libfontforge.a
|
||||
${CMAKE_SOURCE_DIR}/../fontforge/Unicode/.libs/libgunicode.a
|
||||
${CMAKE_SOURCE_DIR}/../fontforge/gutils/.libs/libgutils.a
|
||||
)
|
||||
|
||||
set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS}
|
||||
${POPPLER_LIBRARIES}
|
||||
${FONTFORGE_LIBRARIES}
|
||||
-lfreetype
|
||||
-lfontconfig
|
||||
-ljpeg
|
||||
-lz
|
||||
-llcms2
|
||||
-lpng
|
||||
-lz
|
||||
-llcms2
|
||||
-pthread
|
||||
-lspiro
|
||||
-luninameslist
|
||||
-lm
|
||||
-lxml2
|
||||
-lglib-2.0
|
||||
-lgio-2.0
|
||||
)
|
||||
|
||||
# debug build flags (overwrite default cmake debug flags)
|
||||
set(CMAKE_C_FLAGS_DEBUG "-ggdb -pg")
|
||||
|
@ -21,18 +21,18 @@
|
||||
#include "ffw.h" // needed for:
|
||||
#include "gfile.h" // FindProgDir
|
||||
#include "fontforge-version-extras.h" // FONTFORGE_GIT_VERSION
|
||||
#include "fontforge-20190801/autowidth.h" // FVRemoveKerns
|
||||
#include "fontforge-20190801/bitmapchar.h" // SFReplaceEncodingBDFProps
|
||||
#include "fontforge-20190801/cvimages.h" // FVImportImages
|
||||
#include "fontforge-20190801/encoding.h" // (helpful as we have a name conflict)
|
||||
#include "fontforge-20190801/fvfonts.h" // SFFindSlot
|
||||
#include "fontforge-20190801/namelist.h" // UniFromName
|
||||
#include "fontforge-20190801/savefont.h" // GenerateScript
|
||||
#include "fontforge-20190801/splineorder2.h" // SFConvertToOrder2
|
||||
#include "fontforge-20190801/splineutil.h" // AltUniFree
|
||||
#include "fontforge-20190801/splineutil2.h" // SplineFontNew
|
||||
#include "fontforge-20190801/start.h" // InitSimpleStuff
|
||||
#include "fontforge-20190801/tottf.h" // SFDefaultOS2Info
|
||||
#include "fontforge/autowidth.h" // FVRemoveKerns
|
||||
#include "fontforge/bitmapchar.h" // SFReplaceEncodingBDFProps
|
||||
#include "fontforge/cvimages.h" // FVImportImages
|
||||
#include "fontforge/encoding.h" // (helpful as we have a name conflict)
|
||||
#include "fontforge/fvfonts.h" // SFFindSlot
|
||||
#include "fontforge/namelist.h" // UniFromName
|
||||
#include "fontforge/savefont.h" // GenerateScript
|
||||
#include "fontforge/splineorder2.h" // SFConvertToOrder2
|
||||
#include "fontforge/splineutil.h" // AltUniFree
|
||||
#include "fontforge/splineutil2.h" // SplineFontNew
|
||||
#include "fontforge/start.h" // InitSimpleStuff
|
||||
#include "fontforge/tottf.h" // SFDefaultOS2Info
|
||||
|
||||
static real EPS=1e-6;
|
||||
|
||||
|
@ -1,26 +0,0 @@
|
||||
# FontForge: the missing headers
|
||||
|
||||
The FontForge header files in this directory are taken from the
|
||||
FontForge-20190801 release.
|
||||
|
||||
They are headers which are not usually installed by the FontForge make
|
||||
system.
|
||||
|
||||
|
||||
## Required headers
|
||||
|
||||
- `autowidth.h` required for FVRemoveKerns
|
||||
- `bitmapchar.h` required for SFReplaceEncodingBDFProps
|
||||
- `cvimages.h` required for FVImportImages
|
||||
- `fvfonts.h` required for SFFindSlot
|
||||
- `namelist.h` required for UniFromName
|
||||
- `savefont.h` required for GenerateScript
|
||||
- `splineorder2.h` required for SFConvertToOrder2
|
||||
- `splineutil.h` required for AltUniFree
|
||||
- `splineutil2.h` required for SplineFontNew
|
||||
- `start.h` required for InitSimpleStuff
|
||||
- `tottf.h` required for SFDefaultOS2Info
|
||||
|
||||
## Helpful headers
|
||||
|
||||
- `encoding.h` conflicts with an existing header in the src/util directory.
|
@ -1,81 +0,0 @@
|
||||
#ifndef FONTFORGE_AUTOWIDTH_H
|
||||
#define FONTFORGE_AUTOWIDTH_H
|
||||
|
||||
#include "baseviews.h"
|
||||
#include "splinefont.h"
|
||||
|
||||
struct charone {
|
||||
real lbearing, rmax;
|
||||
real newl, newr;
|
||||
int baseserif, lefttops, righttops; /* serif zones which affect this character */
|
||||
SplineChar *sc;
|
||||
int base, top; /* bottom of character, number of decimation zones we've got */
|
||||
short *ledge;
|
||||
short *redge;
|
||||
struct charpair *asleft;
|
||||
struct charpair *asright;
|
||||
};
|
||||
|
||||
struct charpair {
|
||||
struct charone *left, *right;
|
||||
struct charpair *nextasleft, *nextasright;
|
||||
int base, top;
|
||||
short *distances;
|
||||
short visual;
|
||||
};
|
||||
|
||||
typedef struct widthinfo {
|
||||
real spacing; /* desired spacing between letters */
|
||||
real decimation;
|
||||
real serifsize;
|
||||
real seriflength;
|
||||
real caph;
|
||||
real descent;
|
||||
real xheight;
|
||||
real n_stem_exterior_width, n_stem_interior_width;
|
||||
real current_I_spacing;
|
||||
int serifs[4][2]; /* Four serif zones: descent, baseline, xheight, cap */
|
||||
int lcnt, rcnt; /* count of left and right chars respectively */
|
||||
int real_lcnt, real_rcnt; /* what the user asked for. We might add I */
|
||||
int tcnt; /* sum of r+l cnt */
|
||||
int pcnt; /* pair count, often r*l cnt */
|
||||
int l_Ipos, r_Ipos;
|
||||
struct charone **left, **right;
|
||||
struct charpair **pairs;
|
||||
int space_guess;
|
||||
int threshold;
|
||||
SplineFont *sf;
|
||||
FontViewBase *fv;
|
||||
int layer;
|
||||
unsigned int done: 1;
|
||||
unsigned int autokern: 1;
|
||||
unsigned int onlynegkerns: 1;
|
||||
struct lookup_subtable *subtable;
|
||||
} WidthInfo;
|
||||
|
||||
#define NOTREACHED -9999.0
|
||||
|
||||
extern struct charone *AW_MakeCharOne(SplineChar *sc);
|
||||
extern void AW_InitCharPairs(WidthInfo *wi);
|
||||
extern void AW_FreeCharList(struct charone **list);
|
||||
extern void AW_FreeCharPairs(struct charpair **list, int cnt);
|
||||
extern void AW_ScriptSerifChecker(WidthInfo *wi);
|
||||
extern int AW_ReadKernPairFile(char *fn,WidthInfo *wi);
|
||||
extern void AW_BuildCharPairs(WidthInfo *wi);
|
||||
extern void AW_AutoKern(WidthInfo *wi);
|
||||
extern void AW_AutoWidth(WidthInfo *wi);
|
||||
extern void AW_FindFontParameters(WidthInfo *wi);
|
||||
extern void AW_KernRemoveBelowThreshold(SplineFont *sf,int threshold);
|
||||
|
||||
extern SplineFont *aw_old_sf;
|
||||
extern int aw_old_spaceguess;
|
||||
|
||||
extern int AutoKernScript(FontViewBase *fv, int spacing, int threshold, struct lookup_subtable *sub, char *kernfile);
|
||||
extern int AutoWidthScript(FontViewBase *fv, int spacing);
|
||||
extern int KernThreshold(SplineFont *sf, int cnt);
|
||||
extern real SFGuessItalicAngle(SplineFont *sf);
|
||||
extern void FVRemoveKerns(FontViewBase *fv);
|
||||
extern void FVRemoveVKerns(FontViewBase *fv);
|
||||
extern void FVVKernFromHKern(FontViewBase *fv);
|
||||
|
||||
#endif /* FONTFORGE_AUTOWIDTH_H */
|
@ -1,24 +0,0 @@
|
||||
#ifndef FONTFORGE_BITMAPCHAR_H
|
||||
#define FONTFORGE_BITMAPCHAR_H
|
||||
|
||||
#include "splinefont.h"
|
||||
#include "uiinterface.h"
|
||||
|
||||
extern BDFChar *BDFMakeChar(BDFFont *bdf, EncMap *map, int enc);
|
||||
extern BDFChar *BDFMakeGID(BDFFont *bdf, int gid);
|
||||
extern BDFProperties *BdfPropsCopy(BDFProperties *props, int cnt);
|
||||
extern const char *BdfPropHasString(BDFFont *font, const char *key, const char *def);
|
||||
extern int BdfPropHasInt(BDFFont *font, const char *key, int def);
|
||||
extern int IsUnsignedBDFKey(const char *key);
|
||||
extern void BCClearAll(BDFChar *bc);
|
||||
extern void BDFDefaultProps(BDFFont *bdf, EncMap *map, int res);
|
||||
extern void Default_Properties(BDFFont *bdf, EncMap *map, char *onlyme);
|
||||
extern void Default_XLFD(BDFFont *bdf, EncMap *map, int res);
|
||||
extern void def_Charset_Enc(EncMap *map, char *reg, char *enc);
|
||||
extern void FF_SetBCInterface(struct bc_interface *bci);
|
||||
extern void SFReplaceEncodingBDFProps(SplineFont *sf, EncMap *map);
|
||||
extern void SFReplaceFontnameBDFProps(SplineFont *sf);
|
||||
extern void XLFD_CreateComponents(BDFFont *font, EncMap *map, int res, struct xlfd_components *components);
|
||||
extern void XLFD_GetComponents(const char *xlfd, struct xlfd_components *components);
|
||||
|
||||
#endif /* FONTFORGE_BITMAPCHAR_H */
|
@ -1,22 +0,0 @@
|
||||
#ifndef FONTFORGE_CVIMAGES_H
|
||||
#define FONTFORGE_CVIMAGES_H
|
||||
|
||||
#include "baseviews.h"
|
||||
#include "gimage.h"
|
||||
#include "sd.h"
|
||||
#include "splinefont.h"
|
||||
|
||||
extern GImage *ImageAlterClut(GImage *image);
|
||||
extern int FVImportImages(FontViewBase *fv, char *path, int format, int toback, int flags);
|
||||
extern int FVImportImageTemplate(FontViewBase *fv, char *path, int format, int toback, int flags);
|
||||
extern void SCAddScaleImage(SplineChar *sc, GImage *image, int doclear, int layer);
|
||||
extern void SCAppendEntityLayers(SplineChar *sc, Entity *ent);
|
||||
extern void SCImportFig(SplineChar *sc, int layer, char *path, int doclear);
|
||||
extern void SCImportGlif(SplineChar *sc, int layer, char *path, char *memory, int memlen, int doclear);
|
||||
extern void SCImportPDFFile(SplineChar *sc, int layer, FILE *pdf, int doclear, int flags);
|
||||
extern void SCImportPlateFile(SplineChar *sc, int layer, FILE *plate, int doclear);
|
||||
extern void SCImportPSFile(SplineChar *sc, int layer, FILE *ps, int doclear, int flags);
|
||||
extern void SCImportSVG(SplineChar *sc, int layer, char *path, char *memory, int memlen, int doclear);
|
||||
extern void SCInsertImage(SplineChar *sc, GImage *image, real scale, real yoff, real xoff, int layer);
|
||||
|
||||
#endif /* FONTFORGE_CVIMAGES_H */
|
@ -1,85 +0,0 @@
|
||||
#ifndef FONTFORGE_ENCODING_H
|
||||
#define FONTFORGE_ENCODING_H
|
||||
|
||||
#include "baseviews.h"
|
||||
#include "splinefont.h"
|
||||
|
||||
struct cidaltuni {
|
||||
struct cidaltuni *next;
|
||||
int uni;
|
||||
int cid;
|
||||
};
|
||||
|
||||
struct cidmap {
|
||||
char *registry, *ordering;
|
||||
int supplement, maxsupple;
|
||||
int cidmax; /* Max cid found in the charset */
|
||||
int namemax; /* Max cid with useful info */
|
||||
uint32 *unicode;
|
||||
char **name;
|
||||
struct cidaltuni *alts;
|
||||
struct cidmap *next;
|
||||
};
|
||||
|
||||
extern struct cidmap *cidmaps;
|
||||
|
||||
extern void DeleteEncoding(Encoding *me);
|
||||
extern void EncodingFree(Encoding *item);
|
||||
extern void RemoveMultiples(Encoding *item);
|
||||
extern char *ParseEncodingFile(char *filename, char *encodingname);
|
||||
extern char *SFEncodingName(SplineFont *sf, EncMap *map);
|
||||
extern const char *FindUnicharName(void);
|
||||
extern EncMap *CompactEncMap(EncMap *map, SplineFont *sf);
|
||||
extern EncMap *EncMapFromEncoding(SplineFont *sf, Encoding *enc);
|
||||
extern Encoding *FindOrMakeEncoding(const char *name);
|
||||
extern Encoding *_FindOrMakeEncoding(const char *name, int make_it);
|
||||
extern int32 EncFromName(const char *name, enum uni_interp interp, Encoding *encname);
|
||||
extern int32 EncFromUni(int32 uni, Encoding *enc);
|
||||
extern int32 UniFromEnc(int enc, Encoding *encname);
|
||||
|
||||
/* The "Encoding" here is a little different from what you normally see*/
|
||||
/* It isn't a mapping from a byte stream to unicode, but from an int */
|
||||
/* to unicode. If we have an 8/16 encoding (EUC or SJIS) then the */
|
||||
/* single byte entries will be numbers less than <256 and the */
|
||||
/* multibyte entries will be numbers >=256. So an encoding might be */
|
||||
/* valid for the domain [0x20..0x7f] [0xa1a1..0xfefe] */
|
||||
/* In other words, we're interested in the ordering displayed in the */
|
||||
/* fontview. Nothing else */
|
||||
/* The max value need not be exact (though it should be at least as big)*/
|
||||
/* if you create a new font with the given encoding, then the font will */
|
||||
/* have max slots in it by default */
|
||||
/* A return value of -1 (from an EncFunc) indicates no mapping */
|
||||
/* AddEncoding returns 1 if the encoding was added, 2 if it replaced */
|
||||
/* an existing encoding, 0 if you attempt to replace a builtin */
|
||||
/* encoding */
|
||||
typedef int (*EncFunc)(int);
|
||||
extern int AddEncoding(char *name, EncFunc enc_to_uni, EncFunc uni_to_enc, int max);
|
||||
|
||||
extern int CID2NameUni(struct cidmap *map, int cid, char *buffer, int len);
|
||||
extern int CID2Uni(struct cidmap *map, int cid);
|
||||
extern int CIDFromName(char *name, SplineFont *cidmaster);
|
||||
extern int CountOfEncoding(Encoding *encoding_name);
|
||||
extern int MaxCID(struct cidmap *map);
|
||||
extern int NameUni2CID(struct cidmap *map, int uni, const char *name);
|
||||
extern int SFFlattenByCMap(SplineFont **sf, char *cmapname);
|
||||
extern int SFForceEncoding(SplineFont *sf, EncMap *old, Encoding *new_enc);
|
||||
extern int SFReencode(SplineFont *sf, const char *encname, int force);
|
||||
extern SplineFont *CIDFlatten(SplineFont *cidmaster, SplineChar **glyphs, int charcnt);
|
||||
extern SplineFont *MakeCIDMaster(SplineFont *sf, EncMap *oldmap, int bycmap, char *cmapfilename, struct cidmap *cidmap);
|
||||
extern struct altuni *CIDSetAltUnis(struct cidmap *map, int cid);
|
||||
extern struct cidmap *FindCidMap(char *registry, char *ordering, int supplement, SplineFont *sf);
|
||||
extern struct cidmap *LoadMapFromFile(char *file, char *registry, char *ordering, int supplement);
|
||||
extern void BDFOrigFixup(BDFFont *bdf, int orig_cnt, SplineFont *sf);
|
||||
extern void CIDMasterAsDes(SplineFont *sf);
|
||||
extern void DumpPfaEditEncodings(void);
|
||||
extern void FVAddEncodingSlot(FontViewBase *fv, int gid);
|
||||
extern void LoadPfaEditEncodings(void);
|
||||
extern void MMMatchGlyphs(MMSet *mm);
|
||||
extern void SFAddEncodingSlot(SplineFont *sf, int gid);
|
||||
extern void SFAddGlyphAndEncode(SplineFont *sf, SplineChar *sc, EncMap *basemap, int baseenc);
|
||||
extern void SFEncodeToMap(SplineFont *sf, struct cidmap *map);
|
||||
extern void SFExpandGlyphCount(SplineFont *sf, int newcnt);
|
||||
extern void SFMatchGlyphs(SplineFont *sf, SplineFont *target, int addempties);
|
||||
extern void SFRemoveGlyph(SplineFont *sf, SplineChar *sc);
|
||||
|
||||
#endif /* FONTFORGE_ENCODING_H */
|
@ -1,34 +0,0 @@
|
||||
#ifndef FONTFORGE_FVFONTS_H
|
||||
#define FONTFORGE_FVFONTS_H
|
||||
|
||||
#include "baseviews.h"
|
||||
#include "splinefont.h"
|
||||
|
||||
extern AnchorClass *MCConvertAnchorClass(struct sfmergecontext *mc, AnchorClass *ac);
|
||||
extern BDFChar *BDFCharCopy(BDFChar *bc);
|
||||
extern int SFCIDFindCID(SplineFont *sf, int unienc, const char *name);
|
||||
extern int SFCIDFindExistingChar(SplineFont *sf, int unienc, const char *name);
|
||||
extern int SFFindExistingSlot(SplineFont *sf, int unienc, const char *name);
|
||||
extern int SFFindGID(SplineFont *sf, int unienc, const char *name);
|
||||
extern int SFFindSlot(SplineFont *sf, EncMap *map, int unienc, const char *name);
|
||||
extern int SFHasChar(SplineFont *sf, int unienc, const char *name);
|
||||
extern int SFHasCID(SplineFont *sf, int cid);
|
||||
extern PST *PSTCopy(PST *base, SplineChar *sc, struct sfmergecontext *mc);
|
||||
extern RefChar *RefCharsCopy(RefChar *ref);
|
||||
extern SplineChar *SFGetChar(SplineFont *sf, int unienc, const char *name);
|
||||
extern SplineChar *SFGetOrMakeCharFromUnicodeBasic(SplineFont *sf, int ch);
|
||||
extern SplineChar *SFHashName(SplineFont *sf, const char *name);
|
||||
extern SplineChar *SplineCharCopy(SplineChar *sc, SplineFont *into, struct sfmergecontext *mc);
|
||||
extern SplineChar *SplineCharInterpolate(SplineChar *base, SplineChar *other, real amount, SplineFont *newfont);
|
||||
extern SplineFont *InterpolateFont(SplineFont *base, SplineFont *other, real amount, Encoding *enc);
|
||||
extern SplineSet *SplineSetsInterpolate(SplineSet *base, SplineSet *other, real amount, SplineChar *sc);
|
||||
extern struct altuni *AltUniCopy(struct altuni *altuni, SplineFont *noconflicts);
|
||||
extern struct lookup_subtable *MCConvertSubtable(struct sfmergecontext *mc, struct lookup_subtable *sub);
|
||||
extern void BitmapsCopy(SplineFont *to, SplineFont *from, int to_index, int from_index);
|
||||
extern void GlyphHashFree(SplineFont *sf);
|
||||
extern void __GlyphHashFree(struct glyphnamehash *hash);
|
||||
extern void MergeFont(FontViewBase *fv, SplineFont *other, int preserveCrossFontKerning);
|
||||
extern void SFFinishMergeContext(struct sfmergecontext *mc);
|
||||
extern void SFHashGlyph(SplineFont *sf, SplineChar *sc);
|
||||
|
||||
#endif /* FONTFORGE_FVFONTS_H */
|
@ -1,20 +0,0 @@
|
||||
#ifndef FONTFORGE_NAMELIST_H
|
||||
#define FONTFORGE_NAMELIST_H
|
||||
|
||||
#include "splinefont.h"
|
||||
|
||||
extern char **AllGlyphNames(int uni, NameList *for_this_font, SplineChar *sc);
|
||||
extern char **AllNamelistNames(void);
|
||||
extern char **SFTemporaryRenameGlyphsToNamelist(SplineFont *sf, NameList *new);
|
||||
extern const char *RenameGlyphToNamelist(char *buffer, SplineChar *sc, NameList *old, NameList *new, char **sofar);
|
||||
extern const char *StdGlyphName(char *buffer, int uni, enum uni_interp interp, NameList *for_this_font);
|
||||
extern const char *StdGlyphNameBoundsCheck(char *buffer, int uni, enum uni_interp interp, NameList *for_this_font);
|
||||
extern int UniFromName(const char *name, enum uni_interp interp, Encoding *encname);
|
||||
extern NameList *DefaultNameListForNewFonts(void);
|
||||
extern NameList *LoadNamelist(char *filename);
|
||||
extern NameList *NameListByName(const char *name);
|
||||
extern void LoadNamelistDir(char *dir);
|
||||
extern void SFRenameGlyphsToNamelist(SplineFont *sf, NameList *new);
|
||||
extern void SFTemporaryRestoreGlyphNames(SplineFont *sf, char **former);
|
||||
|
||||
#endif /* FONTFORGE_NAMELIST_H */
|
@ -1,80 +0,0 @@
|
||||
/* Copyright (C) 2007-2012 by George Williams */
|
||||
/*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
|
||||
* The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef FONTFORGE_SAVEFONT_H
|
||||
#define FONTFORGE_SAVEFONT_H
|
||||
|
||||
#include <fontforge-config.h>
|
||||
|
||||
#include "splinefont.h"
|
||||
|
||||
enum fm_flags { fm_flag_afm = 0x1,
|
||||
fm_flag_pfm = 0x2,
|
||||
fm_flag_shortps = 0x4,
|
||||
fm_flag_nopshints = 0x8,
|
||||
fm_flag_apple = 0x10,
|
||||
fm_flag_pfed_comments = 0x20,
|
||||
fm_flag_pfed_colors = 0x40,
|
||||
fm_flag_opentype = 0x80,
|
||||
fm_flag_glyphmap = 0x100,
|
||||
fm_flag_TeXtable = 0x200,
|
||||
fm_flag_ofm = 0x400,
|
||||
fm_flag_applemode = 0x800,
|
||||
// fm_flag_??? = 0x1000,
|
||||
fm_flag_symbol = 0x2000,
|
||||
fm_flag_dummyDSIG = 0x4000,
|
||||
// fm_flag_??? = 0x8000,
|
||||
fm_flag_tfm = 0x10000,
|
||||
fm_flag_nohintsubs = 0x20000,
|
||||
fm_flag_noflex = 0x40000,
|
||||
fm_flag_nottfhints = 0x80000,
|
||||
fm_flag_restrict256 = 0x100000,
|
||||
fm_flag_round = 0x200000,
|
||||
fm_flag_afmwithmarks = 0x400000,
|
||||
fm_flag_pfed_lookups = 0x800000,
|
||||
fm_flag_pfed_guides = 0x1000000,
|
||||
fm_flag_pfed_layers = 0x2000000,
|
||||
fm_flag_winkern = 0x4000000,
|
||||
fm_flag_nomacnames = 0x8000000,
|
||||
};
|
||||
|
||||
extern const char (*savefont_extensions[]), (*bitmapextensions[]);
|
||||
extern int old_sfnt_flags;
|
||||
|
||||
void PrepareUnlinkRmOvrlp(SplineFont *sf,const char *filename,int layer);
|
||||
void RestoreUnlinkRmOvrlp(SplineFont *sf,const char *filename,int layer);
|
||||
int _DoSave(SplineFont *sf,char *newname,int32 *sizes,int res,
|
||||
EncMap *map, char *subfontdefinition,int layer);
|
||||
int CheckIfTransparent(SplineFont *sf);
|
||||
|
||||
extern int GenerateScript(SplineFont *sf, char *filename, const char *bitmaptype, int fmflags, int res, char *subfontdirectory, struct sflist *sfs, EncMap *map, NameList *rename_to, int layer);
|
||||
|
||||
#ifdef FONTFORGE_CONFIG_WRITE_PFM
|
||||
extern int WritePfmFile(char *filename, SplineFont *sf, EncMap *map, int layer);
|
||||
#endif
|
||||
|
||||
#endif /* FONTFORGE_SAVEFONT_H */
|
@ -1,29 +0,0 @@
|
||||
#ifndef FONTFORGE_SPLINEORDER2_H
|
||||
#define FONTFORGE_SPLINEORDER2_H
|
||||
|
||||
#include "splinefont.h"
|
||||
|
||||
extern SplinePoint *SplineTtfApprox(Spline *ps);
|
||||
extern SplineSet *SplineSetsConvertOrder(SplineSet *ss, int to_order2);
|
||||
extern SplineSet *SplineSetsPSApprox(SplineSet *ss);
|
||||
extern SplineSet *SplineSetsTTFApprox(SplineSet *ss);
|
||||
extern SplineSet *SSPSApprox(SplineSet *ss);
|
||||
extern SplineSet *SSttfApprox(SplineSet *ss);
|
||||
extern Spline *SplineMake2(SplinePoint *from, SplinePoint *to);
|
||||
extern void SCConvertLayerToOrder2(SplineChar *sc, int layer);
|
||||
extern void SCConvertLayerToOrder3(SplineChar *sc, int layer);
|
||||
extern void SCConvertOrder(SplineChar *sc, int to_order2);
|
||||
extern void SCConvertToOrder2(SplineChar *sc);
|
||||
extern void SCConvertToOrder3(SplineChar *sc);
|
||||
extern void SFConvertGridToOrder2(SplineFont *_sf);
|
||||
extern void SFConvertGridToOrder3(SplineFont *_sf);
|
||||
extern void SFConvertLayerToOrder2(SplineFont *_sf, int layer);
|
||||
extern void SFConvertLayerToOrder3(SplineFont *_sf, int layer);
|
||||
extern void SFConvertToOrder2(SplineFont *_sf);
|
||||
extern void SFConvertToOrder3(SplineFont *_sf);
|
||||
extern void SplinePointNextCPChanged2(SplinePoint *sp);
|
||||
extern void SplinePointPrevCPChanged2(SplinePoint *sp);
|
||||
extern void SplineRefigure2(Spline *spline);
|
||||
extern void SplineRefigureFixup(Spline *spline);
|
||||
|
||||
#endif /* FONTFORGE_SPLINEORDER2_H */
|
@ -1,217 +0,0 @@
|
||||
#ifndef FONTFORGE_SPLINEUTIL_H
|
||||
#define FONTFORGE_SPLINEUTIL_H
|
||||
|
||||
#include "glif_name_hash.h"
|
||||
#include "psfont.h"
|
||||
#include "splinefont.h"
|
||||
#include "ttfinstrs.h"
|
||||
#include "views.h"
|
||||
|
||||
extern AnchorClass *SFFindOrAddAnchorClass(SplineFont *sf, char *name, struct lookup_subtable *sub);
|
||||
extern AnchorPoint *AnchorPointsCopy(AnchorPoint *alist);
|
||||
extern AnchorPoint *APAnchorClassMerge(AnchorPoint *anchors, AnchorClass *into, AnchorClass *from);
|
||||
extern bigreal DistanceBetweenPoints(BasePoint *p1, BasePoint *p2);
|
||||
extern bigreal SplineCurvature(Spline *s, bigreal t);
|
||||
extern bigreal SplineMinDistanceToPoint(Spline *s, BasePoint *p);
|
||||
|
||||
extern size_t count_caps(const char * input);
|
||||
extern char *upper_case(const char * input);
|
||||
extern char *same_case(const char * input);
|
||||
extern char *delimit_null(const char * input, char delimiter);
|
||||
|
||||
extern char *strconcat3(const char *str1, const char *str2, const char *str3);
|
||||
extern char **StringExplode(const char *input, char delimiter);
|
||||
extern char *XUIDFromFD(int xuid[20]);
|
||||
extern DeviceTable *DeviceTableCopy(DeviceTable *orig);
|
||||
extern double CheckExtremaForSingleBitErrors(const Spline1D *sp, double t, double othert);
|
||||
extern DStemInfo *DStemInfoCopy(DStemInfo *h);
|
||||
extern EncMap *EncMap1to1(int enccount);
|
||||
extern EncMap *EncMapCopy(EncMap *map);
|
||||
extern EncMap *EncMapNew(int enccount, int backmax, Encoding *enc);
|
||||
|
||||
/* Uses an iterative approximation */
|
||||
extern extended IterateSplineSolve(const Spline1D *sp, extended tmin, extended tmax, extended sought_y);
|
||||
/* Uses an iterative approximation and then tries to fix things up */
|
||||
extern extended IterateSplineSolveFixup(const Spline1D *sp, extended tmin, extended tmax, extended sought_y);
|
||||
|
||||
extern FPST *FPSTCopy(FPST *fpst);
|
||||
extern HintMask *HintMaskFromTransformedRef(RefChar *ref, BasePoint *trans, SplineChar *basesc,HintMask *hm);
|
||||
extern ImageList *ImageListCopy(ImageList *cimg);
|
||||
extern ImageList *ImageListTransform(ImageList *img, real transform[6], int everything);
|
||||
extern int CountKerningClasses(SplineFont *sf);
|
||||
extern int _CubicSolve(const Spline1D *sp, bigreal sought, extended ts[3]);
|
||||
extern int GroupNameType(const char *input);
|
||||
extern int IntersectLines(BasePoint *inter, BasePoint *line1_1, BasePoint *line1_2, BasePoint *line2_1, BasePoint *line2_2);
|
||||
extern int IntersectLinesClip(BasePoint *inter, BasePoint *line1_1, BasePoint *line1_2, BasePoint *line2_1, BasePoint *line2_2);
|
||||
extern int IntersectLinesSlopes(BasePoint *inter, BasePoint *line1, BasePoint *slope1, BasePoint *line2, BasePoint *slope2);
|
||||
extern int LineTangentToSplineThroughPt(Spline *s, BasePoint *pt, extended ts[4], extended tmin, extended tmax);
|
||||
extern int NearSpline(FindSel *fs, Spline *spline);
|
||||
extern int SCRoundToCluster(SplineChar *sc, int layer, int sel, bigreal within, bigreal max);
|
||||
extern int SFKerningGroupExistsSpecific(const struct splinefont *sf, const char *groupname, int isv, int isr);
|
||||
extern int SpExistsInSS(SplinePoint *sp, SplineSet *ss);
|
||||
extern int Spline2DFindExtrema(const Spline *sp, extended extrema[4]);
|
||||
extern int Spline2DFindPointsOfInflection(const Spline *sp, extended poi[2]);
|
||||
extern int SplineAtInflection(Spline1D *sp, bigreal t);
|
||||
extern int SplineAtMinMax(Spline1D *sp, bigreal t);
|
||||
extern int SplineExistsInSS(Spline *s, SplineSet *ss);
|
||||
extern int SplinePointIsACorner(SplinePoint *sp);
|
||||
extern int SplineSetIntersect(SplineSet *spl, Spline **_spline, Spline **_spline2);
|
||||
extern int SplineSetsRemoveAnnoyingExtrema(SplineSet *ss, bigreal err);
|
||||
extern int SplineRemoveWildControlPoints(Spline *s, bigreal distratio);
|
||||
extern int SplineSetsRemoveWildControlPoints(SplineSet *ss, bigreal distratio);
|
||||
|
||||
/* Two lines intersect in at most 1 point */
|
||||
/* Two quadratics intersect in at most 4 points */
|
||||
/* Two cubics intersect in at most 9 points */ /* Plus an extra space for a trailing -1 */
|
||||
extern int SplinesIntersect(const Spline *s1, const Spline *s2, BasePoint pts[9], extended t1s[10], extended t2s[10]);
|
||||
|
||||
extern int SplineT2SpiroIndex(Spline *spline, bigreal t, SplineSet *spl);
|
||||
extern int SSBoundsWithin(SplineSet *ss, bigreal z1, bigreal z2, bigreal *wmin, bigreal *wmax, int major);
|
||||
extern int SSExistsInLayer(SplineSet *ss, SplineSet *lots);
|
||||
extern int SSHasClip(SplineSet *ss);
|
||||
extern int SSHasDrawn(SplineSet *ss);
|
||||
extern int SSPointWithin(SplineSet *spl, BasePoint *pt);
|
||||
extern int StringInStrings(char const* const* space, int length, const char *target);
|
||||
extern KernClass *KernClassCopy(KernClass *kc);
|
||||
extern LinearApprox *SplineApproximate(Spline *spline, real scale);
|
||||
extern MinimumDistance *MinimumDistanceCopy(MinimumDistance *md);
|
||||
extern real SplineNearPoint(Spline *spline, BasePoint *bp, real fudge);
|
||||
extern RefChar *RefCharCreate(void);
|
||||
extern SplineChar *SFSplineCharCreate(SplineFont *sf);
|
||||
extern SplineFont *SplineFontFromPSFont(FontDict *fd);
|
||||
extern SplinePointList *SPLCopyTransformedHintMasks(RefChar *r, SplineChar *basesc, BasePoint *trans,int layer);
|
||||
extern SplinePointList *SPLCopyTranslatedHintMasks(SplinePointList *base, SplineChar *basesc, SplineChar *subsc, BasePoint *trans);
|
||||
extern SplinePointList *SplinePointListCopy1(const SplinePointList *spl);
|
||||
extern SplinePointList *SplinePointListCopySelected(SplinePointList *base);
|
||||
extern SplinePointList *SplinePointListCopySpiroSelected(SplinePointList *base);
|
||||
extern SplinePointList *SplinePointListRemoveSelected(SplineChar *sc, SplinePointList *base);
|
||||
extern SplinePointList *SplinePointListShift(SplinePointList *base, real xoff, enum transformPointType allpoints);
|
||||
extern SplinePointList *SplinePointListSpiroTransform(SplinePointList *base, real transform[6], int allpoints);
|
||||
extern SplinePointList *SplinePointListTransformExtended(SplinePointList *base, real transform[6], enum transformPointType tpt, enum transformPointMask tpmask);
|
||||
|
||||
extern SplinePoint *SplineBisect(Spline *spline, extended t);
|
||||
extern SplinePoint *SplinePointCreate(real x, real y);
|
||||
extern SplineSet *LayerAllSplines(Layer *layer);
|
||||
extern SplineSet *LayerUnAllSplines(Layer *layer);
|
||||
extern Spline *SplineMake3(SplinePoint *from, SplinePoint *to);
|
||||
extern Spline *SplineSplit(Spline *spline, extended ts[3]);
|
||||
extern struct baselangextent *BaseLangCopy(struct baselangextent *extent);
|
||||
extern struct ff_glyphclasses *SFGetGroup(const struct splinefont *sf, int index, const char *name);
|
||||
extern struct glyphvariants *GlyphVariantsCopy(struct glyphvariants *gv);
|
||||
extern struct gradient *GradientCopy(struct gradient *old, real transform[6]);
|
||||
extern struct jstf_lang *JstfLangsCopy(struct jstf_lang *jl);
|
||||
extern struct mathkern *MathKernCopy(struct mathkern *mk);
|
||||
extern struct pattern *PatternCopy(struct pattern *old, real transform[6]);
|
||||
extern ValDevTab *ValDevTabCopy(ValDevTab *orig);
|
||||
extern void AltUniFree(struct altuni *altuni);
|
||||
extern void AnchorClassesFree(AnchorClass *an);
|
||||
extern void AnchorPointsFree(AnchorPoint *ap);
|
||||
extern void ApTransform(AnchorPoint *ap, real transform[6]);
|
||||
extern void ASMFree(ASM *sm);
|
||||
extern void BaseFree(struct Base *base);
|
||||
extern void BaseLangFree(struct baselangextent *extent);
|
||||
extern void BaseScriptFree(struct basescript *bs);
|
||||
extern void BpTransform(BasePoint *to, BasePoint *from, real transform[6]);
|
||||
extern void BrushCopy(struct brush *into, struct brush *from, real transform[6]);
|
||||
extern void CIDLayerFindBounds(SplineFont *cidmaster, int layer, DBounds *bounds);
|
||||
extern void DeviceTableFree(DeviceTable *dt);
|
||||
extern void DeviceTableSet(DeviceTable *adjust, int size, int correction);
|
||||
extern void DStemInfoFree(DStemInfo *h);
|
||||
extern void DStemInfosFree(DStemInfo *h);
|
||||
extern void EncMapFree(EncMap *map);
|
||||
extern void ExplodedStringFree(char **input);
|
||||
extern void FeatureScriptLangListFree(FeatureScriptLangList *fl);
|
||||
extern void FPSTClassesFree(FPST *fpst);
|
||||
extern void FPSTFree(FPST *fpst);
|
||||
extern void FPSTRuleContentsFree(struct fpst_rule *r, enum fpossub_format format);
|
||||
extern void FPSTRulesFree(struct fpst_rule *r, enum fpossub_format format, int rcnt);
|
||||
extern void GlyphGroupFree(struct ff_glyphclasses* group);
|
||||
extern void GlyphGroupKernFree(struct ff_rawoffsets* groupkern);
|
||||
extern void GlyphGroupKernsFree(struct ff_rawoffsets* root);
|
||||
extern void GlyphGroupsFree(struct ff_glyphclasses* root);
|
||||
extern void GlyphVariantsFree(struct glyphvariants *gv);
|
||||
extern void GradientFree(struct gradient *grad);
|
||||
extern void GrowBufferAdd(GrowBuf *gb, int ch);
|
||||
extern void GrowBufferAddStr(GrowBuf *gb, char *str);
|
||||
extern void GuidelineSetFree(GuidelineSet *gl);
|
||||
extern void ImageListsFree(ImageList *imgs);
|
||||
extern void JstfLangFree(struct jstf_lang *jl);
|
||||
extern void JustifyFree(Justify *just);
|
||||
extern void KernClassClearSpecialContents(KernClass *kc);
|
||||
extern void KernClassFreeContents(KernClass *kc);
|
||||
extern void KernClassListClearSpecialContents(KernClass *kc);
|
||||
extern void KernClassListFree(KernClass *kc);
|
||||
extern void KernPairsFree(KernPair *kp);
|
||||
extern void LayerDefault(Layer *layer);
|
||||
extern void LayerFreeContents(SplineChar *sc, int layer);
|
||||
extern void LinearApproxFree(LinearApprox *la);
|
||||
extern void LineListFree(LineList *ll);
|
||||
extern void MacFeatListFree(MacFeat *mf);
|
||||
extern void MacNameListFree(struct macname *mn);
|
||||
extern void MacSettingListFree(struct macsetting *ms);
|
||||
extern void MarkClassFree(int cnt, char **classes, char **names);
|
||||
extern void MarkSetFree(int cnt, char **classes, char **names);
|
||||
extern void MathKernFree(struct mathkern *mk);
|
||||
extern void MathKernVContentsFree(struct mathkernvertex *mk);
|
||||
extern void MinimumDistancesFree(MinimumDistance *md);
|
||||
extern void MMSetClearSpecial(MMSet *mm);
|
||||
extern void MMSetFreeContents(MMSet *mm);
|
||||
extern void OtfFeatNameListFree(struct otffeatname *fn);
|
||||
extern void OtfNameListFree(struct otfname *on);
|
||||
extern void OTLookupFree(OTLookup *lookup);
|
||||
extern void OTLookupListFree(OTLookup *lookup);
|
||||
extern void PatternFree(struct pattern *pat);
|
||||
extern void PenCopy(struct pen *into, struct pen *from, real transform[6]);
|
||||
extern void RefCharFindBounds(RefChar *rf);
|
||||
extern void RefCharFree(RefChar *ref);
|
||||
extern void RefCharsFree(RefChar *ref);
|
||||
extern void SCCategorizePoints(SplineChar *sc);
|
||||
extern void SCMakeDependent(SplineChar *dependent, SplineChar *base);
|
||||
extern void SCRefToSplines(SplineChar *sc, RefChar *rf, int layer);
|
||||
extern void SCReinstanciateRefChar(SplineChar *sc, RefChar *rf, int layer);
|
||||
extern void SCRemoveDependent(SplineChar *dependent, RefChar *rf, int layer);
|
||||
extern void SCRemoveDependents(SplineChar *dependent);
|
||||
extern void SCRemoveLayerDependents(SplineChar *dependent, int layer);
|
||||
extern void SFInstanciateRefs(SplineFont *sf);
|
||||
extern void SFReinstanciateRefs(SplineFont *sf);
|
||||
extern void SFRemoveAnchorClass(SplineFont *sf, AnchorClass *an);
|
||||
extern void SFRemoveSavedTable(SplineFont *sf, uint32 tag);
|
||||
extern void SplineCharFindBounds(SplineChar *sc, DBounds *bounds);
|
||||
extern void SplineCharFreeContents(SplineChar *sc);
|
||||
extern void SplineCharLayerFindBounds(SplineChar *sc, int layer, DBounds *bounds);
|
||||
extern void SplineCharLayerQuickBounds(SplineChar *sc, int layer, DBounds *bounds);
|
||||
extern void SplineCharListsFree(struct splinecharlist *dlist);
|
||||
extern void SplineCharQuickBounds(SplineChar *sc, DBounds *b);
|
||||
extern void SplineCharQuickConservativeBounds(SplineChar *sc, DBounds *b);
|
||||
extern void SplineFindExtrema(const Spline1D *sp, extended *_t1, extended *_t2);
|
||||
extern void SplineFontClearSpecial(SplineFont *sf);
|
||||
extern void SplineFontFindBounds(SplineFont *sf, DBounds *bounds);
|
||||
extern void SplineFontFree(SplineFont *sf);
|
||||
extern void SplineFontLayerFindBounds(SplineFont *sf, int layer, DBounds *bounds);
|
||||
extern void SplineFontQuickConservativeBounds(SplineFont *sf, DBounds *b);
|
||||
extern void SplineFree(Spline *spline);
|
||||
extern void SplinePointCategorize(SplinePoint *sp);
|
||||
extern void SplinePointFree(SplinePoint *sp);
|
||||
extern void SplinePointListFree(SplinePointList *spl);
|
||||
extern void SplinePointListMDFree(SplineChar *sc, SplinePointList *spl);
|
||||
extern void SplinePointListSelect(SplinePointList *spl, int sel);
|
||||
extern void SplinePointListsFree(SplinePointList *spl);
|
||||
extern void SplinePointListsMDFree(SplineChar *sc, SplinePointList *spl);
|
||||
extern void SplinePointMDFree(SplineChar *sc, SplinePoint *sp);
|
||||
extern void SplinePointsFree(SplinePointList *spl);
|
||||
extern void SplineRemoveExtremaTooClose(Spline1D *sp, extended *_t1, extended *_t2);
|
||||
extern void SplineSetBeziersClear(SplinePointList *spl);
|
||||
extern void SplineSetFindBounds(const SplinePointList *spl, DBounds *bounds);
|
||||
extern void SplineSetQuickBounds(SplineSet *ss, DBounds *b);
|
||||
extern void SplineSetQuickConservativeBounds(SplineSet *ss, DBounds *b);
|
||||
extern void SplineSetSpirosClear(SplineSet *spl);
|
||||
extern void TTFLangNamesFree(struct ttflangname *l);
|
||||
extern void TtfTablesFree(struct ttf_table *tab);
|
||||
extern void ValDevFree(ValDevTab *adjust);
|
||||
|
||||
extern int KerningClassSeekByAbsoluteIndex(const struct splinefont *sf, int seek_index, struct kernclass **okc, int *oisv, int *oisr, int *ooffset);
|
||||
extern int HashKerningClassNames(SplineFont *sf, struct glif_name_index * class_name_hash);
|
||||
extern int HashKerningClassNamesCaps(SplineFont *sf, struct glif_name_index * class_name_hash);
|
||||
extern int HashKerningClassNamesFlex(SplineFont *sf, struct glif_name_index * class_name_hash, int capitalize);
|
||||
|
||||
#endif /* FONTFORGE_SPLINEUTIL_H */
|
@ -1,85 +0,0 @@
|
||||
#ifndef FONTFORGE_SPLINEUTIL2_H
|
||||
#define FONTFORGE_SPLINEUTIL2_H
|
||||
|
||||
#include "splinefont.h"
|
||||
|
||||
enum ae_type { ae_all, ae_between_selected, ae_only_good, ae_only_good_rm_later };
|
||||
|
||||
extern bigreal PathLength(SplineSet *ss);
|
||||
extern bigreal SplineLengthRange(Spline *spline, real from_t, real to_t);
|
||||
extern char *GetNextUntitledName(void);
|
||||
extern int PointListIsSelected(SplinePointList *spl);
|
||||
extern int PointsDiagonalable(SplineFont *sf, BasePoint **bp, BasePoint *unit);
|
||||
extern int RealApprox(real a, real b);
|
||||
extern int RealNearish(real a, real b);
|
||||
extern int RealRatio(real a, real b, real fudge);
|
||||
extern int RealWithin(real a, real b, real fudge);
|
||||
extern int SPInterpolate(const SplinePoint *sp);
|
||||
extern int SpIsExtremum(SplinePoint *sp);
|
||||
extern int Spline1DCantExtremeX(const Spline *s);
|
||||
extern int Spline1DCantExtremeY(const Spline *s);
|
||||
extern int SplineInSplineSet(Spline *spline, SplineSet *spl);
|
||||
extern int SplineIsLinearMake(Spline *spline);
|
||||
extern int SplinePointListIsClockwise(const SplineSet *spl);
|
||||
extern int SPLNearlyLines(SplineChar *sc, SplineSet *ss, bigreal err);
|
||||
extern int Within16RoundingErrors(bigreal v1, bigreal v2);
|
||||
extern int Within4RoundingErrors(bigreal v1, bigreal v2);
|
||||
extern int Within64RoundingErrors(bigreal v1, bigreal v2);
|
||||
extern Spline *ApproximateSplineFromPointsSlopes(SplinePoint *from, SplinePoint *to, TPoint *mid, int cnt, int order2);
|
||||
extern SplineFont *SplineFontBlank(int charcnt);
|
||||
extern SplineFont *SplineFontEmpty(void);
|
||||
extern SplineFont *SplineFontNew(void);
|
||||
extern Spline *PathFindDistance(SplineSet *path, bigreal d, bigreal *_t);
|
||||
extern SplineSet *SplineCharRemoveTiny(SplineChar *sc, SplineSet *head);
|
||||
extern SplineSet *SplineCharSimplify(SplineChar *sc, SplineSet *head, struct simplifyinfo *smpl);
|
||||
extern SplineSet *SplineSetBindToPath(SplineSet *ss, int doscale, int glyph_as_unit, int align, real offset, SplineSet *path);
|
||||
extern SplineSet *SplineSetJoin(SplineSet *start, int doall, real fudge, int *changed);
|
||||
extern SplineSet *SplineSetReverse(SplineSet *spl);
|
||||
extern SplineSet *SplineSetsAntiCorrect(SplineSet *base);
|
||||
extern SplineSet *SplineSetsCorrect(SplineSet *base, int *changed);
|
||||
extern SplineSet *SplineSetsDetectDir(SplineSet **_base, int *_lastscan);
|
||||
extern SplineSet *SplineSetsExtractOpen(SplineSet **tbase);
|
||||
extern SplineSet *SSRemoveZeroLengthSplines(SplineSet *base);
|
||||
extern Spline *SplineAddExtrema(Spline *s, int always, real lenbound, real offsetbound, DBounds *b);
|
||||
extern void BP_HVForce(BasePoint *vector);
|
||||
extern void CanonicalContours(SplineChar *sc, int layer);
|
||||
extern void SFIncrementXUID(SplineFont *sf);
|
||||
extern void SFRandomChangeXUID(SplineFont *sf);
|
||||
extern void SPAdjustControl(SplinePoint *sp, BasePoint *cp, BasePoint *to, int order2);
|
||||
extern void SPAverageCps(SplinePoint *sp);
|
||||
extern void SPHVCurveForce(SplinePoint *sp);
|
||||
extern void SPLAverageCps(SplinePointList *spl);
|
||||
extern void SplineCharAddExtrema(SplineChar *sc, SplineSet *head, enum ae_type between_selected, int emsize);
|
||||
extern void SplineCharDefaultNextCP(SplinePoint *base);
|
||||
extern void SplineCharDefaultPrevCP(SplinePoint *base);
|
||||
extern void SplineCharMerge(SplineChar *sc, SplineSet **head, int type);
|
||||
extern void SplineCharTangentNextCP(SplinePoint *sp);
|
||||
extern void SplineCharTangentPrevCP(SplinePoint *sp);
|
||||
extern void SplinePointListSet(SplinePointList *tobase, SplinePointList *frombase);
|
||||
extern void SplinePointListSimplify(SplineChar *sc, SplinePointList *spl, struct simplifyinfo *smpl);
|
||||
extern void SplineSetAddExtrema(SplineChar *sc, SplineSet *ss, enum ae_type between_selected, int emsize);
|
||||
extern void SplineSetJoinCpFixup(SplinePoint *sp);
|
||||
extern void SplineSetsInsertOpen(SplineSet **tbase, SplineSet *open);
|
||||
extern void SplineSetsUntick(SplineSet *spl);
|
||||
extern void SplinesRemoveBetween(SplineChar *sc, SplinePoint *from, SplinePoint *to, int type);
|
||||
extern void SPLNearlyHvCps(SplineChar *sc, SplineSet *ss, bigreal err);
|
||||
extern void SPLNearlyHvLines(SplineChar *sc, SplineSet *ss, bigreal err);
|
||||
extern void SPLsStartToLeftmost(SplineChar *sc, int layer);
|
||||
extern void SPLStartToLeftmost(SplineChar *sc, SplinePointList *spl, int *changed);
|
||||
extern void SPSmoothJoint(SplinePoint *sp);
|
||||
|
||||
/**
|
||||
* This is like SPAdjustControl but you have not wanting to move the
|
||||
* BCP at all, but you would like the current location of the passed
|
||||
* BCP to reshape the spline through the splinepoint. For example, if
|
||||
* you drag the spline between two points then you might like to touch
|
||||
* the inside BCP between the two splinepoints to reshape the whole
|
||||
* curve through a curve point.
|
||||
*/
|
||||
extern void SPTouchControl(SplinePoint *sp, BasePoint *which, int order2);
|
||||
|
||||
extern void SPWeightedAverageCps(SplinePoint *sp);
|
||||
extern void SSOverlapClusterCpAngles(SplineSet *base, bigreal within);
|
||||
extern void SSRemoveStupidControlPoints(SplineSet *base);
|
||||
|
||||
#endif /* FONTFORGE_SPLINEUTIL2_H */
|
@ -1,8 +0,0 @@
|
||||
#ifndef FONTFORGE_START_H
|
||||
#define FONTFORGE_START_H
|
||||
|
||||
extern void doinitFontForgeMain(void);
|
||||
extern void doversion(const char *source_version_str);
|
||||
extern void InitSimpleStuff(void);
|
||||
|
||||
#endif /* FONTFORGE_START_H */
|
@ -1,33 +0,0 @@
|
||||
#ifndef FONTFORGE_TOTTF_H
|
||||
#define FONTFORGE_TOTTF_H
|
||||
|
||||
#include "splinefont.h"
|
||||
#include "ttf.h"
|
||||
|
||||
extern char *utf8_verify_copy(const char *str);
|
||||
extern int32 filechecksum(FILE *file);
|
||||
|
||||
extern int AlreadyMSSymbolArea(SplineFont *sf, EncMap *map);
|
||||
extern int RefDepth(RefChar *ref, int layer);
|
||||
extern int SFFigureDefWidth(SplineFont *sf, int *_nomwid);
|
||||
extern int SFHasInstructions(SplineFont *sf);
|
||||
extern int SSAddPoints(SplineSet *ss, int ptcnt, BasePoint *bp, char *flags);
|
||||
extern int ttfcopyfile(FILE *ttf, FILE *other, int pos, const char *tab_name);
|
||||
extern int WriteTTC(const char *filename, struct sflist *sfs, enum fontformat format, enum bitmapformat bf, int flags, int layer, enum ttc_flags ttcflags);
|
||||
extern int WriteTTFFont(char *fontname, SplineFont *sf, enum fontformat format, int32 *bsizes, enum bitmapformat bf, int flags, EncMap *enc, int layer);
|
||||
extern int _WriteTTFFont(FILE *ttf, SplineFont *sf, enum fontformat format, int32 *bsizes, enum bitmapformat bf, int flags, EncMap *enc, int layer);
|
||||
extern int _WriteType42SFNTS(FILE *type42, SplineFont *sf, enum fontformat format, int flags, EncMap *enc, int layer);
|
||||
extern void cvt_unix_to_1904(long long time, int32 result[2]);
|
||||
extern void DefaultTTFEnglishNames(struct ttflangname *dummy, SplineFont *sf);
|
||||
extern void OS2FigureCodePages(SplineFont *sf, uint32 CodePage[2]);
|
||||
extern void OS2FigureUnicodeRanges(SplineFont *sf, uint32 Ranges[4]);
|
||||
extern void SFDefaultOS2Info(struct pfminfo *pfminfo, SplineFont *sf, char *fontname);
|
||||
extern void SFDefaultOS2Simple(struct pfminfo *pfminfo, SplineFont *sf);
|
||||
extern void SFDefaultOS2SubSuper(struct pfminfo *pfminfo, int emsize, double italic_angle);
|
||||
extern void SFDummyUpCIDs(struct glyphinfo *gi, SplineFont *sf);
|
||||
|
||||
extern void putfixed(FILE *file, real dval);
|
||||
extern void putlong(FILE *file, int val);
|
||||
extern void putshort(FILE *file, int sval);
|
||||
|
||||
#endif /* FONTFORGE_TOTTF_H */
|
Loading…
Reference in New Issue
Block a user