diff options
Diffstat (limited to 'fontconfig')
-rw-r--r-- | fontconfig/config.h | 18 | ||||
-rw-r--r-- | fontconfig/fc-case/.gitignore | 1 | ||||
-rw-r--r-- | fontconfig/fc-case/makefile | 27 | ||||
-rw-r--r-- | fontconfig/fc-glyphname/.gitignore | 1 | ||||
-rw-r--r-- | fontconfig/fc-glyphname/makefile | 26 | ||||
-rw-r--r-- | fontconfig/fc-lang/.gitignore | 1 | ||||
-rw-r--r-- | fontconfig/fc-lang/makefile | 275 | ||||
-rw-r--r-- | fontconfig/src/.gitignore | 4 | ||||
-rw-r--r-- | fontconfig/src/cleangperf.py | 8 | ||||
-rw-r--r-- | fontconfig/src/fcatomic.c | 2 | ||||
-rw-r--r-- | fontconfig/src/fccompat.c | 2 | ||||
-rw-r--r-- | fontconfig/src/fcfreetype.c | 8 | ||||
-rw-r--r-- | fontconfig/src/fclist.c | 2 | ||||
-rw-r--r-- | fontconfig/src/fcstat.c | 2 | ||||
-rw-r--r-- | fontconfig/src/fcstdint.h | 2 | ||||
-rw-r--r-- | fontconfig/src/fcxml.c | 3 | ||||
-rw-r--r-- | fontconfig/src/makealias.py | 36 | ||||
-rw-r--r-- | fontconfig/src/makefile | 62 |
18 files changed, 471 insertions, 9 deletions
diff --git a/fontconfig/config.h b/fontconfig/config.h new file mode 100644 index 000000000..441734857 --- /dev/null +++ b/fontconfig/config.h @@ -0,0 +1,18 @@ +#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 +#define inline __inline +#define HAVE_FCNTL_H 1 +#define HAVE__MKTEMP_S 1 +#define FC_CACHEDIR getenv("TEMP") +#define FC_DEFAULT_FONTS "fonts" +#ifdef _WIN64 +#define SIZEOF_VOID_P 8 +#else +#define SIZEOF_VOID_P 4 +#endif + 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/cleangperf.py b/fontconfig/src/cleangperf.py new file mode 100644 index 000000000..a276312c9 --- /dev/null +++ b/fontconfig/src/cleangperf.py @@ -0,0 +1,8 @@ +import sys,re + +inbuffer=sys.stdin.read() +inbuffer=re.sub(r'[ \t\r\n]*\n[ \t]*',r'\n',inbuffer) +inbuffer=re.sub(r'[ \t\r\n]*,[ \t\r\n]',r',',inbuffer) +inbuffer=re.sub(r'\n#[^\n]+','',inbuffer) +sys.stdout.write(inbuffer) + diff --git a/fontconfig/src/fcatomic.c b/fontconfig/src/fcatomic.c index c1daed938..c35a829fd 100644 --- a/fontconfig/src/fcatomic.c +++ b/fontconfig/src/fcatomic.c @@ -55,7 +55,7 @@ #include <time.h> #ifdef _WIN32 -#include <direct.h> +#undef mkdir #define mkdir(path,mode) _mkdir(path) #endif diff --git a/fontconfig/src/fccompat.c b/fontconfig/src/fccompat.c index f4f3f5fdc..19b1ecdc0 100644 --- a/fontconfig/src/fccompat.c +++ b/fontconfig/src/fccompat.c @@ -230,7 +230,7 @@ FcRandom(void) } #ifdef _WIN32 -#include <direct.h> +#undef mkdir #define mkdir(path,mode) _mkdir(path) #endif diff --git a/fontconfig/src/fcfreetype.c b/fontconfig/src/fcfreetype.c index d271d69e2..97d049206 100644 --- a/fontconfig/src/fcfreetype.c +++ b/fontconfig/src/fcfreetype.c @@ -2652,10 +2652,10 @@ addtag(FcChar8 *complex_, FT_ULong tag) { FcChar8 tagstring[OTLAYOUT_ID_LEN + 1]; - tagstring[0] = (FcChar8)(tag >> 24), - tagstring[1] = (FcChar8)(tag >> 16), - tagstring[2] = (FcChar8)(tag >> 8), - tagstring[3] = (FcChar8)(tag); + tagstring[0] = (FcChar8)((tag >> 24)&0xff), + tagstring[1] = (FcChar8)((tag >> 16)&0xff), + tagstring[2] = (FcChar8)((tag >> 8)&0xff), + tagstring[3] = (FcChar8)((tag)&0xff); tagstring[4] = '\0'; /* skip tags which aren't alphanumeric, under the assumption that diff --git a/fontconfig/src/fclist.c b/fontconfig/src/fclist.c index a365098a4..e58a62b9f 100644 --- a/fontconfig/src/fclist.c +++ b/fontconfig/src/fclist.c @@ -80,7 +80,7 @@ FcObjectSetAdd (FcObjectSet *os, const char *object) } if (c < 0) mid++; - memmove (os->objects + mid + 1, os->objects + mid, + memmove ((void*)(os->objects + mid + 1), os->objects + mid, (os->nobject - mid) * sizeof (const char *)); os->objects[mid] = object; os->nobject++; diff --git a/fontconfig/src/fcstat.c b/fontconfig/src/fcstat.c index 0a880975a..7b054cf78 100644 --- a/fontconfig/src/fcstat.c +++ b/fontconfig/src/fcstat.c @@ -93,7 +93,7 @@ FcStat (const FcChar8 *file, struct stat *statb) return -1; rc = GetLongPathName (full_path_name, full_path_name, sizeof (full_path_name)); - statb->st_ino = FcStringHash ((const FcChar8 *) full_path_name); + statb->st_ino = FcStringHash ((const FcChar8 *) full_path_name)&0xffff; statb->st_mode = _S_IREAD | _S_IWRITE; statb->st_mode |= (statb->st_mode >> 3) | (statb->st_mode >> 6); 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 91d166f38..ec79b8723 100644 --- a/fontconfig/src/fcxml.c +++ b/fontconfig/src/fcxml.c @@ -1988,7 +1988,8 @@ FcParseUnary (FcConfigParse *parse, FcOp op) static void FcParseDir (FcConfigParse *parse) { - const FcChar8 *attr, *data; + const FcChar8 *attr; + FcChar8 *data; FcChar8 *prefix = NULL, *p; #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..189478427 --- /dev/null +++ b/fontconfig/src/makefile @@ -0,0 +1,62 @@ +$(OBJDIR)\fcobjshash.gperf: fcobjshash.gperf.h fcobjs.h + cp $< $<.c + $(CPP) -EP -I.. $<.c | \ + python cleangperf.py | \ + gawk '/CUT_OUT_BEGIN/ { no_write=1; next; }; /CUT_OUT_END/ { no_write=0; next; }; { if (!no_write) print; next; };' - > $@.tmp + mv -f $@.tmp $@ + rm $<.c + +$(OBJDIR)\fcobjshash.h: $(OBJDIR)\fcobjshash.gperf + gperf -m 100 $< > $@ + + +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 \ + fccompat.c \ + fcdbg.c \ + fcdefault.c \ + fcdir.c \ + fcformat.c \ + fcfreetype.c \ + fcfs.c \ + fchash.c \ + fcinit.c \ + fclang.c \ + fclist.c \ + fcmatch.c \ + fcmatrix.c \ + fcname.c \ + fcobjs.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 + +INCLUDES := .. $(OBJDIR) $(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) + |