aboutsummaryrefslogtreecommitdiff
path: root/fontconfig
diff options
context:
space:
mode:
Diffstat (limited to 'fontconfig')
-rw-r--r--fontconfig/config.h7
-rw-r--r--fontconfig/fc-case/.gitignore1
-rw-r--r--fontconfig/fc-case/makefile27
-rw-r--r--fontconfig/fc-glyphname/.gitignore1
-rw-r--r--fontconfig/fc-glyphname/makefile26
-rw-r--r--fontconfig/fc-lang/.gitignore1
-rw-r--r--fontconfig/fc-lang/makefile275
-rw-r--r--fontconfig/src/.gitignore4
-rw-r--r--fontconfig/src/fcatomic.c3
-rw-r--r--fontconfig/src/fccache.c1
-rw-r--r--fontconfig/src/fcstdint.h2
-rw-r--r--fontconfig/src/fcxml.c3
-rw-r--r--fontconfig/src/makealias.py36
-rw-r--r--fontconfig/src/makefile60
14 files changed, 445 insertions, 2 deletions
diff --git a/fontconfig/config.h b/fontconfig/config.h
new file mode 100644
index 000000000..e9ebf015e
--- /dev/null
+++ b/fontconfig/config.h
@@ -0,0 +1,7 @@
+#define HAVE_INTTYPES_H 1
+#define HAVE_FT_GET_NEXT_CHAR 1
+#define ENABLE_LIBXML2
+#define HAVE_RAND 1
+#define HAVE_STRUCT_DIRENT_D_TYPE 1
+#undef __STDC__
+#define FLEXIBLE_ARRAY_MEMBER \ No newline at end of file
diff --git a/fontconfig/fc-case/.gitignore b/fontconfig/fc-case/.gitignore
new file mode 100644
index 000000000..ad04faca3
--- /dev/null
+++ b/fontconfig/fc-case/.gitignore
@@ -0,0 +1 @@
+fccase.h \ No newline at end of file
diff --git a/fontconfig/fc-case/makefile b/fontconfig/fc-case/makefile
new file mode 100644
index 000000000..804cd6910
--- /dev/null
+++ b/fontconfig/fc-case/makefile
@@ -0,0 +1,27 @@
+ifneq ($(NORELDBG),1)
+$(error NORELDBG should have been set to 1)
+endif
+
+INCLUDES+=..\src
+
+TMPL=fccase.tmpl.h
+STMPL=${TMPL}
+TARG=fccase.h
+
+TTYAPP=fc-case
+
+CSRCS= \
+ fc-case.c
+
+CASEFOLDING=CaseFolding.txt
+SCASEFOLDING=CaseFolding.txt
+
+DEFINES += HAVE_CONFIG_H
+INCLUDES := .. $(INCLUDES)
+
+$(TARG): $(STMPL) $(OBJDIR)\fc-case.exe $(SCASEFOLDING)
+ del -e $(TARG)
+ $(OBJDIR)\fc-case.exe $(SCASEFOLDING) < $(STMPL) > $(TARG).tmp
+ move $(TARG).tmp $(TARG)
+
+
diff --git a/fontconfig/fc-glyphname/.gitignore b/fontconfig/fc-glyphname/.gitignore
new file mode 100644
index 000000000..84e3e5aca
--- /dev/null
+++ b/fontconfig/fc-glyphname/.gitignore
@@ -0,0 +1 @@
+fcglyphname.h \ No newline at end of file
diff --git a/fontconfig/fc-glyphname/makefile b/fontconfig/fc-glyphname/makefile
new file mode 100644
index 000000000..fca00db80
--- /dev/null
+++ b/fontconfig/fc-glyphname/makefile
@@ -0,0 +1,26 @@
+ifneq ($(NORELDBG),1)
+$(error NORELDBG should have been set to 1)
+endif
+
+INCLUDES+=..\src
+
+TMPL=fcglyphname.tmpl.h
+STMPL=${TMPL}
+TARG=fcglyphname.h
+
+TTYAPP=fc-glyphname
+
+CSRCS= \
+ fc-glyphname.c
+
+GLYPHNAME=zapfdingbats.txt
+SGLYPHNAME=zapfdingbats.txt
+
+DEFINES += HAVE_CONFIG_H
+INCLUDES := .. $(INCLUDES)
+
+$(TARG): $(STMPL) $(OBJDIR)\fc-glyphname.exe $(SGLYPHNAME)
+ del -e $(TARG)
+ $(OBJDIR)\fc-glyphname.exe $(SGLYPHNAME) < $(STMPL) > $(TARG).tmp
+ move $(TARG).tmp $(TARG)
+
diff --git a/fontconfig/fc-lang/.gitignore b/fontconfig/fc-lang/.gitignore
new file mode 100644
index 000000000..2dba764f2
--- /dev/null
+++ b/fontconfig/fc-lang/.gitignore
@@ -0,0 +1 @@
+fclang.h \ No newline at end of file
diff --git a/fontconfig/fc-lang/makefile b/fontconfig/fc-lang/makefile
new file mode 100644
index 000000000..dcfe56553
--- /dev/null
+++ b/fontconfig/fc-lang/makefile
@@ -0,0 +1,275 @@
+ifneq ($(NORELDBG),1)
+$(error NORELDBG should have been set to 1)
+endif
+
+INCLUDES+=..\src
+
+TMPL=fclang.tmpl.h
+STMPL=fclang.tmpl.h
+TARG=fclang.h
+
+TTYAPP=fc-lang
+
+CSRCS= \
+ fc-lang.c
+
+# NOTE:
+#
+# The order of the orth files here is extremely important (part of the cache
+# format) and should not be modified. New orth files should be added at the
+# end. No files should be removed either.
+#
+ORTH = \
+ aa.orth \
+ ab.orth \
+ af.orth \
+ am.orth \
+ ar.orth \
+ as.orth \
+ ast.orth \
+ av.orth \
+ ay.orth \
+ az_az.orth \
+ az_ir.orth \
+ ba.orth \
+ bm.orth \
+ be.orth \
+ bg.orth \
+ bh.orth \
+ bho.orth \
+ bi.orth \
+ bin.orth \
+ bn.orth \
+ bo.orth \
+ br.orth \
+ bs.orth \
+ bua.orth \
+ ca.orth \
+ ce.orth \
+ ch.orth \
+ chm.orth \
+ chr.orth \
+ co.orth \
+ cs.orth \
+ cu.orth \
+ cv.orth \
+ cy.orth \
+ da.orth \
+ de.orth \
+ dz.orth \
+ el.orth \
+ en.orth \
+ eo.orth \
+ es.orth \
+ et.orth \
+ eu.orth \
+ fa.orth \
+ fi.orth \
+ fj.orth \
+ fo.orth \
+ fr.orth \
+ ff.orth \
+ fur.orth \
+ fy.orth \
+ ga.orth \
+ gd.orth \
+ gez.orth \
+ gl.orth \
+ gn.orth \
+ gu.orth \
+ gv.orth \
+ ha.orth \
+ haw.orth \
+ he.orth \
+ hi.orth \
+ ho.orth \
+ hr.orth \
+ hu.orth \
+ hy.orth \
+ ia.orth \
+ ig.orth \
+ id.orth \
+ ie.orth \
+ ik.orth \
+ io.orth \
+ is.orth \
+ it.orth \
+ iu.orth \
+ ja.orth \
+ ka.orth \
+ kaa.orth \
+ ki.orth \
+ kk.orth \
+ kl.orth \
+ km.orth \
+ kn.orth \
+ ko.orth \
+ kok.orth \
+ ks.orth \
+ ku_am.orth \
+ ku_ir.orth \
+ kum.orth \
+ kv.orth \
+ kw.orth \
+ ky.orth \
+ la.orth \
+ lb.orth \
+ lez.orth \
+ ln.orth \
+ lo.orth \
+ lt.orth \
+ lv.orth \
+ mg.orth \
+ mh.orth \
+ mi.orth \
+ mk.orth \
+ ml.orth \
+ mn_cn.orth \
+ mo.orth \
+ mr.orth \
+ mt.orth \
+ my.orth \
+ nb.orth \
+ nds.orth \
+ ne.orth \
+ nl.orth \
+ nn.orth \
+ no.orth \
+ nr.orth \
+ nso.orth \
+ ny.orth \
+ oc.orth \
+ om.orth \
+ or.orth \
+ os.orth \
+ pa.orth \
+ pl.orth \
+ ps_af.orth \
+ ps_pk.orth \
+ pt.orth \
+ rm.orth \
+ ro.orth \
+ ru.orth \
+ sa.orth \
+ sah.orth \
+ sco.orth \
+ se.orth \
+ sel.orth \
+ sh.orth \
+ shs.orth \
+ si.orth \
+ sk.orth \
+ sl.orth \
+ sm.orth \
+ sma.orth \
+ smj.orth \
+ smn.orth \
+ sms.orth \
+ so.orth \
+ sq.orth \
+ sr.orth \
+ ss.orth \
+ st.orth \
+ sv.orth \
+ sw.orth \
+ syr.orth \
+ ta.orth \
+ te.orth \
+ tg.orth \
+ th.orth \
+ ti_er.orth \
+ ti_et.orth \
+ tig.orth \
+ tk.orth \
+ tl.orth \
+ tn.orth \
+ to.orth \
+ tr.orth \
+ ts.orth \
+ tt.orth \
+ tw.orth \
+ tyv.orth \
+ ug.orth \
+ uk.orth \
+ ur.orth \
+ uz.orth \
+ ve.orth \
+ vi.orth \
+ vo.orth \
+ vot.orth \
+ wa.orth \
+ wen.orth \
+ wo.orth \
+ xh.orth \
+ yap.orth \
+ yi.orth \
+ yo.orth \
+ zh_cn.orth \
+ zh_hk.orth \
+ zh_mo.orth \
+ zh_sg.orth \
+ zh_tw.orth \
+ zu.orth \
+ ak.orth \
+ an.orth \
+ ber_dz.orth \
+ ber_ma.orth \
+ byn.orth \
+ crh.orth \
+ csb.orth \
+ dv.orth \
+ ee.orth \
+ fat.orth \
+ fil.orth \
+ hne.orth \
+ hsb.orth \
+ ht.orth \
+ hz.orth \
+ ii.orth \
+ jv.orth \
+ kab.orth \
+ kj.orth \
+ kr.orth \
+ ku_iq.orth \
+ ku_tr.orth \
+ kwm.orth \
+ lg.orth \
+ li.orth \
+ mai.orth \
+ mn_mn.orth \
+ ms.orth \
+ na.orth \
+ ng.orth \
+ nv.orth \
+ ota.orth \
+ pa_pk.orth \
+ pap_an.orth \
+ pap_aw.orth \
+ qu.orth \
+ rn.orth \
+ rw.orth \
+ sc.orth \
+ sd.orth \
+ sg.orth \
+ sid.orth \
+ sn.orth \
+ su.orth \
+ ty.orth \
+ wal.orth \
+ za.orth \
+ lah.orth \
+ nqo.orth \
+ brx.orth \
+ sat.orth \
+ doi.orth \
+ mni.orth
+# ^-------------- Add new orth files here
+
+DEFINES += HAVE_CONFIG_H
+INCLUDES := .. $(INCLUDES)
+
+$(TARG):$(ORTH) $(OBJDIR)\fc-lang.exe $(STMPL)
+ del -e $(TARG)
+ $(OBJDIR)\fc-lang.exe -d . $(ORTH) < $(STMPL) > $(TARG).tmp
+ move $(TARG).tmp $(TARG)
+
diff --git a/fontconfig/src/.gitignore b/fontconfig/src/.gitignore
new file mode 100644
index 000000000..baffcee29
--- /dev/null
+++ b/fontconfig/src/.gitignore
@@ -0,0 +1,4 @@
+fcalias.h
+fcaliastail.h
+fcftalias.h
+fcftaliastail.h \ No newline at end of file
diff --git a/fontconfig/src/fcatomic.c b/fontconfig/src/fcatomic.c
index 350744abb..f15e02f23 100644
--- a/fontconfig/src/fcatomic.c
+++ b/fontconfig/src/fcatomic.c
@@ -7,7 +7,7 @@
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
- * documentation, and that the name of the author(s) not be used in
+ * documentation, and that the name of the author(s) not be used in
* advertising or publicity pertaining to distribution of the software without
* specific, written prior permission. The authors make no
* representations about the suitability of this software for any purpose. It
@@ -56,6 +56,7 @@
#include <time.h>
#ifdef _WIN32
+#undef mkdir
#define mkdir(path,mode) _mkdir(path)
#endif
diff --git a/fontconfig/src/fccache.c b/fontconfig/src/fccache.c
index 81985df59..9b06b65a3 100644
--- a/fontconfig/src/fccache.c
+++ b/fontconfig/src/fccache.c
@@ -803,6 +803,7 @@ bail1:
#ifdef _WIN32
+#undef mkdir
#define mkdir(path,mode) _mkdir(path)
#endif
diff --git a/fontconfig/src/fcstdint.h b/fontconfig/src/fcstdint.h
new file mode 100644
index 000000000..31da039d9
--- /dev/null
+++ b/fontconfig/src/fcstdint.h
@@ -0,0 +1,2 @@
+#include <stdint.h>
+
diff --git a/fontconfig/src/fcxml.c b/fontconfig/src/fcxml.c
index 5edc86744..7d1d6f1ad 100644
--- a/fontconfig/src/fcxml.c
+++ b/fontconfig/src/fcxml.c
@@ -1848,7 +1848,8 @@ FcParseUnary (FcConfigParse *parse, FcOp op)
static void
FcParseDir (FcConfigParse *parse)
{
- const FcChar8 *attr, *data;
+ const FcChar8 *attr;
+ FcChar8 *data;
FcChar8 *prefix = NULL;
#ifdef _WIN32
FcChar8 buffer[1000];
diff --git a/fontconfig/src/makealias.py b/fontconfig/src/makealias.py
new file mode 100644
index 000000000..6afca0901
--- /dev/null
+++ b/fontconfig/src/makealias.py
@@ -0,0 +1,36 @@
+import sys,os,re,glob
+
+SRCDIR=sys.argv[1]
+HEAD=open(sys.argv[2],"w")
+TAIL=open(sys.argv[3],"w")
+
+#rm -f $HEAD $TAIL
+TAIL.write("#if HAVE_GNUC_ATTRIBUTE\n")
+
+InputFiles=sys.argv[4:]
+Names=[]
+for Input in InputFiles:
+ buffer=open(Input,"r").read()
+ Names.extend(re.findall(r'\n(Fc[^ ]*) *\(',buffer))
+
+def SearchCFiles(Name):
+ Files=glob.glob(os.path.join(SRCDIR,"*.c") )
+ for File in Files:
+ buffer=open(File,"r").read()
+ res = re.findall(r'\n%s[ \(].*'%Name,buffer)
+ if res:
+ File=re.sub(r'^.*[\\/]','',File)
+ return "__"+re.sub(r'\.c','__',File)
+
+for Name in Names:
+ if Name=="FcCacheDir" or Name=="FcCacheSubdir":
+ continue
+
+ alias="IA__"+Name
+ HEAD.write("extern __typeof (%s) %s;\n"%(Name,alias))
+ HEAD.write("#define %s %s\n"%(Name,alias))
+ TAIL.write("#ifdef "+SearchCFiles(Name)+"\n")
+ TAIL.write("#undef %s\n"%Name)
+ TAIL.write("extern __typeof (%s) %s;\n"%(Name,Name))
+ TAIL.write("#endif\n")
+TAIL.write("#endif\n")
diff --git a/fontconfig/src/makefile b/fontconfig/src/makefile
new file mode 100644
index 000000000..a289c5f6e
--- /dev/null
+++ b/fontconfig/src/makefile
@@ -0,0 +1,60 @@
+
+#INCLUDES = \
+# -I$(top_srcdir) \
+# -I$(top_srcdir)/src \
+# $(FREETYPE_CFLAGS) \
+# $(LIBXML2_CFLAGS) \
+# $(EXPAT_CFLAGS) \
+# $(WARN_CFLAGS) \
+# -DFC_CACHEDIR='"$(FC_CACHEDIR)"' \
+# -DFONTCONFIG_PATH='"$(CONFDIR)"'
+
+load_makefile NORELDBG=1 ..\fc-case\makefile
+load_makefile NORELDBG=1 ..\fc-glyphname\makefile
+load_makefile NORELDBG=1 ..\fc-lang\makefile
+
+CSRCS = \
+ fcatomic.c \
+ fcblanks.c \
+ fccache.c \
+ fccfg.c \
+ fccharset.c \
+ fcdbg.c \
+ fcdefault.c \
+ fcdir.c \
+ fcformat.c \
+ fcfreetype.c \
+ fcfs.c \
+ fcinit.c \
+ fclang.c \
+ fclist.c \
+ fcmatch.c \
+ fcmatrix.c \
+ fcname.c \
+ fcpat.c \
+ fcserialize.c \
+ fcstat.c \
+ fcstr.c \
+ fcxml.c \
+ \
+ ftglue.c
+
+LIBRARY = libfontconfig
+
+PUBLIC_FILES = \
+ ..\fontconfig\fontconfig.h \
+ fcdeprecate.h \
+ ..\fontconfig\fcprivate.h
+
+PUBLIC_FT_FILES = \
+ ..\fontconfig\fcfreetype.h
+
+DEFINES += FC_CACHEDIR="""getenv(\"""TEMP\""")""" FC_DEFAULT_FONTS="""WINDOWSFONTDIR"""
+INCLUDES := .. $(INCLUDES) $(MHMAKECONF)\freetype\include $(MHMAKECONF)\libxml2\include $(MHMAKECONF)\iconv\include
+
+fcalias.h fcaliastail.h: makealias.py $(PUBLIC_FILES)
+ python makealias.py . fcalias.h fcaliastail.h $(PUBLIC_FILES)
+
+fcftalias.h fcftaliastail.h: makealias.py $(PUBLIC_FT_FILES)
+ python makealias.py . fcftalias.h fcftaliastail.h $(PUBLIC_FT_FILES)
+